1

For example, I want write test case to load the page when user clicks on add button. There are two way on how I can view the add button:

  • Step 1 : View Dashboard
  • Step 2 : Click on Add Button

or

  • Step 1: View User module
  • Step 2: Click on Add Button

Do I need to write two different test cases, or one would be fine?

1
  • Probably you don't want to "write test case to load the page when user clicks on add button". You probably want to simulate some user flows, which by current design includes click in the add button. Which user flows do you want to simulate, in terms of your domain? Nov 19, 2022 at 9:21

2 Answers 2

4

To verify that the Add Button, when clicked, navigates to the correct page/form, you would need to check both the locations of the button.

Although, the buttons would have the same label and design, they are 2 separate web elements located in 2 different pages.

Unless the buttons are created dynamically using the same function/method (piece of code) in the back-end, chances are one or both of them may have incorrect/different link.

Considering this, it would be nice to check the buttons works the same in both locations.

For that,

  1. you can run the checks for both locations in a single test case, first by navigating to the button via the Dashboard, then in the same case navigate to the View User Module to check the button.

Or

  1. You can also write 2 separate test cases to verify the buttons functions right in the both locations.

Personally, I would go with the first option.

0

There are multiple ways to create the testcases for such a requirement, where same page content are loading on accessing the button from two different location.

In terms of manual perspective, we can create a single testcases with detailed steps to covered the page loading from both the location. But this approach would not suitable in automation perspective.

Based on test automation services perspective , I would recommend to create separate testcases for each location i.e. one testcases should covered page loading from Dashboard page and another testcases should cover the page loading from User View page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.