What is a Test Case in a Software Testing?

What is a test case and how to describe it? A test case is a clear description of the actions to be performed in order to check the operation of programs (input fields, buttons, etc.). This description contains: actions to be performed before testing – preconditions; actions to be performed for testing – steps; description of what should happen after performing actions for testing – expected result.

Obligatory attributes for filling in a Test Case Number – a unique identifier of a test case (systems such as TestRail, TestLink and similar automatically assign unique numbers to test cases). If you have thousands of test cases, then when communicating with colleagues, you will be more comfortable with the number of the test cases, rather than trying to tell them where and how to find a particular test case. The title is a brief, clear and concise description of the essence of the test case. Precautions – a description of actions to be performed or taken into account in advance, and which are not directly related to the test. Test steps – description of the sequence of actions to be performed to check. Expected result – a check, which determines what we expect to get after performing certain actions in the corresponding step. Depending on the company’s specifics, there may be additional attributes to fill: priority, functional block, program, reference to the requirement, requirement number, etc.

Rules for writing test cases

Title:

  • should be clear, concise, understandable and characterize the essence of the test case;
  • cannot contain the steps that are taken and the expected result.

Precondition:

  • may contain complete information about the state of the system or object, necessary to start the steps of the test case;
  • may contain links to information sources that need to be studied before passing the test case (instructions, description of systems …); cannot contain links to the tested resource if the information system has more than one environment (production, test, pre-production …), this information should be placed in the instructions, and the link is attached in the precondition;
  • cannot contain data for authorization, this information should be made out in the instructions and the link is attached in the precondition;
  • cannot contain the steps that are taken and the expected result, if we need to have the main page opened before performing the verification steps, then we indicate “the main page of the site is open” in the precondition; cannot contain the expected result.

Verification steps:

  • should be clear, understandable and consistent;
  • overly detailed steps should be avoided. Correct: “enter the number 12 in the field.” Wrong: “click on the number 1 on the keyboard, next click on the number 2 on the keyboard”;
  • impersonal verbs should be used. There should be no comments and explanations, if there is a need to give a mini-instruction, then we draw up the instructions in the knowledge base and refer to it in the precondition;
  • there should not be hard-written static data (logins, passwords, file names) and examples to exclude the effect of the pesticide. Each verification step should have expected results, should briefly and clearly describe the state of the system or object that occurs after the implementation of the appropriate step. There should be no excessive description.

General requirements for test cases:

  • the language for describing test cases should be understood by a wide range of users, and not by a narrow group of people;
  • the test case should be as independent as possible from other test cases and not refer to other test cases (best practice when there are no dependencies at all);
  • test cases are grouped into functional blocks according to their purpose;
  • there shouldn’t be screenshots in the test cases of functional testing, otherwise you will devote hundreds of hours to changing all screenshots in thousands of test cases when changing the interface of the program under test. Screenshots can only be added to test cases that check the display of pages and forms.

In fact, the rules are simple, but they are not so easy to follow. If you adhere to these rules, then test cases will be easily maintained, easily read, will not cause rejection and can be used by all team members in the software development process.

Example of the test cases

ID Summary Steps Expected result Failed/Passed
1 Administrator Log in (Positive) 1. Open the login page
2. Type ‘Login’ in the Name field
3. Type ‘12345’ in the Password field
4. Submit
Administrator should be logged in successfully Passed OR Failed(Before the run field should be empty or in Not Tested status)
2 Administrator Log in with Incorrect password, correct username (Negative) 1. Open the login page
2. Type ‘Login’ in the Name field
3. Type ‘11111’ in the Password field
4. Submit
Administrator should NOT be logged in. «User or Login is incorrect» message is displayed Passed OR Failed(Before the run field should be empty or in Not Tested status)
3 Administrator Log in with Correct password, Incorrect username (Negative) 1. Open the login page
2. Type ‘Login1’ in the Name field
3. Type ‘12345’ in the Password field
4. Submit
Administrator should NOT be logged in. «User or Login is incorrect» message is displayed Passed OR Failed(Before the run field should be empty or in Not Tested status)

List of test management tools that I would recommend

1. TestRail

In my opinion it’s the most popular test mangement tool to write test cases. TestRail is convenient enough, has a huge functionality. We use this tool every day at work and I wouldn’t change it to another. TestRail helps teams to manage and track their software testing activity. An intuitive web-based user interface makes it easy to create test cases, manage test suites and coordinate the entire testing process. Let us consider the advantages of this tool.

Pros:

  • Tracking the workload
  • Results filtering, sorting and grouping
  • Tracking test result
  • Personalized to-do lists
  • Major project milestones, releases and iterations
  • Team comments
  • Real-time metrics and reports
  • Test case filtration
  • Flexible user roles, groups, permissions and workflows
  • Flexible project organization
  • Mass editing of test cases
  • Estimating and tracking time

