TestProject Forum

How to repeat only few steps with in the test

I have a requirement, After log in I have to search a product and get the text of that displayed product . I need to repeat these two steps for different products with out logging out. I have added a data source, it is working with every time logout and login back to the application

But , I am looking for the option to loop through only those two steps with in my scenarios with out logout

hello @sasikala.pittala
You can separate the test into two tests.
1.Login Test
2.get the text of the displayed product

Then use Job where you will only set for the second test (get the text of the displayed product) with Data Source.
Whatever happens in this situation, there will be login once and then all the iterations of the get text.
This is how you attach the data source to the job:
image

Side note, to make your steps a separate test You can group them.
for example:

Choose the steps

And click Group step into a Test and give it a name

Now you can find this test in your project.
Let me know if this helped you.