How to use a smaller test as Step of bigger test in Test Studio

Let us assume a scenario that we need to automate test of a complex functionality. This complex function may be constituted of other small functions. Now all small functions are tested separately. To automate test of this bigger function we have two choices

  1. Record all steps in bigger function testing
  2. Use various smaller functional tests as a step in bigger function testing.

Test Studio provides us a feature in which we can use a functional test as step of another functional test. You can get that option in Add section of ribbon.

clip_image002

Assume we need to test CRM application. We have separately created automated test for Login functionality of application as given below,

clip_image003

And steps of this test is recorded as following

clip_image004

Next we want to record test for bigger function Add Contact in CRM. To do that let us create a test as following,

clip_image005

Now we want to use Login Test as a step in Add Contact test. To do this double click on Add Contact test to open the test. After that from Add section in ribbon select Test as Step option.

clip_image006

You will get option to choose from all the tests added in the test project. In this case there is only one test other than Add Contact Test. So select Login Test to add as step in Add Contact test.

clip_image008

After adding Login Test as step right click on the test and from context menu select Run then To here option.

clip_image010

On selecting this option Test Studio will first execute all the steps of Login Test and allow you to record further steps for Add Contact test.

In this way we can add a test as step in Test Studio to use a functional test as part of another bigger functional test. I hope you find this post useful. Thanks for reading.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.