2. The HP Quality Center

he HP Quality Center is a complete integrated system for managing quality control processes at all stages of software development. The HP Quality Center includes tools for organizing and conducting testing (manual). 

  • HP Quality is divided into the following modules.
  • Management – this module is needed to register the version of the software, which needs to be tested. 
  • Requirements management – this module is designed to describe the requirements. 
  • Test Plan – this module creates test plans. Tests can be described up to the steps in which the expected system state is defined.
  • Test Lab – this module sets conditions for launching tests depending on the success of the previous ones, creates a schedule for launching tests, runs tests manually.
  • Defects management – this module is necessary for error tracking, report bug creation.

3. TestLink

TestLink is an open-source platform, it has a simple interface and technical design with no frills.
Despite the difficulties in installation, TestLink is used by many development teams and QA specialists. The life cycle starts with creating a project, adding participants and assigning roles to them. It all seems to be approximately the same as in the other similar tools

Pros:

  • Allows you to create and describe the requirements for the product
  • Creates test cases based on these requirements
  • Creates test plans
  • and much more

4. Jira + Zephyr

These two can also be considered separately, of course. For example, JIRA has a couple of solutions for test cases, but in conjunction with Zephyr we get the best bug tracker possible.
Many IT developers know JIRA mainly as a bug tracker aimed at controlling development with tasks, bugs and similar notes. Zephyr is one of many plugins for JIRA that expands its capabilities.

Some pros of Jira+Zephyr:

  • The ability to create a test plan
  • Describes test cases
  • Conduct testing
  • Creates reports
  • If the product shows wrong behavior, you can immediately create a bug

5. PractiTest

Our next member is cloud service. User can do the next things:

  • Create a test library
  • Describe test cases
  • Write the requirements for a product in development
  • Create a sample of tests, assign a tester and specify exact test dates
  • Create a bug or a task

The PractiTest can be integrated with JIRA, Pivotal tracker, Redmine. If automatic tests are carried out with Selenium or Jenkins, they can also be operated via API.


6. qTest

qTest developed by QASymphony Company. Its main purpose is to help not only testers, but the whole development team. Many qTest users emphasize a simple and friendly interface.
Among the main functions, the most noticeable are the following:

  • test plan creation
  • import/export of requirements
  • different reporting options for these requirements
  • test design – description of basic test cases
  • variable filters
  • test execution and reporting
  • bug tracker

7. Tarantula

Free Finnish tools that are easy to implement in the QA team. The pros: quite convenient to manage the test process: test cases, test runs, reports, correct structure: test case -> test suite. There are quite funny things, such as “tags” in test cases, which will allow you to find the set you need (let’s say you only need a negative test case for a certain functionality that affects THIS and THAT).


8. EasyQA

EasyQA – I’ve heard about this tool quite recently, I dug around on their website, made an account and here’s what I can say about the benefits.
Because the most systems are quite narrowly focused, it would be good to find a universal tool, but in such a way that you do not have to spend time installing plug-ins, learning the API and so on.
And so EasyQA has all the key functions:

  • creating and managing projects, regardless of the product platform
  • participant invitation and role assignment
  • test plan development
  • test case writing – structuring them by parameters
  • testing – an incredibly flexible test run with the ability to instantly create a bug
  • customizable bug tracker

In addition, EasyQA has one very important advantage – the EasyQA SDK. It is indispensable if the testing product is on Android and/or iOS. The program allows you to take screenshots, record video, create bugs and send all the listed items through your mobile device


9. TestCaselab

TestCaselab is not a very familiar tool yet, but I did some research especially for you and here’s what I found.

Some pros:

  •     project creation
  •     participants invitation
  •     roles of administrator and project manager
  •     test case creation
  •     grouping by test plan
  •     test runs usage

Much attention was paid to exporting test cases in .csv format. TestCaseLab offers its own file format for import, which is very convenient for beginners. The service can be integrated with Redmine, JIRA and Pivotal.


10. QACoverage

QACoverage is a test management platform for monitoring software lifecycle. With this tool you can:

  • describe product requirements
  •  write test cases
  •  categorize them among themselves
  •  create reports

In addition to those already listed, QACoverage has a couple more options that are worth mentioning. For example, its own bug tracker Defect Module. With this service, there is no need to integrate other systems to create tasks.
In addition, the developers have paid a lot of attention to configuring all the forms and options, creating a separate tab in the Form Builder menu. If any fields are not used in all test cases, admin can create different forms for each project.


11. TestLodge

In TestLodge, the standard set of functions beautifully correlates with the non-standard layout of buttons and general design.

Pros:

  • allows you to create a test plan
  • describe product specification
  • categorize test cases into test suites

The service allows you to customize not only the familiar fields of test cases and test runs, but also create roles, categories, priorities, select required parameters in visual settings and to export them.

Leave a Comment