dimanche 28 avril 2019

Script to run Java code multiple times and check number of tests passing

I have a Java class with many parameters like:

Public class DoesWork(){

  constructor (int j, int p, int seed) { ..}

  run() { .. }

}

I also have a test suite called Tests.java that has 15 tests that tests the above class under different scenarios.

One problem with the DoesWork class is that its behaviour changes for every different j, p, or seed parameters. So sometimes 10 tests may pass, sometimes 12, etc.

I wish to write a script (i will leave to run this overnight) that goes from 0 to say 100 for each of these parameters and runs the tests to find out the best parameters that will make the tests all pass (or the most pass).

How to go about writing such a script? Should I do it as a new java script or a bash script etc? Please help me with suggestions and/or some basic code to help me get started. thank you

Aucun commentaire:

Enregistrer un commentaire