Discussion:
[Cucumber] [TestNG cucumber selenium] different before and after methods for specific scenarios
(too old to reply)
c***@gmail.com
2018-01-18 21:26:05 UTC
Permalink
I am using a framework that consists of testNG, selenium webdriver, POM,
and cucumber. I am looking for a way to have separate before and after
methods for two different kinds of tests scenarios. The reason I need two
different before and after methods is that for a bunch of my scenarios, I
do not need a new browser instance for each scenario, I can just clear the
fields and clear the cache and run the next scenario. reusing the same
open browser window would save a lot of time when running the tests.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'sridevi ennam' via Cukes
2018-01-18 21:53:04 UTC
Permalink
Use before and after methods with specific tags

For eg @Before(“@tag1”)
@Before(“@tag2”)

First one runs before all the scenarios that tagged as tag1, second one runs before all the scenarios that tagged as tag2.
After methods also work in similar way.

Sent from my iPhone
I am using a framework that consists of testNG, selenium webdriver, POM, and cucumber. I am looking for a way to have separate before and after methods for two different kinds of tests scenarios. The reason I need two different before and after methods is that for a bunch of my scenarios, I do not need a new browser instance for each scenario, I can just clear the fields and clear the cache and run the next scenario. reusing the same open browser window would save a lot of time when running the tests.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
For more options, visit https://groups.google.com/d/optout.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...