Shared steps and action recording for shared steps

Shared steps are common test steps that are created and shared across multiple manual tests, to avoid duplication of test steps and to maintain them at one place. For example, the employee maintenance application might have multiple test cases such as testing absence details, emergency contact details, payment details, and a few other tests, for which the tester has to enter the employee details for every test case run. To avoid this repetation and to save time and effort, the particular test step can be made as a shared step which can then be used in all the required places.

Creating shared steps

Creating shared steps is just like creating a normal test step, but the Test Manager provides a different option to create the shared step within the test case creation window. The following screenshot shows the Test Suite with two test cases, with both having the same first step: to open the browser and to go to the employee list page.

Creating shared steps

The shared step is just another test step in the test case, but of the type shared. Choose the test step as a shared step while adding steps to a test case. For example, the first test case for employee details has several steps. One of these steps is opening the browser and loading the first list page for the application, which is common for all pages. This can be made as a shared step. The test case creation window has the option to create test steps. Along with this, there are two more options: Insert shared steps and Create shared steps and insert at the current insertion point.

Creating shared steps

The Create shared steps and insert at the current insertion point option asks for a shared step's name and then replaces the selected steps with the new name. The shared step will retain the details of the steps that got replaced with the shared name. In the previous screenshot, Browse to the Employee Details Application is a shared step that can be re-used in numerous other tests.

To modify or update the shared step, use the option Open shared steps from the toolbar. This opens a new window that contains the details of the shared test step, and the editing process is the same as as any other test step.

Keep adding the required test steps and update the properties, but keep in mind that this is a common test step that is going to be shared by multiple test cases.

Now the shared step is created and is ready to be re-used in multiple test cases. Open the second test case which requires the same test step and highlight the step above which the shared step is required. Choose the option Insert shared steps. This opens the new window to filter and search for a particular shared step from the list. Select the required one and click on Add shared step to get that added to the test case. The shared step name gets added to the test case and the test step is re-used when the Test Runs.

Creating shared steps

Action recording for shared steps

Shared step actions are recorded along with the rest of the test case actions. Run the Test Suite or the test case from the Test Manager. Test Runner will load the test steps including the shared step (which is a part of the test). Choose the Create action recording option and then start the test as it was done before in the regular test steps scenario.

The shared step will have two additional steps: one is to start the shared test and the other is to start the test and record it. Choose the second option and enter all the details so that it gets recorded as part of the shared test.

After entering all the details, mark the test as passed and end the shared test recording using the option below the test step. Complete the remaining steps and save the Test Result.

Now, the shared step as well as the shared step recording are ready. This action recording will be available to all the tests that contain this shared test.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.165.70