| || |
testcase vs test scenario
I have below functionality which can be tested with below combinations.
Jira1 Add new user name
-with blank fields, hit save
-with partially blank fields, hit save
-all field values, hit save
-duplicate user name
Should i write each combination as sepereate testcase?
Should i write all these combinations as steps under single testcases?
You could create a matrix with all the combos to ensure you hit each scenario instead of a test case. But for those steps, I would just do 1 test case if that's how you want to go. Just my opinion.
At my last company, I implemented a system of Data Driven test cases. I'll write a basic scenario, then for inputs I reference an external shared google doc.
For Example, I'll create a google doc that has a sheet called, Problematic Car Models, which is a sheet that contains a list of problematic car models we've encountered in the past. Then for each test case that has input of Car Model, I give it this sheet as the data source, and have instructions in the test case to repeat test case for models in the Problematic Car Models sheet.
Another example, I created a sheet called Discount business rules by State. Which contains a table with the state, whether or not certain incentive types are displayed for states. Then all test cases that deal with testing incentives will reference this sheet.
This way the sheet is shared and can be maintain, while multiple test cases can reference it without needing to be updated as new data and business requirements change.
I feel 1 test case should be good for testing the different Data input values. This will also help you during regression testing for example suppose you found a bug for a test input having 'blank input field - hit save' while retesting this defect we can also regress around the defect thus ensuring that a fix in one place has not impacted other input data values.
I generally prefer to have separate test cases. However, if the the defect doesn't escape than even single test case is ok. It should be up to you or the way it is done in your project.
Originally Posted by pandeche
These are all separate Use Case paths, and you have both negative (expect to fail) and positive Use cases here.
That said they should be documented, separately, as such in a Requirements document that can be cross referenced at the individual Use Case path level.
When they are correctly documented there is no issue with writing a 'test case' that verifies multiple Requirements (the same is true for automating these tests) as long as you can demonstrate traceability and full Requirements coverage. The name of the game is requirements validation and the more efficient you are at doing this the better.
It can be told from your mentioned test case:
- the first two combinations (steps) might have the same expected result, so I suggest they can be included in the same test case
- the 3rd and 4th steps would lead to 2 different expected results, so they should be tested by 2 distinct test cases.
In general there isn't any best practice that you must follow. It depends on your practical experiences, the context of your being tested product/application and the expected results that you decide to write up either a series of test case or a common test case for this particular test
Hope that helps
a member of QASymphony. www.qasymphony.com
qTrace - Screen Capture Software with Intelligence
qTest - Cloud-based Test Management
As said by Tatashine you can write a test cases for first two combinations as same and then write a separate test cases for third and fourth it should be effective.
For the above scenario, it seems, the scenario is more closer towards "Validation Testing" for the input fields.
You are intended to test whether it shows proper alert message when you are not providing the required data value in the input field and it should accept successfully input value when you provide the correct set of required data value.
So I would prefer to have one test case for the validation testing for the all input fields having separate step for each of the above scenarios in the same.
Application have a quality based upon the number of test cases.