Unstable runs of Test Cases

2 weeks worth of Test Results for the same Test Case revealed inconsistent execution of Test Cases resulting in false failures. Test results may be reported as “Passed” on some days and “Failed” on other days. Is there a recommended solution design to execute the testing of 20 applications in a single Test Case?

I think it would be considered bad practice to do 20 applications in a single test case. I wouldnt even test a single application entirely in a single test case.

A test case should be seen as a unit test, and you are doing maybe 100 units (assuming 5 units per 20 applications) in a test case.

Why are you trying to do so much in one place instead of separating them?

Because I am conducting the same test checks (checking if the OK button works) on 20 forms in the same application. Building 20 separate test cases will not be ideal as it requires much development work. In my current test case, I’m using a for loop to complete the 20 test checks, by making the form url dynamic. Is there a recommended solution design for such repetitive test cases?

@Renee_Lee

Build only one…but make the url as input for the test case and send the url as you need…so that same textcase xaml can be used across with different values

Cheers

By making an url input, do you mean whenever the test case is triggered, the user will be prompted to key in the url?

My test case code, is currently reading off a config file storing all the urls. The for loop will update the url value dynamically

@Renee_Lee

You have multiple options on how you would provide data or input url to it

Cheers

So for the solution design of my test case, I’ll have to create 20 test cases. Each for 1 application form that I am testing, even though the only difference for each form is the url input? Is this an ineffective approach to future maintenance? Meaning if there 1 button change in the form, I’ll have to update the library component in Studio, and go into each test cases to update the button component?

@Renee_Lee

It would be one data driven test case and add all the urls into excel or test data queue etc based on what way you choose…please check the link provided above

Ideal would be creating separate though…if tomorrow if applications have different buttons then you anyways need to create

The above solution works with single test case where each have their own url alone

Cheers

Anil is for sure pointing you in the correct direction here.
Its called ‘Data Driven Testing’. You can put the 20 urls into an Excel file, and then import that into the test case. It then converts it to a JSON which gets stored in the project.

When you run the test case you can then choose which of the 20 ‘variations’ you want to run and can run them all at once if you choose.

These will allow you to evaluate which URLs pass and which URLs fail.

So its still only one test case, since you are apparently testing the same thing, but you can use as many different URLs as you like