Skip to content
parkd126 edited this page Dec 26, 2018 · 8 revisions

Overview

In TestRail, test cases are organized into test suites. A test suite is a collection of test cases and is often created for specific project modules or areas. How you organize your test suites depends on the size of your project. If you have a lot of test cases for a project module, it is recommended to further break down your test suites and create suites for specific features or functionality. Ideally, a test suite consists of 50-1000 test cases.

Fields

Name Type Description Request Methods
completedOn Timestamp The date/time when the test suite was closed (as UNIX timestamp) (added with TestRail 4.0) getSuite, getSuites
id Int The unique ID of the test suite getSuite, getSuites, updateSuite, deleteSuite
isBaseline Boolean True if the test suite is a baseline test suite and false otherwise (added with TestRail 4.0) getSuite, getSuites
isCompleted Boolean True if the test suite is marked as completed/archived and false otherwise (added with TestRail 4.0) getSuite, getSuites
isMaster Boolean True if the test suite is a master test suite and false otherwise (added with TestRail 4.0) getSuite, getSuites
projectId Int The ID of the project this test suite belongs to getSuite, getSuites, addSuite, updateSuite
url String The ID of the project this test suite belongs to getSuite, getSuites
name String The name of the test suite getSuite, getSuites, addSuite, updateSuite
description String The description of the test suite getSuite, getSuites, addSuite, updateSuite

Methods

GET Requests:


1. getSuite

Description:

Returns an existing test suite.

Parameters:
Name Type Description Required
suiteId Int The ID of the test suite Yes
Returns:
Example:
val someSuite = Suite().getSuite(suiteId = 1)

 

2. getSuites

Description:

Returns a list of test suites for a project.

Parameters:
Name Type Description Required
projectId Int The ID of the project Yes
Returns:
Example:
val someSuitesList = Suite().getSuites(projectId = 1)

 

POST Requests:


1. addSuite

Description:

Creates a new test suite.

Required Parameters:
Returns:
Example:
val someSuite = Suite(
    projectId = 1,
    name = "Some Suite Name"
)
someSuite.addSuite()

 

2. updateSuite

Description:

Updates an existing test suite (partial updates are supported, i.e. you can submit and update specific fields only).

Required Parameters:
Returns:
Example:
val someSuite = Suite(
    suiteId = 1,
    name = "Some Updated Suite Name"
)
someSuite.updateSuite()

 

3. deleteSuite

Description:

Deletes an existing test suite.

Required Parameters:
Returns:
Example:
val someSuite = Suite(
    suiteId = 1
)
someSuite.deleteSuite()