Hi,
Just wondering if any of you have any in put regarding this problem or any potential solutions to it.
I have a cucumber test suite, to test input vs output files.
Context:
Input = XML
Output = PDF/PostScript/Txt/Html etc.
I use different libraries to validate the content of the files.
The problem:
Say I want to run my entire cucumber test suite multiple times for as many input files I have, now the tricky part is - this is not certain and can change.
E.g. I sometimes have 11 input XMLs, sometimes 50 input XMLs, sometimes more/less etc. so essentially my cucumber test suite will need to run 11, 50, or whatever times.
Solution 1:
Write a shell script or something to loop through a directory to see how many XML input files are, then call mvn test X amount of times.
Solution 2:
Create a class that will loop through directory to see how many XML input files are, then generate that many Runner.java class files, and then the maven failsafe plugin will run ALL those runner classes(This sounds quite messy, if I have 100 input files, then essentially I will have 100 runner classes to run my cucumber test suties)
Solution 3:
Have every scenario as a Scenario Outline, but this ONLY works if we know how many different input files we have, which we don't necessarily know.
Solution 4:
Some how run my cucumber runner class similarly to how the JUnit Parameterized tests works or TestNG DataProvider works, it will run my tests for the amount of times I can specify using the DataProvider etc. I can't and don't see anything similar to this being implemented or exists currently.
Any input is much appreciated.
Regards,
Matt