cancel
Showing results for 
Search instead for 
Did you mean: 

How to run a particular test step from test suite tear down script

Highlighted
Contributor

How to run a particular test step from test suite tear down script

Hi All,

How to run a particular test step from test suite tear down script.

EX:

TestSuite1

     -TestCase1

         -Restreqstep1

         -Restreqstep2

I'm trying to run Restreqstep2 from TestSuite1 tear down script, not whole TestCase1. But I couldn't find a way, did any one have idea?

 

Thanks in advance!

7 REPLIES 7
Highlighted
Contributor

Re: How to run a particular test step from test suite tear down script

@sonya_m do you have  any Idea on this please?

 

Thanks,

Prathap

Highlighted
Community Hero

Re: How to run a particular test step from test suite tear down script

What have you tried?
What is the use case?


Regards,
Rao.
Highlighted
Contributor

Re: How to run a particular test step from test suite tear down script

@nmrao 

EX

TestProject

   ::TestSuite1

         -TestCase1

            -Restreqstep1

            -Restreqstep2

How  to run Restreqstep2 from TestSuite1 tear down script, not whole TestCase1.

Highlighted
Community Hero

Re: How to run a particular test step from test suite tear down script

There is no answers to the previous request while the above is no new information from the original post.


Regards,
Rao.
Highlighted
Contributor

Re: How to run a particular test step from test suite tear down script

@nmrao 

 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. 

 

I hope it answer your queries.

Thanks!

 

 

 

Highlighted
Community Hero

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.



Regards,
Rao.
Highlighted
Contributor

Re: How to run a particular test step from test suite tear down script

@nmrao 

 

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.

 

Thanks!

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors