Adding test cases

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

  1. In your project, click on Test Cases.
  2. Click on the Add Test Case button.

    Adding tc ss1.png

A single repository with baseline support

  1. In your project, click on Test Suites & Cases.
  2. Click on a Test Suite.

    Adding tc ss2.png

  3. Click on the Add Test Case button, on Sections & Cases.

    Adding tc ss3.png

Multiple test suites to manage cases

  1. In your project, click on Test Suites & Cases.
  2. Click on a Test Suite. If there isn't any Test Suite yet, create one.

    Adding tc ss4.png

  3. Click on the Add Test Case button, on Sections & Cases.

    Adding tc ss5.png

Adding test cases one by one

To create test cases one by one within any project, follow the steps below:

  1. Fill in the details related to the test case:

    Adding tc ss6.png

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

You 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:

  1. In the Add Test Case screen, click the plus (+) icon on the left side of the screen to add the attachment file, or simply drag and drop the file over the icon.

    Adding tc ss7.png

  2. 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.

    Adding tc ss8.png

  3. 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.



  4. 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:

  1. In your test case, click Edit.
  2. Click the plus (+) icon on the left side of the screen to add the attachment file, or simply drag and drop the file over the icon.

    Adding tc ss10.png

  3. 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.

    Adding tc ss11.png

  • Enter the Case Title and click on the green icon or simply press enter, as shown in the screenshot below.

    Adding tc ss12.png

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:

Was this article helpful?
42 out of 79 found this helpful