When creating test cases in TestRail, users can use templates to ensure consistency and efficiency in their testing efforts. Templates provide a pre-defined format for documenting test cases, making it easier to create, execute, and analyze tests. Once a template is created, it can be reused across different projects or test suites, making it a powerful tool for maintaining consistency and efficiency in the testing process.
TestRail provides four types of default templates for creating test cases, which we will dissect on this article.
- Test Case (Text)
- Test Case (Steps)
- Exploratory Session
- Behaviour Driven Development
Test case templates are flexible and customizable. You can create your own custom test case templates, or modify the current templates, by going to the Administration > Customizations > Templates area.
Test Case (Text)
The Text template allows users to describe the steps testers should take to test a given case more fluidly. Because of its flexibility, this template is very useful for many teams.
Under Preconditions, users can add the setup or configuration required for a successful execution, e.g., data files, hardware, security access, OS, browser, previous steps, or other prerequisites.
Under Steps, users can describe the desired functionality or necessary actions To complete the test. Users can describe the steps in sentences or use bulleted or numbered lists like
- Enter Email Address
- Enter the Wrong Password
- Click “Sign in”
The Expected Result is how the software should respond after the test Steps are correctly executed. The tester will check the Expected Result information against actual results to assign a status (pass, fail, blocked, etc.) to the test.
You can also enrich your test case by adding images or other types of attachments, adding hyperlinks, referencing other test cases, and adding tables.
Test Case (Steps)
The Steps template is similar to the Text template, but with individual steps with expected results for each. Separated steps can give more structure, visibility, and traceability because you can add individual result statuses to each step of your test, as well as links to defects, requirements, or other external entities for each step.
With the Steps template, you will add steps individually as needed. To add the first step, choose Add the first step or Add Step.
For each Step, you can add a Description of what you need to test in that step, any Additional step information, and the Expected result.
By default, only the Description and Expected Result fields are available for each step. To enable Additional step information and other customizations for separated steps, go to Administration > Customizations > Case Fields and edit the Steps (steps_separated) fields. Additional options can be enabled by editing the Projects section.
You can change the step order, delete or add steps, and even import steps from your shared steps library using the quick action icons highlighted on the right.
Exploratory Session
Exploratory testing refers to a type of testing approach where testers actively and dynamically test an application or system without relying solely on predefined test cases. In an exploratory testing session, testers actively explore the application, identify defects, and provide feedback based on their experience and intuition.
The Exploratory Session template uses text fields where you can define your Mission and Goals, which will guide you through your exploratory testing session.
The Mission is the starting point of the exploratory test. It can be a brief description of the user journey or area that should be the focus of the exploratory session (e.g.: shopping cart checkout). The mission can be defined as a high-level overview of what to test and which areas to cover, usually just 1-2 sentences.
Under Goals, you can add a list of checkpoints to be covered in the session, desired outcomes, or considerations to keep in mind, like:
- What do you expect to find?
- Are you looking for all possible improvements or only bugs?
- Did the functionality solve the problem in such a way that an end user would find it valuable?
- Did processes seem smooth and self-explanatory, or were there confusing flows or interactions?
Behaviour Driven Development
This template allows you to design and execute your BDD scenarios directly within TestRail. In this template, users can define the tests as scenarios. Scenarios in BDD typically follow the Given-When-Then (GWT) format.
For more details on how to fully leverage all BDD functionality, please refer to BDD with TestRail.