How to design Test Case

Test case definition

“A test case has components that describe an input, action or event and an expected response, to determine if a feature of an application is working correctly.” Definition by Glossary.

Simply put, a test case is a scenario made up of a sequence of steps and condition or variables, where test input are provided and the program is run using those input, to see how it performs. An expected result is outlined and the actual result is compared to it. Certain working conditions are also present in the test case, to see how the program handles the conditions.

Every requirement or objective that the program is expected to achieve, needs at least one test case. Realistically, it definitely takes more than one test case to determine the true functionality of the application being tested. The mechanism used to judge the result of the test case.

Test cases, at root level, are used to measure how a program handles errors or tricky situations such as if one input is incorrect or if both input are incorrect. They are also expected to expose hidden logical errors in the program’s code, which have gone undetected.

The functionality of the web sites

In testing the functionality of the web sites, the following should be tested:
Links
a. Internal Links
b. External Links
c. Mail Links
d. Broken Links

Forms
a. Field validation
b. Error message for wrong input
c. Optional and Mandatory fields

Database
Testing will be done on the database integrity.

Cookies
Test will be done on the client system side, on the temporary internet files.

Performance:
Performance testing can be applied to understand the web site’s scalability, or to benchmark the performance in the environment.
a. Connection Speed
b. Load
c. Stress

Usability:
Usability testing is the process by which the human-computer interaction characteristics of a system are measured, and weaknesses are identified for correction.
a. Ease of learning
b. Navigation
c. Subjective user satisfaction
d. General appearance

Server Side Interface:
In web testing the server side interface should be tested. This is done by verifying that communication is done properly. Compatibility of server with software, hardware, network and database should be tested.

Client Side Compatibility:
The client side compatibility is also tested in various platforms, using various browsers.

Security:
The primary reason for testing the security of a web is to identify potential vulnerabilities and subsequently repair them.
a. Network Scanning
b. Password Cracking
c. Log Review
d. Integrity Checkers
e. Virus Detection


The Premise

1. Writing effective test case is a skill and that can be achieved by some experience and in-depth study of the application on which test cases are being written.

2. Test cases should be written by a team member who understands the function or technology being tested and each test case should be submitted for peer review.

3. Communicate with PM and Dev, ask questions.

4. Learn framework and know clear logic.

Metrics

Test case coverage metrics exist. The section contains a summary of fundamental points, dimension, and measures (Conditions: Pass, fail and error).

E.g. Design a matrix to cover the process for sending notifications of mobile aware in previous release
Notification Type User Role Message Content Map Path Alert Types Features
Emergency GIS Org leader Title&Body No Zip Code Disabled GISNot -1 -3 -4 -6 -8 -10 -11 -12
EMNot -1 -2 -3
Standard GIS Org leader Pre-Recorded No Address Enabled GISNot -2 -5 -8 -10 -11
Emergency NON-GIS Org leader Pre-Recorded n/a n/a n/a NoGISNot -1 -5 -7 -8 -10 -11 -12
Standard NON-GIS Group leader Title&Body n/a n/a n/a NOGISot -2 -3 -4 -6 -7 -8 -10 -11
Both Emergency GIS &Emergency NON-GIS Org leader Title&Body Map Zip Code Disabled Summary
Both Standard GIS &Standard NON-GIS Org leader Pre-Recorded Map Address Enabled Summary

Extract one Notification Type such as Emergency GIS, consider conditions: pass, fail and error.
1. Send notification of Emergency GIS successfully
2. Failed to send notification of Emergency GIS
3. Warning messages for every field, List Message Content as an example.
a. Input nothing in Message Content, there should be a warning message such as Message Content is required.
b. Length limited
c. Character, number and special characters
d. Boundary value
e. Copy/paste
f. Navigate to other pages after accessing message contact, then backing, to check message contact

Design test cases using testlink

A variety of approaches to document test cases: the range from developing detailed, comprehensive steps to write general descriptions. In detailed test cases, the steps describe exactly how to perform the test. In descriptive test cases, the tester decides at the time of the test how to perform the test and what data to use.

Title: Short and according to a naming convention that enables you or your QA team to know generally what the test case covers. Mark high priority case for picking out regression test case.
Summary: Brief idea about case.
Precondition: Condition that should be fulfilled before the test is performed.
Step Action: Clear steps to execute the test case for someone not familiar with the application. For instance, ‘Click XX button, Enter number’.
Expected Result: What result it should be.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326190481&siteId=291194637