TestRail is a test case management tool. It is used by testers, developers, and team leaders to manage, track, and organize software testing efforts. TestRail allows team members to enter test cases, organize test suites and tests plans, execute test runs, and track their results from a modern and easy-to-use web interface. This article describes the different ways of adding test cases to TestRail.
Navigating to the option to add a test case
Navigation to the "Add Test Case" functionality depends on the type of project you are working on. When creating a project, it may be as one three types (learn more here). This is how you access "Add Test Case" for each of the project types.
A single repository
- In your project, click on the Test Cases tab.
- Click on the Add Test Case button.
A single repository with baseline support
- In your project, click on the Test Suites & Cases tab.
- Click on a Test Suite.
- Click on the Add Test Case button, on Sections & Cases.
Multiple test suites to manage cases
- In your project, click on the Test Suites & Cases tab.
- Click on a Test Suite. If there isn't any Test Suite yet, create one.
- Click on the Add Test Case button, on Sections & Cases.
Adding test cases one by one
To create test cases one by one within any project, follow the steps below:
- Fill in the details related to the test case:
This way of adding a test case is practical when you want to add the Title of the test case along with other details, such as Preconditions and Steps.
Creating Test Cases from Test Templates
When creating a test case, you are asked to select a test template. These will make its fields vary to adapt to different needs. To know more read the article Test case templates.
Adding attachments
IYou can add attachments to your test cases within any project either when you create a new test case, or when you edit an already created test case.
For new test cases:
- In the Add Test Case screen, click the big plus (+) icon on the right side of the screen to add the attachment file, or simply drag and drop the file over the icon.
- In the Attach file screen, you can find a summary of all the files you have attached, with the options to add more attachments, sort / filter them, and search for the desired file.
- If you want, you can double click each attachment to open Attachment Details, showing you the file details you might find useful, like the project where the file is accessible, or the option to Delete the file if you wish, for example. Click Done to return to the previous window.
- Keep in mind that you can attach any kind of file format to your test cases, but the total file size cannot exceed 256 MB. Click Attach to finish. Your attachments will appear on the test case's right side menu.
For existing test cases:
- In your test case, click Edit.
- Click the big plus (+) icon on the right side of the screen to add the attachment file, or simply drag and drop the file over the icon.
- Follow the same procedure (steps 2 to 4) as above, in attaching files for new test cases, as the steps are exactly the same when attaching files.
For more information about managing attachments for your TestRail instance, see Managing Attachments.
Adding test cases with a quick outline
To quickly outline your test cases, you can follow the steps below:
- Depending on your project type (as described above), click on the Test Cases, or Test Suites & Cases tab and then select a Test Suite.
- On the test cases repository page, you can quickly add one or more test cases without filling all test case fields by clicking the Add Case link at the bottom left of each section, as shown in the screenshot below.
- Enter the Case Title and click on the green icon or simply press enter, as shown in the screenshot below.
This helps you quickly outline your testing scenarios and get a good overview of the overall test case landscape without slowing down to add all test details simultaneously.
Other methods for adding test cases
- Via API: The TestRail API is a powerful mechanism to automate interaction with multiple test entities. It is possible to create a new test case, for example, from your automated test suite, via the add_case endpoint.
-
Importing XML or CSV files: In case you have test cases already designed in a different tool (e.g., an Excel spreadsheet), you can use a CSV or XML file format to import those test cases to TestRail. You can know more about how to use the import functionalities by looking at the articles below: