Currently, this feature is only available in the TestFirst Desktop App. |
A test case fragment is a sequence of test steps (actions with respective expected results) that can be used in multiple test cases.
Test case fragments are particularly useful when you have a specific sequence of test steps that repeat in multiple test cases. It allows to save time both on test writing and test case maintenance.
Example
Let's say we have 3 test cases that have the same three first steps:
Action | Expected result | |
1 | When I navigate to "Website" | Then "Website homepage" should be displayed |
2 | When I click on "Login" button | Then the login form should be displayed |
3 |
When I enter the correct username and password And I press "Enter" |
Then "My Account" page should be displayed |
We can add a test case fragment containing these steps and insert it into each of the three test cases, which will save us the trouble of typing out these steps or copying and pasting from one test case to another.
Additionally. if there are ever any changes to the login process, we will be able to just edit the test case fragment which will automatically be updated in every test case it is used in, saving us the trouble of going into every test case that has these steps.
Comments
0 comments
Please sign in to leave a comment.