Can any one help me for this scenario. I have 50 test cases and added into one test suit .my goal is that i have to write one more @BeforetestCase listener ,that has to execute only for 9 test cases and for remaining 41 test-cases it should not execute .How can i handle this ? or any alternative is there ? Please reply. thanks in advance
I think the scope of Test Case listener is entire Test Suite, so we should handle them in 2 different test suites. So far, I think about 2 solutions for this issue:
1 - Create Setup/Teardown function for each Test Suite. These Setup/Teardown functions will be executed before/after each Test case’s execution.
This is a most suitable solution to handle the case. Unfortunately, this feature still in our backlog for next releases.
2 - Create a common Test case storing all behavior of the listener function you want to created. Then use Calling test case built-in keyword to add it into those 9 test cases.
Okay Thanks for your suggestion, let me try once with above solutions