vendredi 21 décembre 2018

Strategies to reduce the time of my test when testing all possibilities of my algorithm

I've made a Laravel package that generate tournament trees, and it works well.

The question is about the tests. I want to test all possibilities depending on the input parameters.

Input parameters are:

  • Number of competitor ( min: 2, max: 96)
  • Number of available areas ( 1, 2, 3, 4, 5)
  • Number of competitor in preliminary groups ( 3, 4, 5 )

So, if I test all possibilities, I have to make 95x5x3 = 1425 times the tests, and it takes a lot of time ( about 40 minutes )

On the other hand, if I limit number of competitors to 10 for example, I will have only 150 times the test running, but I won't be sure the test pass for all combination.

Besides, tomorrow, I could add a new parameter, for example, quantity of competitors that goes out a preliminary group ( default to 1 right now ), so each input will increase a lot the time needed.

How should I do to reduce the time needed for my tests to pass? Is there any strategy I could use ?

Aucun commentaire:

Enregistrer un commentaire