Skip to content

TestObj

parkd126 edited this page Dec 26, 2018 · 6 revisions

Overview

A run consists of individual tests for each case that you add. By default, each test has one of five different statuses that are signaled in TestRail by specific colors. You can add a test result and change the status of a test either by clicking the Add Result button on the test page, or by changing it directly on the run page.

This data type encapsulates all the information contained in a test object instance.

Fields

Name Type Description Request Methods
assignedToId Int The ID of the user the test is assigned to getTest, getTests
caseId Int The ID of the related test case getTest, getTests
estimate Timespan The estimate of the related test case, e.g. "30s" or "1m 45s" getTest, getTests
estimateForecast Timespan The estimate forecast of the related test case, e.g. "30s" or "1m 45s" getTest, getTests
id Int The unique ID of the test getTest, getTests
milestoneId Int The ID of the milestone that is linked to the test case getTest, getTests
priorityId Int The ID of the priority that is linked to the test case getTest, getTests
refs String A comma-separated list of references/requirements that are linked to the test case getTest, getTests
runId Int The ID of the test run the test belongs to getTest, getTests
statusId Int The ID of the current status of the test getTest, getTests
title String The title of the related test case getTest, getTests
typeId Int The ID of the test case type that is linked to the test case getTest, getTests
templateId Int The ID of the template (field layout) the test case uses (requires TestRail 5.2 or later) getTest, getTests
customAutomationType String Custom field for synchronizing TestRail suites with Ranorex. See more getTest, getTests
customExpected String The expected result after executing the test case. getTest, getTests
customPreconds String The preconditions of this test case. Reference other test cases with [C#] (e.g. [C17]). getTest, getTests
customStepsSeparated See more List<Step> The required steps to execute the test case. getTest, getTests
customSteps String The required steps to execute the test case. getTest, getTests
customMission String A high-level overview of what to test and which areas to cover, usually just 1-2 sentences. getTest, getTests
customGoals String A detailed list of goals to cover as part of the exploratory sessions. getTest, getTests

Methods

GET Requests:


1. getTest

Description:

Returns an existing test.

Parameters:
Name Type Description Required
testId Int The ID of the test Yes
Returns:
Example:
val someTestId = 1
val testObjFoo = TestObj().getTest(someTestId)

 

2. getTests

Description:

Returns a list of tests for a test run.

Parameters:
Name Type Description Required
runId Int The ID of the test run Yes
statusId List<Int> A comma-separated list of status IDs to filter by No
Returns:
Example:
val someRunId = 1
val actualTestObjList = TestObj().getTests(someRunId)

 

Clone this wiki locally