Skip to main content

test_cases

Creates, updates, deletes, gets or lists a test_cases resource.

Overview

Nametest_cases
TypeResource
Idfirebase.toolresults.test_cases

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
elapsedTimeobjectThe elapsed run time of the test case. Required. (id: Duration)
endTimeobjectThe end time of the test case. (id: Timestamp)
skippedMessagestringWhy the test case was skipped. Present only for skipped test case
stackTracesarrayThe stack trace details if the test case failed or encountered an error. The maximum size of the stack traces is 100KiB, beyond which the stack track will be truncated. Zero if the test case passed.
startTimeobjectThe start time of the test case. (id: Timestamp)
statusstringThe status of the test case. Required.
testCaseIdstringA unique identifier within a Step for this Test Case.
testCaseReferenceobjectTest case reference, e.g. name, class name and test suite name. Required. (id: TestCaseReference)
toolOutputsarrayReferences to opaque files of any format output by the tool execution. @OutputOnly

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectId, historyId, executionId, stepId, testCaseIdGets details of a Test Case for a Step. Experimental test cases API. Still in active development. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing Test Case does not exist
listselectprojectId, historyId, executionId, stepIdpageToken, pageSizeLists Test Cases attached to a Step. Experimental test cases API. Still in active development. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing Step does not exist

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
executionIdstring
historyIdstring
projectIdstring
stepIdstring
testCaseIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets details of a Test Case for a Step. Experimental test cases API. Still in active development. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing Test Case does not exist

SELECT
elapsedTime,
endTime,
skippedMessage,
stackTraces,
startTime,
status,
testCaseId,
testCaseReference,
toolOutputs
FROM firebase.toolresults.test_cases
WHERE projectId = '{{ projectId }}' -- required
AND historyId = '{{ historyId }}' -- required
AND executionId = '{{ executionId }}' -- required
AND stepId = '{{ stepId }}' -- required
AND testCaseId = '{{ testCaseId }}' -- required;