How to create a random login with Faker on Java

Viewed 47

I need to create a random user for autotests with Faker. For that I need to obtain a random login and password. How can I done it?

I suppose that for passwords I can use

faker.internet().password()

And I don't know what to do about login.

1 Answers

If you would like to use an email address along with a password:

faker.internet().emailAddress()
faker.internet().password()

If you would like to use a username along with a password:

faker.name().username()
faker.internet().password()
Related