I have a REST Service(Logout), it has to execute after all test cases in that particular test suite. I can keep this step in any test case of that test suite, but it should execute only after all test cases.
FYI: I have only one test suite in that project, so it satisfy requirement if we run through test suite tear down.
I got test step by using getTestStepByName method, but after that I didn't see a way to run it.
Re: How to run a particular test step from test suite tear down script
Thumb rule is each test case should be independent.
Isn't logout to be done for each test case?
For example if some one want to run a particular case, the steps should include both login and logout steps as well part of the test so that it would run independently? Currently, this isn't the case, right?
If don't want the login, and logout steps for each test case, then alternatively use events feature to run login before test case,, and logout after the test case.
Yes, you are 100% right, I did same, I will do same, If it's regular logout like an app logout. But in my current case, it's totally different, the thumb rule we have to break here, have to execute logout service after all test cases, so that going to be either test suite tear down or project.