When getting started with any type of QA testing, it’s always helpful to have test cases. But what are QA test cases, and why are they important? Read on to learn how they work, and how to write test cases.

What Should A Test Case Contain?

Well written test cases should contain the following aspects:

  • Title or ID (ie: “LOG-1”)
  • An association with a section of the site/app (ie: “Login”)
  • Notes on any setup needed (for example, “access to a staging build” or “admin credentials”)
  • Steps to follow to perform the test
  • Expected results

Why Are Test Cases Important?

Having a suite of test cases makes the whole Agile QA process more efficient. It can also show new colleagues how the app or site is supposed to work — right down to even the smallest details. What Are QA Test Cases (picture depicts two peoples' hands, white and black, holding iPhones with generic graphs on them)

Most importantly, having test cases that all team members can review ensures two crucial details:

  1. There are no gaps in test coverage. Let’s say that QA hasn’t been informed about a particular feature or requirement. By reviewing test cases, other team members can immediately determine if there’s missing test coverage.
  2. Everyone is on the same page. Sometimes there are misunderstandings about how a feature is supposed to work. When a developer or product manager looks at QA’s test cases, any misconceptions can be identified quickly.

Test Cases For Manual Testing

Manual testing is essential for the quality of a mobile app or website. In the beginning of the software development life cycle, manual QA testers often interact with the product owner and project manager, and collaborate with developers. This teamwork ensures that the product is developed with the best possible user experience. The result of that communication is manifested in the test cases. This is part of why test cases are invaluable for Engineering.

Writing Test Cases (picture depicts a white desk with a blank iPhone, notebook, pencil, pair of glasses, and Macbook laptop)Picture a team with one skilled QA engineer (we’ll call the tester Shawn Carter) and a 3-week sprint. Let’s say that the QA engineer has some notes about feature requirements, but no formal test cases. Week two of the sprint rolls around, and Shawn has a family emergency and needs to be out for the next month. Hopefully, there will be a well-trained backup QA engineer, plus access to Shawn’s notebook. But what’s the chance that the sprint is going to be tested completely and rigorously? Maybe better than if there were no notes and no backup, but this scenario would be challenging for even the best QA engineer.

Now imagine if the above scenario happened and Shawn Carter had well-defined test cases. These would include all of the necessary setup information, steps to follow, and expected results. You could breathe a sigh of relief knowing that the sprint could go on (much like Celine Dion’s heart). Test cases can be the difference between smooth sailing and total disaster.

(Teams can also minimize concerns with a QA lead being out by doing collaborative QA job sharing.)

Test Cases for Automation

Typically, manual QA testers will be the ones writing the test cases. The automation tester then has the responsibility of translating the test cases into automated tests. This can be done with Appium, Selenium WebDriver, JUnit, QTP, JMeter, and/or a suite of other tools.App Test Cases (picture depicts an iPhone with generic apps on the home screen)

Remember how manual QA collaborated with project/product managers and developers earlier on? The benefits of all that research make writing automated tests faster, easier, and without a need for going back to square one. Clarifying questions may come up, but redundancy will be decreased big-time. The result? A functional automated test suite that lets manual testers focus on new features — instead of spending days doing regression testing.

Sample Test Cases and Template for a Login Page

Let’s get to the good stuff! Here are some sample test cases, using a template for a login page or screen. These test cases aren’t exhaustive, but they’re good simple examples of what test cases look like.

(If you’re viewing on a mobile device, we recommend using landscape mode.)

IDRequirementSetupStepsExpected Result
LOG-1Login/Sign up menu button should functionAccess to staging iOS/Android builds + cell service or internet connection1. Open app
2. Tap hamburger menu icon in top left
3. Tap "Login/Sign Up" button
User should be directed to login/sign up screen within 2 seconds.
LOG-2When logged in, tapping "Logout" in left nav menu should log the user outAccess to staging iOS/Android builds, cell service or internet connection, and valid account credentials1. Open app
2. Tap hamburger menu icon in top left
3. Tap "Login/Sign Up" button
4. Log in using valid account credentials
5. Tap hamburger menu icon in top left
6. Tap "Logout"
User should be logged out, and directed to home screen within 2 seconds.
LOG-3If user enters incorrect password, relevant error message should appearAccess to staging iOS/Android builds + cell service or internet connection1. Open app
2. Tap hamburger menu icon in top left
3. Tap "Login/Sign Up" button
4. Enter an email in "Email" field
5. Enter a password that is not valid
6. Tap "Login" button
Relevant error message should appear within 2 seconds, informing the user that the password was not valid.
LOG-4When user enters valid email address and password and taps Login, they should be logged in and taken to Home screenAccess to staging iOS/Android builds, cell service or internet connection, and valid account credentials1. Open app
2. Tap hamburger menu icon in top left
3. Tap "Login/Sign Up" button
4. Log in using valid account credentials
User should be directed to home screen as a logged in user within 2 seconds.
LOG-5Email address field should not be case sensitiveAccess to staging iOS/Android builds, cell service or internet connection, and valid account credentials1. Open app
2. Tap hamburger menu icon in top left
3. Tap "Login/Sign Up" button
4. In the email field, enter a valid registered email address, but use capital letters for some of the characters (for example, teST@tesTING.cOM)
5. Enter valid password
6. Tap "Login"
User should be directed to home screen as a logged in user within 2 seconds.
LOG-6Password field should be case sensitiveAccess to staging iOS/Android builds + cell service or internet connection1. Open app
2. Tap hamburger menu icon in top left
3. Tap "Login/Sign Up" button
4. Enter an email in "Email" field
5. Enter a password that would be valid, but use capital letters for characters that should have been lowercase, and lowercase letters for characters that should have been caps
6. Tap "Login"
Relevant error message should appear within 2 seconds, informing the user that the password was not valid.

What Are QA Test Cases?

Test cases are a great way to make sure that the mobile app or website has the test coverage it needs. Test cases increase efficiency, and can even help automated testing. And while it’s always best to have seasoned QA engineers do the testing, test cases also allow backup QA to jump in and help out in a pinch.

Need Test Cases?

Looking for QA testers to write test cases for your app or site (or to test it)? Check out our QA testing services.