2 utilities which I use for generating Test Data
Using similar test data in automation over a long period of time becomes useless. To make testing more effective, one has to do experiments (testing) with multiple variations else it will lead to a classical pesticide paradox.
In my project, I have used 2 libraries that generate random multiple test data and support many languages.
https://github.com/Devskiller/jfairy
https://github.com/DiUS/java-faker
For example, If I am automation a registration flow, then I can generate first name as
Faker faker = new Faker();
String firstName = faker.name().firstName();OR
Fairy fairy = Fairy.create(); Person person = fairy.person(); System.out.println(person.getFirstName());
Comments
Post a Comment