karate

How to run separate feature file to clean up data POST execution in parallel runner


Image

I have created a clean up feature file (j_cleanup.feature) to query all the data that has been inserted and initiate API DELETE operations to clean them up AFTER the all feature files are executed.

Question:

Within the parallel runner class above, would this j_cleanup.feature file be executed in parallel with the main runner (all feature files under tonyt package) OR would it be executed AFTER?

I am worried that it may cause a deadlock situation where one process attempts to post data vs one wants to delete them. Please guide me if the below code is good enough to invoke j_cleanup.feature as post-processing task.

Thank you.


Solution

  • For this Java code it will be after. The call to .parallel() will block until all tests are run.

    Also refer this: https://stackoverflow.com/a/60944060/143475