I have a problem. In one test run i generate random numeric variable (but has String type) in every test. Im using a RandomStringUtils lib for that.
But it generates only one value of that variable for all of tests. How to generate new value in every test?
Example:
public void test() {
JsonResponse response = send(baseUrl(), generateId());
response.status200();
}
and generateId() method in other class
public static String generateId(){
return RandomStringUtils.randomNumeric(6);
}
thanks.
Aucun commentaire:
Enregistrer un commentaire