Software Testing
What is Adhoc Testing? Types with Example
Ad hoc Testing Ad hoc Testing is an informal or unstructured software testing type that aims to...
A TEST CASE is a set of actions executed to verify a particular feature or functionality of your software application. A Test Case contains test steps, test data, precondition, postcondition developed for specific test scenario to verify any requirement. The test case includes specific variables or conditions, using which a testing engineer can compare expected and actual results to determine whether a software product is functioning as per the requirements of the customer.
Test scenarios are rather vague and cover a wide range of possibilities. Testing is all about being very specific.
For a Test Scenario: Check Login Functionality there many possible test cases are:
This is nothing but a Test Case.
In this tutorial, you will learn how to write test cases in manual testing with example -
Step 1) A simple test case to explain the scenario would be
| Test Case # | Test Case Description |
|---|---|
| 1 | Check response when valid email and password is entered |
Step 2) In order to execute the test case, you would need Test Data. Adding it below
| Test Case # | Test Case Description | Test Data |
|---|---|---|
| 1 | Check response when valid email and password is entered | Email: This email address is being protected from spambots. You need JavaScript enabled to view it. Password: lNf9^Oti7^2h |
Identifying test data can be time-consuming and may sometimes require creating test data afresh. The reason it needs to be documented.
Step 3) In order to execute a test case, a tester needs to perform a specific set of actions on the AUT. This is documented as below:
| Test Case # | Test Case Description | Test Steps | Test Data |
|---|---|---|---|
| 1 | Check response when valid email and password is entered | 1) Enter Email Address 2) Enter Password 3) Click Sign in | Email: This email address is being protected from spambots. You need JavaScript enabled to view it. Password: lNf9^Oti7^2h |
Many times the Test Steps are not simple as above, hence they need documentation. Also, the author of the test case may leave the organization or go on a vacation or is sick and off duty or is very busy with other critical tasks. A recently hire may be asked to execute the test case. Documented steps will help him and also facilitate reviews by other stakeholders.
Step 4) The goal of test cases in software testing is to check behavior of the AUT for an expected result. This needs to be documented as below
| Test Case # | Test Case Description | Test Data | Expected Result |
|---|---|---|---|
| 1 | Check response when valid email and password is entered | Email: This email address is being protected from spambots. You need JavaScript enabled to view it. Password: lNf9^Oti7^2h | Login should be successful |
During test execution time, the tester will check expected results against actual results and assign a pass or fail status
| Test Case # | Test Case Description | Test Data | Expected Result | Actual Result | Pass/Fail |
|---|---|---|---|---|---|
| 1 | Check response when valid email and password is entered | Email: This email address is being protected from spambots. You need JavaScript enabled to view it. Password: lNf9^Oti7^2h | Login should be successful | Login was successful | Pass |
Step 5) That apart your test case -may have a field like, Pre - Condition which specifies things that must in place before the test can run. For our test case, a pre-condition would be to have a browser installed to have access to the site under test. A test case may also include Post - Conditions which specifies anything that applies after the test case completes. For our test case, a postcondition would be time & date of login is stored in the database
Below is a format of a standard login Test cases example.
| Test Case ID | Test Scenario | Test Steps | Test Data | Expected Results | Actual Results | Pass/Fail |
|---|---|---|---|---|---|---|
| TU01 | Check Customer Login with valid Data |
| Userid = gtupapers Password = pass99 | User should Login into an application | As Expected | Pass |
| TU02 | Check Customer Login with invalid Data |
| Userid = gtupapers Password = glass99 | User should not Login into an application | As Expected | Pass |
This entire table may be created in Word, Excel or any other Test management tool. That's all to Test Case Design
While drafting a test case to include the following information
1. Test Cases need to be simple and transparent:
Create test cases that are as simple as possible. They must be clear and concise as the author of the test case may not execute them.
Use assertive language like go to the home page, enter data, click on this and so on. This makes the understanding the test steps easy and tests execution faster.
2. Create Test Case with End User in Mind
The ultimate goal of any software project is to create test cases that meet customer requirements and is easy to use and operate. A tester must create test cases keeping in mind the end user perspective
3. Avoid test case repetition.
Do not repeat test cases. If a test case is needed for executing some other test case, call the test case by its test case id in the pre-condition column
4. Do not Assume
Do not assume functionality and features of your software application while preparing test case. Stick to the Specification Documents.
5. Ensure 100% Coverage
Make sure you write test cases to check all software requirements mentioned in the specification document. Use Traceability Matrix to ensure no functions/conditions is left untested.
6. Test Cases must be identifiable.
Name the test case id such that they are identified easily while tracking defects or identifying a software requirement at a later stage.
7. Implement Testing Techniques
It's not possible to check every possible condition in your software application. Software Testing techniques help you select a few test cases with the maximum possibility of finding a defect.
8. Self-cleaning
The test case you create must return the Test Environment to the pre-test state and should not render the test environment unusable. This is especially true for configuration testing.
9. Repeatable and self-standing
The test case should generate the same results every time no matter who tests it
10. Peer Review.
After creating test cases, get them reviewed by your colleagues. Your peers can uncover defects in your test case design, which you may easily miss.
Test management tools are the automation tools that help to manage and maintain the Test Cases. Main Features of a test case management tool are
Popular Test Management tools are: Quality Center and JIRA
Download the above Test Case Template Excel (.xls)
Ad hoc Testing Ad hoc Testing is an informal or unstructured software testing type that aims to...
What is Concurrency Testing? Concurrency Testing is defined as a testing technique to detect the...
Before we pen down more details on the type of web testing, lets quickly define Web Testing. What is...
Monkey Testing Monkey Testing is a software testing technique in which the tester enters any...
What is Performance testing? Performance testing is a type of testing for determining the speed of...
What is REST? REST stands for "REpresentational State Transfer," which is a new way of...