optimusTemplate icon indicating copy to clipboard operation
optimusTemplate copied to clipboard

Ability to execute tests at Feature level instead of scenario

Open sarathsp23 opened this issue 5 years ago • 3 comments

Currently the setup and teardown is done on scenario level , which approximately takes around 1-2 mins each per scenario. In my case , say I run a test with around 20 scenarios, the actual test scenario execution takes around 5-7 mins , but another 8-10 mins goes into setup and teardown per scenario. Thats around double the actual test execution.

I have done a temporary workaround at my end by registering or de-registering the bot on feature level by adding few conditions in the starting steps.

But I was wondering if you could give this as an option, so we can reduce the execution time?

sarathsp23 avatar Jul 18 '18 08:07 sarathsp23

Hi Sarath,

Optimus runs each scenario in its own container thus reducing the flakiness but trade-off is extra time of setup and teardown. Your suggestion sounds really helpful, we will definitely take it as part of our backlog for future releases.

KrishnB avatar Jul 18 '18 10:07 KrishnB

Hi @sarathsp23 Can you share how you achieved doing the setup and tear down at the feature level. I am also facing the same issue and moreover in my case the IOS scripts doesn't execute in a suite as the webdriver agent gets installed and reinstalled after every scenario which causes the script to fail due "Xcode -Cannot create a session issue"

Jaspreet23 avatar Nov 19 '18 05:11 Jaspreet23

@Jaspreet23 I just did a dirty workaround, by not calling the register & de-register logic after every scenario. I am just calling that logic if a new feature is executed. You can do that in the StartingSteps Also for iOS to not re-install for each sceanrio, just add the capability "noReset":true in the test feed json file

sarathsp23 avatar Dec 06 '18 23:12 sarathsp23