How to Write Test Cases
In this tutorial, we will learn how to write Test Cases for an application. Test cases should cover major functionality of the application and cover other non-functional aspects as well.
Write Test Cases
Identify the main actors and the main functionality of the application in-order to document the test cases.
Ask yourself some questions like:
- Who is going to use the System?
- What is the main intended purpose of the application for the user?
- What are the Business Goals?
- Why would the user use the System? ( Business Value)
Divide the test cases into different categories like:
Functional Test cases
- Black-box testcases( Testing without knowing the inner details of the application under test)
- White-box testcases( What’s inside the box ? Source Code perspective testcases for example JUnit testcases)
- Integration testcases( co-existence with other systems, communication with other modules or systems)
- Usability testcases( How usable is the system? System settings, Themes, GUI , Look and Feel, Ease of Use, etc)
Non Functional Test cases
- Stress testcases ( How does the system behave under stress? Inject Low memory faults, sandbox the app in low resources, etc )
- Performance testcases ( How does the system perform under abnormal conditions. Create concurrent virtual sessions, measure response times, SLAs)
- Security testcases ( How secure is the system? Inject Security Threats, etc )