Skip to content

Section

parkd126 edited this page Dec 26, 2018 · 7 revisions

Overview

To further organize test cases, test cases of a suite can be grouped into so-called sections. Sections are used to organize test cases into groups to make it easier for testers to identify related cases.

For example, if you use multiple test cases to verify a specific application dialog or web page, these test cases should be grouped in a section. Depending on how complex your project is and how fine-grained your test cases are, a section should ideally consist of 10-50 test cases.

Fields

Name Type Description Request Methods
depth Int The level in the section hierarchy of the test suite getSection, getSections
displayOrder Int The order in the test suite getSection, getSections
id Int The unique ID of the section getSection, getSections, updateSection, deleteSection
projectId Int The ID of the project the section is related to getSections, addSection
description String The description of the section (added with TestRail 4.0) getSection, getSections, addSection, updateSection
suiteId Int The ID of the test suite this section belongs to getSection, getSections, addSection
parentId Int The ID of the parent section in the test suite getSection, getSections, addSection
name String The name of the section getSection, getSections, addSection, updateSection

Methods

GET Requests:


1. getSection

Description:

Returns an existing section.

Parameters:
Name Type Description Required
sectionId Int The ID of the section Yes
Returns:
Example:
val someSectionId = 1
val sectionFoo = Section().getSection(someSectionId)

 

2. getSections

Description:

Returns a list of sections for a project and test suite.

Parameters:
Name Type Description Required
projectId Int The ID of the project Yes
suiteId Int The ID of the test suite No (if the project is operating in single suite mode)
Returns:
Example:
val someProjectId = 1
val sectionsListFoo = Section().getSections(someProjectId)

 

POST Requests:


1. addSection

Description:

Creates a new section.

Required Parameters:
Returns:
Example:
val someSection = Section(
    projectId = 1
)
someSection.addSection()

 

2. updateSection

Description:

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

Required Parameters:
Returns:
Example:
val someSection = Section(
    name = "API TEST Updated Section",
    id = 1
)
someSection.updateSection()

 

3. deleteSection

Description:

Deletes an existing section.

Required Parameters:
Example:
val someSection = Section(
    id = 1
)
someSection.deleteSection()