I have test in Ibello & Java. I use
int random = (int)(Math.random() * (100000 - 1) + 1);
To generate a 5 digit code. My only problem, there is a bug that gives the same numbers frequently. When it gives a value that ever before, the test failed. I think it would be enough that it fails than return to the step and "+1" when i call the random generator. But how could i do. I have a Tests class (that contains the stpes in order, a steps class that contains what the background has, and behind this i have a pages class that contains where the steps build from.
Aucun commentaire:
Enregistrer un commentaire