KarelHusa's avatar
KarelHusa
Champion Level 3
2 years ago
Status:
New Idea

Randomly generated values in requests and other ReadyAPI functions

Current situation

ReadyAPI DataGenerator provides different random values (random integer, email, name, city, etc.)

I like this function since it creates nice test data.

However, the random values are only accessible via DataGenerator DataSource.

 

Proposal

It would be great if we could use them in:

  • REST, SOAP, and other requests
  • Variable setup
  • Groovy scripts
  • etc.

In ReadyAPI the random values could be available via:

  • expansion e.g. ${#Random#FirstName}
  • Get data function adding a Random category in the top level

Implementation proposal

Wrapping Java Faker (https://github.com/DiUS/java-faker ) would do the task.

 

Java faker can be configured to use localized data (e.g. english names, spanish names, etc.)

The faker provides a lot of interesting data useful for testing, just to name few of them:

 

Address
Animal
App
Artist
Avatar
Aviation
Book
Business
Company
Color
File
Finance
Food
Name
Nation
Number
PhoneNumber

and many more, including some funny categories like ChuckNorris.

 

3 Comments