0

I am using cucumber 4.4.0 with parallel run through cucumber.api.cli.Main from mvn using --threads for parallel run

     <mainClass>cucumber.api.cli.Main</mainClass>
       <arguments>
         <argument>--threads</argument>
        <argument>5</argument>
      </arguments>

I need to extend that for rerun the failed tests and get the report of the very last run if rerun happens ( say test1 failed first time and passed second time then report should be the passed one for test1) This should be done as part of single build. otherwise i have to do mvn run to create rerun.txt file then use that reurn.txt again through mvn run in jenkins

I know one library https://github.com/prashant-ramcharan/courgette-jvm which does this all above in a single go. ( parallel run, rerun the failed ones, get the report of the latest run result). This library I have used before as well.

However the only problem is the above library during parallel run, say it starts with 5 threads and it waits until all the 5 threads finish. Then start again with another set of 5 threads etc. So it increases the execution time of the test suite. As example :- test1 takes 1 min and test5 takes 5 mins then those threads which finished the tests already still wait until test5 fininsh. After that only another set of 5 threads start.

But in the cucumber.api.cli.Main --threads 5, in this case the moment thread finish it picks the next test. so execution time is quicker for test suite.

Anyone using any other library which does everything but execution time is faster?

asinha
  • 337
  • 1
  • 6
  • 24
  • You may want to spend some time on improving the reliability of the flakey parts instead. It's much less of a hassle in the long run. – M.P. Korstanje Dec 24 '21 at 18:10
  • sometimes env might give intermittent instability and 1-2 tests might fail. Thats the reason rerun concept is there in different test frameworks. So my objective is if anyone has used or using any such library which would cover all these things mentioned in the original question. – asinha Dec 27 '21 at 13:07
  • I'm aware. I'm one of the core contributors to Cucumber. Rerunning tests is impossible to do perfectly without writing your own code. – M.P. Korstanje Dec 27 '21 at 13:32
  • https://github.com/prashant-ramcharan/courgette-jvm this library does everything the only problem is it does not use the reusefork. so it waits for all threads to finish which is time consuming. I was working with Prashant ( the developer of this library ) for few years. So thought if anyone else might be using their own custom code to handle these or any custom library . Seems there is not many libraries available – asinha Dec 29 '21 at 13:03

0 Answers0