1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="toolresults_v1beta3firstparty.html">Cloud Tool Results firstparty API</a> . <a href="toolresults_v1beta3firstparty.projects.html">projects</a> . <a href="toolresults_v1beta3firstparty.projects.histories.html">histories</a> . <a href="toolresults_v1beta3firstparty.projects.histories.executions.html">executions</a> . <a href="toolresults_v1beta3firstparty.projects.histories.executions.steps.html">steps</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="toolresults_v1beta3firstparty.projects.histories.executions.steps.perfMetricsSummary.html">perfMetricsSummary()</a></code> 79</p> 80<p class="firstline">Returns the perfMetricsSummary Resource.</p> 81 82<p class="toc_element"> 83 <code><a href="toolresults_v1beta3firstparty.projects.histories.executions.steps.perfSampleSeries.html">perfSampleSeries()</a></code> 84</p> 85<p class="firstline">Returns the perfSampleSeries Resource.</p> 86 87<p class="toc_element"> 88 <code><a href="toolresults_v1beta3firstparty.projects.histories.executions.steps.thumbnails.html">thumbnails()</a></code> 89</p> 90<p class="firstline">Returns the thumbnails Resource.</p> 91 92<p class="toc_element"> 93 <code><a href="#create">create(projectId, historyId, executionId, body, requestId=None)</a></code></p> 94<p class="firstline">Creates a Step.</p> 95<p class="toc_element"> 96 <code><a href="#get">get(projectId, historyId, executionId, stepId)</a></code></p> 97<p class="firstline">Gets a Step.</p> 98<p class="toc_element"> 99 <code><a href="#getPerfMetricsSummary">getPerfMetricsSummary(projectId, historyId, executionId, stepId)</a></code></p> 100<p class="firstline">Retrieves a PerfMetricsSummary.</p> 101<p class="toc_element"> 102 <code><a href="#list">list(projectId, historyId, executionId, pageToken=None, pageSize=None)</a></code></p> 103<p class="firstline">Lists Steps for a given Execution.</p> 104<p class="toc_element"> 105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 106<p class="firstline">Retrieves the next page of results.</p> 107<p class="toc_element"> 108 <code><a href="#patch">patch(projectId, historyId, executionId, stepId, body, requestId=None)</a></code></p> 109<p class="firstline">Updates an existing Step with the supplied partial entity.</p> 110<p class="toc_element"> 111 <code><a href="#publishXunitXmlFiles">publishXunitXmlFiles(projectId, historyId, executionId, stepId, body)</a></code></p> 112<p class="firstline">Publish xml files to an existing Step.</p> 113<h3>Method Details</h3> 114<div class="method"> 115 <code class="details" id="create">create(projectId, historyId, executionId, body, requestId=None)</code> 116 <pre>Creates a Step. 117 118The returned Step will have the id set. 119 120May return any of the following canonical error codes: 121 122- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist 123 124Args: 125 projectId: string, A Project id. 126 127Required. (required) 128 historyId: string, A History id. 129 130Required. (required) 131 executionId: string, A Execution id. 132 133Required. (required) 134 body: object, The request body. (required) 135 The object takes the form of: 136 137{ # A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). 138 # 139 # Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). 140 # 141 # Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE 142 # 143 # A Step can be updated until its state is set to COMPLETE at which points it becomes immutable. 144 "testExecutionStep": { # A step that represents running tests. # An execution of a test runner. 145 # 146 # It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. 147 # 148 # Users can also add test results manually by using the test_result field. 149 "testTiming": { # Testing timing break down to know phases. # The timing break down of the test execution. 150 # 151 # - In response: present if set by create or update - In create/update request: optional 152 "testProcessDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took to run the test process. 153 # 154 # - In response: present if previously set. - In create/update request: optional 155 # 156 # # Examples 157 # 158 # Example 1: Compute Duration from two Timestamps in pseudo code. 159 # 160 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 161 # 162 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 163 # 164 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 165 # 166 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 167 # 168 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 169 # 170 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 171 # 172 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 173 # 174 # Example 3: Compute Duration from datetime.timedelta in Python. 175 # 176 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 177 # 178 # # JSON Mapping 179 # 180 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 181 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 182 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 183 }, 184 }, 185 "testSuiteOverviews": [ # List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. 186 # 187 # The maximum allowed number of test suite overviews per step is 1000. 188 # 189 # - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead) 190 { # A summary of a test suite result either parsed from XML or uploaded directly by a user. 191 # 192 # Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step. 193 "name": "A String", # The name of the test suite. 194 # 195 # - In create/response: always set - In update request: never 196 "errorCount": 42, # Number of test cases in error, typically set by the service by parsing the xml_source. 197 # 198 # - In create/response: always set - In update request: never 199 "totalCount": 42, # Number of test cases, typically set by the service by parsing the xml_source. 200 # 201 # - In create/response: always set - In update request: never 202 "xmlSource": { # A reference to a file. # If this test suite was parsed from XML, this is the URI where the original XML file is stored. 203 # 204 # Note: Multiple test suites can share the same xml_source 205 # 206 # Returns INVALID_ARGUMENT if the uri format is not supported. 207 # 208 # - In create/response: optional - In update request: never 209 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 210 # 211 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 212 # 213 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 214 # 215 # - In response: always set - In create/update request: always set 216 }, 217 "failureCount": 42, # Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. 218 # 219 # - In create/response: always set - In update request: never 220 "skippedCount": 42, # Number of test cases not run, typically set by the service by parsing the xml_source. 221 # 222 # - In create/response: always set - In update request: never 223 }, 224 ], 225 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # Represents the execution of the test runner. 226 # 227 # The exit code of this tool will be used to determine if the test passed. 228 # 229 # - In response: always set - In create/update request: optional 230 "toolLogs": [ # References to any plain text logs output the tool execution. 231 # 232 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 233 # 234 # The maximum allowed number of tool logs per step is 1000. 235 # 236 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 237 { # A reference to a file. 238 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 239 # 240 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 241 # 242 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 243 # 244 # - In response: always set - In create/update request: always set 245 }, 246 ], 247 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 248 # 249 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 250 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 251 # 252 # - In response: always set - In create/update request: always set 253 }, 254 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 255 # 256 # The maximum allowed number of tool outputs per step is 1000. 257 # 258 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 259 { # A reference to a ToolExecution output file. 260 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 261 # 262 # - In response: present if set by create/update request - In create/update request: optional 263 # 264 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 265 "className": "A String", # The name of the class. 266 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 267 "name": "A String", # The name of the test case. 268 # 269 # Required. 270 }, 271 "output": { # A reference to a file. # A FileReference to an output file. 272 # 273 # - In response: always set - In create/update request: always set 274 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 275 # 276 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 277 # 278 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 279 # 280 # - In response: always set - In create/update request: always set 281 }, 282 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 283 # 284 # - In response: present if set by create/update request - In create/update request: optional 285 # 286 # # Examples 287 # 288 # Example 1: Compute Timestamp from POSIX `time()`. 289 # 290 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 291 # 292 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 293 # 294 # struct timeval tv; gettimeofday(&tv, NULL); 295 # 296 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 297 # 298 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 299 # 300 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 301 # 302 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 303 # 304 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 305 # 306 # long millis = System.currentTimeMillis(); 307 # 308 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 309 # 310 # 311 # 312 # Example 5: Compute Timestamp from current time in Python. 313 # 314 # timestamp = Timestamp() timestamp.GetCurrentTime() 315 # 316 # # JSON Mapping 317 # 318 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 319 # 320 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 321 # 322 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 323 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 324 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 325 }, 326 }, 327 ], 328 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 329 # 330 # - In response: present if set by create request - In create request: optional - In update request: never set 331 "A String", 332 ], 333 }, 334 "testIssues": [ # Issues observed during the test execution. 335 # 336 # For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. 337 # 338 # - In response: present if set by create or update - In create/update request: optional 339 { # An abnormal event observed during the test execution. 340 "stackTrace": { # A stacktrace. # Optional. 341 "exception": "A String", # The stack trace message. 342 # 343 # Required 344 }, 345 "errorMessage": "A String", # A brief human-readable message describing the abnormal event. 346 # 347 # Required. 348 }, 349 ], 350 }, 351 "toolExecutionStep": { # Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another. # An execution of a tool (used for steps we don't explicitly support). 352 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # A Tool execution. 353 # 354 # - In response: present if set by create/update request - In create/update request: optional 355 "toolLogs": [ # References to any plain text logs output the tool execution. 356 # 357 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 358 # 359 # The maximum allowed number of tool logs per step is 1000. 360 # 361 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 362 { # A reference to a file. 363 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 364 # 365 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 366 # 367 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 368 # 369 # - In response: always set - In create/update request: always set 370 }, 371 ], 372 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 373 # 374 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 375 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 376 # 377 # - In response: always set - In create/update request: always set 378 }, 379 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 380 # 381 # The maximum allowed number of tool outputs per step is 1000. 382 # 383 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 384 { # A reference to a ToolExecution output file. 385 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 386 # 387 # - In response: present if set by create/update request - In create/update request: optional 388 # 389 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 390 "className": "A String", # The name of the class. 391 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 392 "name": "A String", # The name of the test case. 393 # 394 # Required. 395 }, 396 "output": { # A reference to a file. # A FileReference to an output file. 397 # 398 # - In response: always set - In create/update request: always set 399 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 400 # 401 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 402 # 403 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 404 # 405 # - In response: always set - In create/update request: always set 406 }, 407 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 408 # 409 # - In response: present if set by create/update request - In create/update request: optional 410 # 411 # # Examples 412 # 413 # Example 1: Compute Timestamp from POSIX `time()`. 414 # 415 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 416 # 417 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 418 # 419 # struct timeval tv; gettimeofday(&tv, NULL); 420 # 421 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 422 # 423 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 424 # 425 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 426 # 427 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 428 # 429 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 430 # 431 # long millis = System.currentTimeMillis(); 432 # 433 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 434 # 435 # 436 # 437 # Example 5: Compute Timestamp from current time in Python. 438 # 439 # timestamp = Timestamp() timestamp.GetCurrentTime() 440 # 441 # # JSON Mapping 442 # 443 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 444 # 445 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 446 # 447 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 448 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 449 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 450 }, 451 }, 452 ], 453 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 454 # 455 # - In response: present if set by create request - In create request: optional - In update request: never set 456 "A String", 457 ], 458 }, 459 }, 460 "stepId": "A String", # A unique identifier within a Execution for this Step. 461 # 462 # Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. 463 # 464 # - In response: always set - In create/update request: never set 465 "runDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took for this step to run. 466 # 467 # If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. 468 # 469 # PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. 470 # 471 # - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional 472 # 473 # # Examples 474 # 475 # Example 1: Compute Duration from two Timestamps in pseudo code. 476 # 477 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 478 # 479 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 480 # 481 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 482 # 483 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 484 # 485 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 486 # 487 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 488 # 489 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 490 # 491 # Example 3: Compute Duration from datetime.timedelta in Python. 492 # 493 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 494 # 495 # # JSON Mapping 496 # 497 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 498 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 499 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 500 }, 501 "description": "A String", # A description of this tool For example: mvn clean package -D skipTests=true 502 # 503 # - In response: present if set by create/update request - In create/update request: optional 504 "labels": [ # Arbitrary user-supplied key/value pairs that are associated with the step. 505 # 506 # Users are responsible for managing the key namespace such that keys don't accidentally collide. 507 # 508 # An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. 509 # 510 # - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value 511 { 512 "value": "A String", 513 "key": "A String", 514 }, 515 ], 516 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step was created. 517 # 518 # - In response: always set - In create/update request: never set 519 # 520 # # Examples 521 # 522 # Example 1: Compute Timestamp from POSIX `time()`. 523 # 524 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 525 # 526 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 527 # 528 # struct timeval tv; gettimeofday(&tv, NULL); 529 # 530 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 531 # 532 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 533 # 534 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 535 # 536 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 537 # 538 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 539 # 540 # long millis = System.currentTimeMillis(); 541 # 542 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 543 # 544 # 545 # 546 # Example 5: Compute Timestamp from current time in Python. 547 # 548 # timestamp = Timestamp() timestamp.GetCurrentTime() 549 # 550 # # JSON Mapping 551 # 552 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 553 # 554 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 555 # 556 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 557 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 558 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 559 }, 560 "name": "A String", # A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build 561 # 562 # A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. 563 # 564 # - In response: always set - In create request: always set - In update request: never set 565 "state": "A String", # The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE 566 # 567 # A PRECONDITION_FAILED will be returned if an invalid transition is requested. 568 # 569 # It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. 570 # 571 # - In response: always set - In create/update request: optional 572 "completionTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step status was set to complete. 573 # 574 # This value will be set automatically when state transitions to COMPLETE. 575 # 576 # - In response: set if the execution state is COMPLETE. - In create/update request: never set 577 # 578 # # Examples 579 # 580 # Example 1: Compute Timestamp from POSIX `time()`. 581 # 582 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 583 # 584 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 585 # 586 # struct timeval tv; gettimeofday(&tv, NULL); 587 # 588 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 589 # 590 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 591 # 592 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 593 # 594 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 595 # 596 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 597 # 598 # long millis = System.currentTimeMillis(); 599 # 600 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 601 # 602 # 603 # 604 # Example 5: Compute Timestamp from current time in Python. 605 # 606 # timestamp = Timestamp() timestamp.GetCurrentTime() 607 # 608 # # JSON Mapping 609 # 610 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 611 # 612 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 613 # 614 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 615 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 616 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 617 }, 618 "dimensionValue": [ # If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. 619 # 620 # The keys must exactly match the dimension_definition of the execution. 621 # 622 # For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` 623 # 624 # If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` 625 # 626 # If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. 627 # 628 # A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. 629 # 630 # A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. 631 # 632 # A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. 633 # 634 # - In response: present if set by create - In create request: optional - In update request: never set 635 { 636 "value": "A String", 637 "key": "A String", 638 }, 639 ], 640 "outcome": { # Interprets a result so that humans and machines can act on it. # Classification of the result, for example into SUCCESS or FAILURE 641 # 642 # - In response: present if set by create/update request - In create/update request: optional 643 "inconclusiveDetail": { # More information about an INCONCLUSIVE outcome. 644 # 645 # Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. 646 # 647 # Optional 648 "infrastructureFailure": True or False, # If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. 649 # 650 # For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail. 651 "abortedByUser": True or False, # If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running. 652 }, 653 "skippedDetail": { # More information about a SKIPPED outcome. 654 # 655 # Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. 656 # 657 # Optional 658 "incompatibleAppVersion": True or False, # If the App doesn't support the specific API level. 659 "incompatibleArchitecture": True or False, # If the App doesn't run on the specific architecture, for example, x86. 660 "incompatibleDevice": True or False, # If the requested OS version doesn't run on the specific device model. 661 }, 662 "successDetail": { # More information about a SUCCESS outcome. 663 # 664 # Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. 665 # 666 # Optional 667 "otherNativeCrash": True or False, # If a native process other than the app crashed. 668 }, 669 "failureDetail": { # More information about a FAILURE outcome. 670 # 671 # Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. 672 # 673 # Optional 674 "otherNativeCrash": True or False, # If a native process other than the app crashed. 675 "crashed": True or False, # If the failure was severe because the system under test crashed. 676 "unableToCrawl": True or False, # If the robo was unable to crawl the app; perhaps because the app did not start. 677 "notInstalled": True or False, # If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform. 678 "timedOut": True or False, # If the test overran some time limit, and that is why it failed. 679 }, 680 "summary": "A String", # The simplest way to interpret a result. 681 # 682 # Required 683 }, 684 "deviceUsageDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How much the device resource is used to perform the test. 685 # 686 # This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. 687 # 688 # PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. 689 # 690 # - In response: present if previously set. - In create request: optional - In update request: optional 691 # 692 # # Examples 693 # 694 # Example 1: Compute Duration from two Timestamps in pseudo code. 695 # 696 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 697 # 698 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 699 # 700 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 701 # 702 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 703 # 704 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 705 # 706 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 707 # 708 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 709 # 710 # Example 3: Compute Duration from datetime.timedelta in Python. 711 # 712 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 713 # 714 # # JSON Mapping 715 # 716 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 717 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 718 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 719 }, 720 "hasImages": True or False, # Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. 721 # 722 # - In response: always set - In create/update request: never set 723} 724 725 requestId: string, A unique request ID for server to detect duplicated requests. For example, a UUID. 726 727Optional, but strongly recommended. 728 729Returns: 730 An object of the form: 731 732 { # A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). 733 # 734 # Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). 735 # 736 # Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE 737 # 738 # A Step can be updated until its state is set to COMPLETE at which points it becomes immutable. 739 "testExecutionStep": { # A step that represents running tests. # An execution of a test runner. 740 # 741 # It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. 742 # 743 # Users can also add test results manually by using the test_result field. 744 "testTiming": { # Testing timing break down to know phases. # The timing break down of the test execution. 745 # 746 # - In response: present if set by create or update - In create/update request: optional 747 "testProcessDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took to run the test process. 748 # 749 # - In response: present if previously set. - In create/update request: optional 750 # 751 # # Examples 752 # 753 # Example 1: Compute Duration from two Timestamps in pseudo code. 754 # 755 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 756 # 757 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 758 # 759 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 760 # 761 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 762 # 763 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 764 # 765 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 766 # 767 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 768 # 769 # Example 3: Compute Duration from datetime.timedelta in Python. 770 # 771 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 772 # 773 # # JSON Mapping 774 # 775 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 776 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 777 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 778 }, 779 }, 780 "testSuiteOverviews": [ # List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. 781 # 782 # The maximum allowed number of test suite overviews per step is 1000. 783 # 784 # - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead) 785 { # A summary of a test suite result either parsed from XML or uploaded directly by a user. 786 # 787 # Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step. 788 "name": "A String", # The name of the test suite. 789 # 790 # - In create/response: always set - In update request: never 791 "errorCount": 42, # Number of test cases in error, typically set by the service by parsing the xml_source. 792 # 793 # - In create/response: always set - In update request: never 794 "totalCount": 42, # Number of test cases, typically set by the service by parsing the xml_source. 795 # 796 # - In create/response: always set - In update request: never 797 "xmlSource": { # A reference to a file. # If this test suite was parsed from XML, this is the URI where the original XML file is stored. 798 # 799 # Note: Multiple test suites can share the same xml_source 800 # 801 # Returns INVALID_ARGUMENT if the uri format is not supported. 802 # 803 # - In create/response: optional - In update request: never 804 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 805 # 806 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 807 # 808 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 809 # 810 # - In response: always set - In create/update request: always set 811 }, 812 "failureCount": 42, # Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. 813 # 814 # - In create/response: always set - In update request: never 815 "skippedCount": 42, # Number of test cases not run, typically set by the service by parsing the xml_source. 816 # 817 # - In create/response: always set - In update request: never 818 }, 819 ], 820 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # Represents the execution of the test runner. 821 # 822 # The exit code of this tool will be used to determine if the test passed. 823 # 824 # - In response: always set - In create/update request: optional 825 "toolLogs": [ # References to any plain text logs output the tool execution. 826 # 827 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 828 # 829 # The maximum allowed number of tool logs per step is 1000. 830 # 831 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 832 { # A reference to a file. 833 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 834 # 835 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 836 # 837 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 838 # 839 # - In response: always set - In create/update request: always set 840 }, 841 ], 842 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 843 # 844 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 845 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 846 # 847 # - In response: always set - In create/update request: always set 848 }, 849 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 850 # 851 # The maximum allowed number of tool outputs per step is 1000. 852 # 853 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 854 { # A reference to a ToolExecution output file. 855 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 856 # 857 # - In response: present if set by create/update request - In create/update request: optional 858 # 859 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 860 "className": "A String", # The name of the class. 861 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 862 "name": "A String", # The name of the test case. 863 # 864 # Required. 865 }, 866 "output": { # A reference to a file. # A FileReference to an output file. 867 # 868 # - In response: always set - In create/update request: always set 869 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 870 # 871 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 872 # 873 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 874 # 875 # - In response: always set - In create/update request: always set 876 }, 877 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 878 # 879 # - In response: present if set by create/update request - In create/update request: optional 880 # 881 # # Examples 882 # 883 # Example 1: Compute Timestamp from POSIX `time()`. 884 # 885 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 886 # 887 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 888 # 889 # struct timeval tv; gettimeofday(&tv, NULL); 890 # 891 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 892 # 893 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 894 # 895 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 896 # 897 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 898 # 899 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 900 # 901 # long millis = System.currentTimeMillis(); 902 # 903 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 904 # 905 # 906 # 907 # Example 5: Compute Timestamp from current time in Python. 908 # 909 # timestamp = Timestamp() timestamp.GetCurrentTime() 910 # 911 # # JSON Mapping 912 # 913 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 914 # 915 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 916 # 917 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 918 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 919 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 920 }, 921 }, 922 ], 923 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 924 # 925 # - In response: present if set by create request - In create request: optional - In update request: never set 926 "A String", 927 ], 928 }, 929 "testIssues": [ # Issues observed during the test execution. 930 # 931 # For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. 932 # 933 # - In response: present if set by create or update - In create/update request: optional 934 { # An abnormal event observed during the test execution. 935 "stackTrace": { # A stacktrace. # Optional. 936 "exception": "A String", # The stack trace message. 937 # 938 # Required 939 }, 940 "errorMessage": "A String", # A brief human-readable message describing the abnormal event. 941 # 942 # Required. 943 }, 944 ], 945 }, 946 "toolExecutionStep": { # Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another. # An execution of a tool (used for steps we don't explicitly support). 947 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # A Tool execution. 948 # 949 # - In response: present if set by create/update request - In create/update request: optional 950 "toolLogs": [ # References to any plain text logs output the tool execution. 951 # 952 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 953 # 954 # The maximum allowed number of tool logs per step is 1000. 955 # 956 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 957 { # A reference to a file. 958 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 959 # 960 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 961 # 962 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 963 # 964 # - In response: always set - In create/update request: always set 965 }, 966 ], 967 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 968 # 969 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 970 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 971 # 972 # - In response: always set - In create/update request: always set 973 }, 974 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 975 # 976 # The maximum allowed number of tool outputs per step is 1000. 977 # 978 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 979 { # A reference to a ToolExecution output file. 980 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 981 # 982 # - In response: present if set by create/update request - In create/update request: optional 983 # 984 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 985 "className": "A String", # The name of the class. 986 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 987 "name": "A String", # The name of the test case. 988 # 989 # Required. 990 }, 991 "output": { # A reference to a file. # A FileReference to an output file. 992 # 993 # - In response: always set - In create/update request: always set 994 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 995 # 996 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 997 # 998 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 999 # 1000 # - In response: always set - In create/update request: always set 1001 }, 1002 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 1003 # 1004 # - In response: present if set by create/update request - In create/update request: optional 1005 # 1006 # # Examples 1007 # 1008 # Example 1: Compute Timestamp from POSIX `time()`. 1009 # 1010 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 1011 # 1012 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 1013 # 1014 # struct timeval tv; gettimeofday(&tv, NULL); 1015 # 1016 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 1017 # 1018 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 1019 # 1020 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 1021 # 1022 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 1023 # 1024 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 1025 # 1026 # long millis = System.currentTimeMillis(); 1027 # 1028 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 1029 # 1030 # 1031 # 1032 # Example 5: Compute Timestamp from current time in Python. 1033 # 1034 # timestamp = Timestamp() timestamp.GetCurrentTime() 1035 # 1036 # # JSON Mapping 1037 # 1038 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 1039 # 1040 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 1041 # 1042 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 1043 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 1044 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 1045 }, 1046 }, 1047 ], 1048 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 1049 # 1050 # - In response: present if set by create request - In create request: optional - In update request: never set 1051 "A String", 1052 ], 1053 }, 1054 }, 1055 "stepId": "A String", # A unique identifier within a Execution for this Step. 1056 # 1057 # Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. 1058 # 1059 # - In response: always set - In create/update request: never set 1060 "runDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took for this step to run. 1061 # 1062 # If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. 1063 # 1064 # PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. 1065 # 1066 # - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional 1067 # 1068 # # Examples 1069 # 1070 # Example 1: Compute Duration from two Timestamps in pseudo code. 1071 # 1072 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 1073 # 1074 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 1075 # 1076 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 1077 # 1078 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 1079 # 1080 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 1081 # 1082 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 1083 # 1084 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 1085 # 1086 # Example 3: Compute Duration from datetime.timedelta in Python. 1087 # 1088 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 1089 # 1090 # # JSON Mapping 1091 # 1092 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 1093 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 1094 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 1095 }, 1096 "description": "A String", # A description of this tool For example: mvn clean package -D skipTests=true 1097 # 1098 # - In response: present if set by create/update request - In create/update request: optional 1099 "labels": [ # Arbitrary user-supplied key/value pairs that are associated with the step. 1100 # 1101 # Users are responsible for managing the key namespace such that keys don't accidentally collide. 1102 # 1103 # An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. 1104 # 1105 # - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value 1106 { 1107 "value": "A String", 1108 "key": "A String", 1109 }, 1110 ], 1111 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step was created. 1112 # 1113 # - In response: always set - In create/update request: never set 1114 # 1115 # # Examples 1116 # 1117 # Example 1: Compute Timestamp from POSIX `time()`. 1118 # 1119 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 1120 # 1121 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 1122 # 1123 # struct timeval tv; gettimeofday(&tv, NULL); 1124 # 1125 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 1126 # 1127 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 1128 # 1129 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 1130 # 1131 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 1132 # 1133 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 1134 # 1135 # long millis = System.currentTimeMillis(); 1136 # 1137 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 1138 # 1139 # 1140 # 1141 # Example 5: Compute Timestamp from current time in Python. 1142 # 1143 # timestamp = Timestamp() timestamp.GetCurrentTime() 1144 # 1145 # # JSON Mapping 1146 # 1147 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 1148 # 1149 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 1150 # 1151 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 1152 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 1153 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 1154 }, 1155 "name": "A String", # A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build 1156 # 1157 # A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. 1158 # 1159 # - In response: always set - In create request: always set - In update request: never set 1160 "state": "A String", # The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE 1161 # 1162 # A PRECONDITION_FAILED will be returned if an invalid transition is requested. 1163 # 1164 # It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. 1165 # 1166 # - In response: always set - In create/update request: optional 1167 "completionTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step status was set to complete. 1168 # 1169 # This value will be set automatically when state transitions to COMPLETE. 1170 # 1171 # - In response: set if the execution state is COMPLETE. - In create/update request: never set 1172 # 1173 # # Examples 1174 # 1175 # Example 1: Compute Timestamp from POSIX `time()`. 1176 # 1177 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 1178 # 1179 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 1180 # 1181 # struct timeval tv; gettimeofday(&tv, NULL); 1182 # 1183 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 1184 # 1185 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 1186 # 1187 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 1188 # 1189 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 1190 # 1191 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 1192 # 1193 # long millis = System.currentTimeMillis(); 1194 # 1195 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 1196 # 1197 # 1198 # 1199 # Example 5: Compute Timestamp from current time in Python. 1200 # 1201 # timestamp = Timestamp() timestamp.GetCurrentTime() 1202 # 1203 # # JSON Mapping 1204 # 1205 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 1206 # 1207 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 1208 # 1209 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 1210 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 1211 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 1212 }, 1213 "dimensionValue": [ # If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. 1214 # 1215 # The keys must exactly match the dimension_definition of the execution. 1216 # 1217 # For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` 1218 # 1219 # If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` 1220 # 1221 # If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. 1222 # 1223 # A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. 1224 # 1225 # A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. 1226 # 1227 # A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. 1228 # 1229 # - In response: present if set by create - In create request: optional - In update request: never set 1230 { 1231 "value": "A String", 1232 "key": "A String", 1233 }, 1234 ], 1235 "outcome": { # Interprets a result so that humans and machines can act on it. # Classification of the result, for example into SUCCESS or FAILURE 1236 # 1237 # - In response: present if set by create/update request - In create/update request: optional 1238 "inconclusiveDetail": { # More information about an INCONCLUSIVE outcome. 1239 # 1240 # Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. 1241 # 1242 # Optional 1243 "infrastructureFailure": True or False, # If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. 1244 # 1245 # For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail. 1246 "abortedByUser": True or False, # If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running. 1247 }, 1248 "skippedDetail": { # More information about a SKIPPED outcome. 1249 # 1250 # Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. 1251 # 1252 # Optional 1253 "incompatibleAppVersion": True or False, # If the App doesn't support the specific API level. 1254 "incompatibleArchitecture": True or False, # If the App doesn't run on the specific architecture, for example, x86. 1255 "incompatibleDevice": True or False, # If the requested OS version doesn't run on the specific device model. 1256 }, 1257 "successDetail": { # More information about a SUCCESS outcome. 1258 # 1259 # Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. 1260 # 1261 # Optional 1262 "otherNativeCrash": True or False, # If a native process other than the app crashed. 1263 }, 1264 "failureDetail": { # More information about a FAILURE outcome. 1265 # 1266 # Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. 1267 # 1268 # Optional 1269 "otherNativeCrash": True or False, # If a native process other than the app crashed. 1270 "crashed": True or False, # If the failure was severe because the system under test crashed. 1271 "unableToCrawl": True or False, # If the robo was unable to crawl the app; perhaps because the app did not start. 1272 "notInstalled": True or False, # If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform. 1273 "timedOut": True or False, # If the test overran some time limit, and that is why it failed. 1274 }, 1275 "summary": "A String", # The simplest way to interpret a result. 1276 # 1277 # Required 1278 }, 1279 "deviceUsageDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How much the device resource is used to perform the test. 1280 # 1281 # This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. 1282 # 1283 # PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. 1284 # 1285 # - In response: present if previously set. - In create request: optional - In update request: optional 1286 # 1287 # # Examples 1288 # 1289 # Example 1: Compute Duration from two Timestamps in pseudo code. 1290 # 1291 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 1292 # 1293 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 1294 # 1295 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 1296 # 1297 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 1298 # 1299 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 1300 # 1301 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 1302 # 1303 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 1304 # 1305 # Example 3: Compute Duration from datetime.timedelta in Python. 1306 # 1307 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 1308 # 1309 # # JSON Mapping 1310 # 1311 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 1312 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 1313 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 1314 }, 1315 "hasImages": True or False, # Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. 1316 # 1317 # - In response: always set - In create/update request: never set 1318 }</pre> 1319</div> 1320 1321<div class="method"> 1322 <code class="details" id="get">get(projectId, historyId, executionId, stepId)</code> 1323 <pre>Gets a Step. 1324 1325May return any of the following canonical error codes: 1326 1327- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does not exist 1328 1329Args: 1330 projectId: string, A Project id. 1331 1332Required. (required) 1333 historyId: string, A History id. 1334 1335Required. (required) 1336 executionId: string, A Execution id. 1337 1338Required. (required) 1339 stepId: string, A Step id. 1340 1341Required. (required) 1342 1343Returns: 1344 An object of the form: 1345 1346 { # A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). 1347 # 1348 # Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). 1349 # 1350 # Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE 1351 # 1352 # A Step can be updated until its state is set to COMPLETE at which points it becomes immutable. 1353 "testExecutionStep": { # A step that represents running tests. # An execution of a test runner. 1354 # 1355 # It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. 1356 # 1357 # Users can also add test results manually by using the test_result field. 1358 "testTiming": { # Testing timing break down to know phases. # The timing break down of the test execution. 1359 # 1360 # - In response: present if set by create or update - In create/update request: optional 1361 "testProcessDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took to run the test process. 1362 # 1363 # - In response: present if previously set. - In create/update request: optional 1364 # 1365 # # Examples 1366 # 1367 # Example 1: Compute Duration from two Timestamps in pseudo code. 1368 # 1369 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 1370 # 1371 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 1372 # 1373 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 1374 # 1375 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 1376 # 1377 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 1378 # 1379 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 1380 # 1381 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 1382 # 1383 # Example 3: Compute Duration from datetime.timedelta in Python. 1384 # 1385 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 1386 # 1387 # # JSON Mapping 1388 # 1389 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 1390 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 1391 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 1392 }, 1393 }, 1394 "testSuiteOverviews": [ # List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. 1395 # 1396 # The maximum allowed number of test suite overviews per step is 1000. 1397 # 1398 # - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead) 1399 { # A summary of a test suite result either parsed from XML or uploaded directly by a user. 1400 # 1401 # Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step. 1402 "name": "A String", # The name of the test suite. 1403 # 1404 # - In create/response: always set - In update request: never 1405 "errorCount": 42, # Number of test cases in error, typically set by the service by parsing the xml_source. 1406 # 1407 # - In create/response: always set - In update request: never 1408 "totalCount": 42, # Number of test cases, typically set by the service by parsing the xml_source. 1409 # 1410 # - In create/response: always set - In update request: never 1411 "xmlSource": { # A reference to a file. # If this test suite was parsed from XML, this is the URI where the original XML file is stored. 1412 # 1413 # Note: Multiple test suites can share the same xml_source 1414 # 1415 # Returns INVALID_ARGUMENT if the uri format is not supported. 1416 # 1417 # - In create/response: optional - In update request: never 1418 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 1419 # 1420 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 1421 # 1422 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 1423 # 1424 # - In response: always set - In create/update request: always set 1425 }, 1426 "failureCount": 42, # Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. 1427 # 1428 # - In create/response: always set - In update request: never 1429 "skippedCount": 42, # Number of test cases not run, typically set by the service by parsing the xml_source. 1430 # 1431 # - In create/response: always set - In update request: never 1432 }, 1433 ], 1434 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # Represents the execution of the test runner. 1435 # 1436 # The exit code of this tool will be used to determine if the test passed. 1437 # 1438 # - In response: always set - In create/update request: optional 1439 "toolLogs": [ # References to any plain text logs output the tool execution. 1440 # 1441 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 1442 # 1443 # The maximum allowed number of tool logs per step is 1000. 1444 # 1445 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 1446 { # A reference to a file. 1447 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 1448 # 1449 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 1450 # 1451 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 1452 # 1453 # - In response: always set - In create/update request: always set 1454 }, 1455 ], 1456 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 1457 # 1458 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 1459 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 1460 # 1461 # - In response: always set - In create/update request: always set 1462 }, 1463 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 1464 # 1465 # The maximum allowed number of tool outputs per step is 1000. 1466 # 1467 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 1468 { # A reference to a ToolExecution output file. 1469 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 1470 # 1471 # - In response: present if set by create/update request - In create/update request: optional 1472 # 1473 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 1474 "className": "A String", # The name of the class. 1475 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 1476 "name": "A String", # The name of the test case. 1477 # 1478 # Required. 1479 }, 1480 "output": { # A reference to a file. # A FileReference to an output file. 1481 # 1482 # - In response: always set - In create/update request: always set 1483 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 1484 # 1485 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 1486 # 1487 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 1488 # 1489 # - In response: always set - In create/update request: always set 1490 }, 1491 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 1492 # 1493 # - In response: present if set by create/update request - In create/update request: optional 1494 # 1495 # # Examples 1496 # 1497 # Example 1: Compute Timestamp from POSIX `time()`. 1498 # 1499 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 1500 # 1501 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 1502 # 1503 # struct timeval tv; gettimeofday(&tv, NULL); 1504 # 1505 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 1506 # 1507 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 1508 # 1509 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 1510 # 1511 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 1512 # 1513 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 1514 # 1515 # long millis = System.currentTimeMillis(); 1516 # 1517 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 1518 # 1519 # 1520 # 1521 # Example 5: Compute Timestamp from current time in Python. 1522 # 1523 # timestamp = Timestamp() timestamp.GetCurrentTime() 1524 # 1525 # # JSON Mapping 1526 # 1527 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 1528 # 1529 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 1530 # 1531 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 1532 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 1533 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 1534 }, 1535 }, 1536 ], 1537 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 1538 # 1539 # - In response: present if set by create request - In create request: optional - In update request: never set 1540 "A String", 1541 ], 1542 }, 1543 "testIssues": [ # Issues observed during the test execution. 1544 # 1545 # For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. 1546 # 1547 # - In response: present if set by create or update - In create/update request: optional 1548 { # An abnormal event observed during the test execution. 1549 "stackTrace": { # A stacktrace. # Optional. 1550 "exception": "A String", # The stack trace message. 1551 # 1552 # Required 1553 }, 1554 "errorMessage": "A String", # A brief human-readable message describing the abnormal event. 1555 # 1556 # Required. 1557 }, 1558 ], 1559 }, 1560 "toolExecutionStep": { # Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another. # An execution of a tool (used for steps we don't explicitly support). 1561 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # A Tool execution. 1562 # 1563 # - In response: present if set by create/update request - In create/update request: optional 1564 "toolLogs": [ # References to any plain text logs output the tool execution. 1565 # 1566 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 1567 # 1568 # The maximum allowed number of tool logs per step is 1000. 1569 # 1570 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 1571 { # A reference to a file. 1572 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 1573 # 1574 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 1575 # 1576 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 1577 # 1578 # - In response: always set - In create/update request: always set 1579 }, 1580 ], 1581 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 1582 # 1583 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 1584 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 1585 # 1586 # - In response: always set - In create/update request: always set 1587 }, 1588 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 1589 # 1590 # The maximum allowed number of tool outputs per step is 1000. 1591 # 1592 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 1593 { # A reference to a ToolExecution output file. 1594 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 1595 # 1596 # - In response: present if set by create/update request - In create/update request: optional 1597 # 1598 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 1599 "className": "A String", # The name of the class. 1600 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 1601 "name": "A String", # The name of the test case. 1602 # 1603 # Required. 1604 }, 1605 "output": { # A reference to a file. # A FileReference to an output file. 1606 # 1607 # - In response: always set - In create/update request: always set 1608 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 1609 # 1610 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 1611 # 1612 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 1613 # 1614 # - In response: always set - In create/update request: always set 1615 }, 1616 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 1617 # 1618 # - In response: present if set by create/update request - In create/update request: optional 1619 # 1620 # # Examples 1621 # 1622 # Example 1: Compute Timestamp from POSIX `time()`. 1623 # 1624 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 1625 # 1626 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 1627 # 1628 # struct timeval tv; gettimeofday(&tv, NULL); 1629 # 1630 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 1631 # 1632 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 1633 # 1634 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 1635 # 1636 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 1637 # 1638 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 1639 # 1640 # long millis = System.currentTimeMillis(); 1641 # 1642 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 1643 # 1644 # 1645 # 1646 # Example 5: Compute Timestamp from current time in Python. 1647 # 1648 # timestamp = Timestamp() timestamp.GetCurrentTime() 1649 # 1650 # # JSON Mapping 1651 # 1652 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 1653 # 1654 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 1655 # 1656 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 1657 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 1658 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 1659 }, 1660 }, 1661 ], 1662 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 1663 # 1664 # - In response: present if set by create request - In create request: optional - In update request: never set 1665 "A String", 1666 ], 1667 }, 1668 }, 1669 "stepId": "A String", # A unique identifier within a Execution for this Step. 1670 # 1671 # Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. 1672 # 1673 # - In response: always set - In create/update request: never set 1674 "runDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took for this step to run. 1675 # 1676 # If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. 1677 # 1678 # PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. 1679 # 1680 # - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional 1681 # 1682 # # Examples 1683 # 1684 # Example 1: Compute Duration from two Timestamps in pseudo code. 1685 # 1686 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 1687 # 1688 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 1689 # 1690 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 1691 # 1692 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 1693 # 1694 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 1695 # 1696 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 1697 # 1698 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 1699 # 1700 # Example 3: Compute Duration from datetime.timedelta in Python. 1701 # 1702 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 1703 # 1704 # # JSON Mapping 1705 # 1706 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 1707 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 1708 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 1709 }, 1710 "description": "A String", # A description of this tool For example: mvn clean package -D skipTests=true 1711 # 1712 # - In response: present if set by create/update request - In create/update request: optional 1713 "labels": [ # Arbitrary user-supplied key/value pairs that are associated with the step. 1714 # 1715 # Users are responsible for managing the key namespace such that keys don't accidentally collide. 1716 # 1717 # An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. 1718 # 1719 # - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value 1720 { 1721 "value": "A String", 1722 "key": "A String", 1723 }, 1724 ], 1725 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step was created. 1726 # 1727 # - In response: always set - In create/update request: never set 1728 # 1729 # # Examples 1730 # 1731 # Example 1: Compute Timestamp from POSIX `time()`. 1732 # 1733 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 1734 # 1735 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 1736 # 1737 # struct timeval tv; gettimeofday(&tv, NULL); 1738 # 1739 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 1740 # 1741 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 1742 # 1743 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 1744 # 1745 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 1746 # 1747 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 1748 # 1749 # long millis = System.currentTimeMillis(); 1750 # 1751 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 1752 # 1753 # 1754 # 1755 # Example 5: Compute Timestamp from current time in Python. 1756 # 1757 # timestamp = Timestamp() timestamp.GetCurrentTime() 1758 # 1759 # # JSON Mapping 1760 # 1761 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 1762 # 1763 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 1764 # 1765 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 1766 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 1767 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 1768 }, 1769 "name": "A String", # A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build 1770 # 1771 # A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. 1772 # 1773 # - In response: always set - In create request: always set - In update request: never set 1774 "state": "A String", # The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE 1775 # 1776 # A PRECONDITION_FAILED will be returned if an invalid transition is requested. 1777 # 1778 # It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. 1779 # 1780 # - In response: always set - In create/update request: optional 1781 "completionTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step status was set to complete. 1782 # 1783 # This value will be set automatically when state transitions to COMPLETE. 1784 # 1785 # - In response: set if the execution state is COMPLETE. - In create/update request: never set 1786 # 1787 # # Examples 1788 # 1789 # Example 1: Compute Timestamp from POSIX `time()`. 1790 # 1791 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 1792 # 1793 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 1794 # 1795 # struct timeval tv; gettimeofday(&tv, NULL); 1796 # 1797 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 1798 # 1799 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 1800 # 1801 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 1802 # 1803 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 1804 # 1805 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 1806 # 1807 # long millis = System.currentTimeMillis(); 1808 # 1809 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 1810 # 1811 # 1812 # 1813 # Example 5: Compute Timestamp from current time in Python. 1814 # 1815 # timestamp = Timestamp() timestamp.GetCurrentTime() 1816 # 1817 # # JSON Mapping 1818 # 1819 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 1820 # 1821 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 1822 # 1823 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 1824 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 1825 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 1826 }, 1827 "dimensionValue": [ # If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. 1828 # 1829 # The keys must exactly match the dimension_definition of the execution. 1830 # 1831 # For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` 1832 # 1833 # If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` 1834 # 1835 # If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. 1836 # 1837 # A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. 1838 # 1839 # A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. 1840 # 1841 # A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. 1842 # 1843 # - In response: present if set by create - In create request: optional - In update request: never set 1844 { 1845 "value": "A String", 1846 "key": "A String", 1847 }, 1848 ], 1849 "outcome": { # Interprets a result so that humans and machines can act on it. # Classification of the result, for example into SUCCESS or FAILURE 1850 # 1851 # - In response: present if set by create/update request - In create/update request: optional 1852 "inconclusiveDetail": { # More information about an INCONCLUSIVE outcome. 1853 # 1854 # Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. 1855 # 1856 # Optional 1857 "infrastructureFailure": True or False, # If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. 1858 # 1859 # For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail. 1860 "abortedByUser": True or False, # If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running. 1861 }, 1862 "skippedDetail": { # More information about a SKIPPED outcome. 1863 # 1864 # Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. 1865 # 1866 # Optional 1867 "incompatibleAppVersion": True or False, # If the App doesn't support the specific API level. 1868 "incompatibleArchitecture": True or False, # If the App doesn't run on the specific architecture, for example, x86. 1869 "incompatibleDevice": True or False, # If the requested OS version doesn't run on the specific device model. 1870 }, 1871 "successDetail": { # More information about a SUCCESS outcome. 1872 # 1873 # Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. 1874 # 1875 # Optional 1876 "otherNativeCrash": True or False, # If a native process other than the app crashed. 1877 }, 1878 "failureDetail": { # More information about a FAILURE outcome. 1879 # 1880 # Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. 1881 # 1882 # Optional 1883 "otherNativeCrash": True or False, # If a native process other than the app crashed. 1884 "crashed": True or False, # If the failure was severe because the system under test crashed. 1885 "unableToCrawl": True or False, # If the robo was unable to crawl the app; perhaps because the app did not start. 1886 "notInstalled": True or False, # If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform. 1887 "timedOut": True or False, # If the test overran some time limit, and that is why it failed. 1888 }, 1889 "summary": "A String", # The simplest way to interpret a result. 1890 # 1891 # Required 1892 }, 1893 "deviceUsageDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How much the device resource is used to perform the test. 1894 # 1895 # This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. 1896 # 1897 # PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. 1898 # 1899 # - In response: present if previously set. - In create request: optional - In update request: optional 1900 # 1901 # # Examples 1902 # 1903 # Example 1: Compute Duration from two Timestamps in pseudo code. 1904 # 1905 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 1906 # 1907 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 1908 # 1909 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 1910 # 1911 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 1912 # 1913 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 1914 # 1915 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 1916 # 1917 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 1918 # 1919 # Example 3: Compute Duration from datetime.timedelta in Python. 1920 # 1921 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 1922 # 1923 # # JSON Mapping 1924 # 1925 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 1926 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 1927 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 1928 }, 1929 "hasImages": True or False, # Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. 1930 # 1931 # - In response: always set - In create/update request: never set 1932 }</pre> 1933</div> 1934 1935<div class="method"> 1936 <code class="details" id="getPerfMetricsSummary">getPerfMetricsSummary(projectId, historyId, executionId, stepId)</code> 1937 <pre>Retrieves a PerfMetricsSummary. 1938 1939May return any of the following error code(s): - NOT_FOUND - The specified PerfMetricsSummary does not exist 1940 1941Args: 1942 projectId: string, The cloud project (required) 1943 historyId: string, A tool results history ID. (required) 1944 executionId: string, A tool results execution ID. (required) 1945 stepId: string, A tool results step ID. (required) 1946 1947Returns: 1948 An object of the form: 1949 1950 { # A summary of perf metrics collected and performance environment info 1951 "stepId": "A String", # A tool results step ID. 1952 "projectId": "A String", # The cloud project 1953 "perfEnvironment": { # Encapsulates performance environment info # Describes the environment in which the performance metrics were collected 1954 "cpuInfo": { # CPU related environment info 1955 "cpuSpeedInGhz": 3.14, # the CPU clock speed in GHz 1956 "cpuProcessor": "A String", # description of the device processor ie '1.8 GHz hexa core 64-bit ARMv8-A' 1957 "numberOfCores": 42, # the number of CPU cores 1958 }, 1959 "memoryInfo": { # Memory related environment info 1960 "memoryTotalInKibibyte": "A String", # Total memory available on the device in KiB 1961 "memoryCapInKibibyte": "A String", # Maximum memory that can be allocated to the process in KiB 1962 }, 1963 }, 1964 "historyId": "A String", # A tool results history ID. 1965 "executionId": "A String", # A tool results execution ID. 1966 "perfMetrics": [ # Set of resource collected 1967 "A String", 1968 ], 1969 }</pre> 1970</div> 1971 1972<div class="method"> 1973 <code class="details" id="list">list(projectId, historyId, executionId, pageToken=None, pageSize=None)</code> 1974 <pre>Lists Steps for a given Execution. 1975 1976The steps are sorted by creation_time in descending order. The step_id key will be used to order the steps with the same creation_time. 1977 1978May return any of the following canonical error codes: 1979 1980- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist 1981 1982Args: 1983 projectId: string, A Project id. 1984 1985Required. (required) 1986 historyId: string, A History id. 1987 1988Required. (required) 1989 executionId: string, A Execution id. 1990 1991Required. (required) 1992 pageToken: string, A continuation token to resume the query at the next item. 1993 1994Optional. 1995 pageSize: integer, The maximum number of Steps to fetch. 1996 1997Default value: 25. The server will use this default if the field is not set or has a value of 0. 1998 1999Optional. 2000 2001Returns: 2002 An object of the form: 2003 2004 { # Response message for StepService.List. 2005 "nextPageToken": "A String", # A continuation token to resume the query at the next item. 2006 # 2007 # If set, indicates that there are more steps to read, by calling list again with this value in the page_token field. 2008 "steps": [ # Steps. 2009 { # A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). 2010 # 2011 # Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). 2012 # 2013 # Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE 2014 # 2015 # A Step can be updated until its state is set to COMPLETE at which points it becomes immutable. 2016 "testExecutionStep": { # A step that represents running tests. # An execution of a test runner. 2017 # 2018 # It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. 2019 # 2020 # Users can also add test results manually by using the test_result field. 2021 "testTiming": { # Testing timing break down to know phases. # The timing break down of the test execution. 2022 # 2023 # - In response: present if set by create or update - In create/update request: optional 2024 "testProcessDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took to run the test process. 2025 # 2026 # - In response: present if previously set. - In create/update request: optional 2027 # 2028 # # Examples 2029 # 2030 # Example 1: Compute Duration from two Timestamps in pseudo code. 2031 # 2032 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 2033 # 2034 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 2035 # 2036 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 2037 # 2038 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 2039 # 2040 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 2041 # 2042 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 2043 # 2044 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 2045 # 2046 # Example 3: Compute Duration from datetime.timedelta in Python. 2047 # 2048 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 2049 # 2050 # # JSON Mapping 2051 # 2052 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 2053 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 2054 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 2055 }, 2056 }, 2057 "testSuiteOverviews": [ # List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. 2058 # 2059 # The maximum allowed number of test suite overviews per step is 1000. 2060 # 2061 # - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead) 2062 { # A summary of a test suite result either parsed from XML or uploaded directly by a user. 2063 # 2064 # Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step. 2065 "name": "A String", # The name of the test suite. 2066 # 2067 # - In create/response: always set - In update request: never 2068 "errorCount": 42, # Number of test cases in error, typically set by the service by parsing the xml_source. 2069 # 2070 # - In create/response: always set - In update request: never 2071 "totalCount": 42, # Number of test cases, typically set by the service by parsing the xml_source. 2072 # 2073 # - In create/response: always set - In update request: never 2074 "xmlSource": { # A reference to a file. # If this test suite was parsed from XML, this is the URI where the original XML file is stored. 2075 # 2076 # Note: Multiple test suites can share the same xml_source 2077 # 2078 # Returns INVALID_ARGUMENT if the uri format is not supported. 2079 # 2080 # - In create/response: optional - In update request: never 2081 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2082 # 2083 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2084 # 2085 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2086 # 2087 # - In response: always set - In create/update request: always set 2088 }, 2089 "failureCount": 42, # Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. 2090 # 2091 # - In create/response: always set - In update request: never 2092 "skippedCount": 42, # Number of test cases not run, typically set by the service by parsing the xml_source. 2093 # 2094 # - In create/response: always set - In update request: never 2095 }, 2096 ], 2097 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # Represents the execution of the test runner. 2098 # 2099 # The exit code of this tool will be used to determine if the test passed. 2100 # 2101 # - In response: always set - In create/update request: optional 2102 "toolLogs": [ # References to any plain text logs output the tool execution. 2103 # 2104 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 2105 # 2106 # The maximum allowed number of tool logs per step is 1000. 2107 # 2108 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 2109 { # A reference to a file. 2110 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2111 # 2112 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2113 # 2114 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2115 # 2116 # - In response: always set - In create/update request: always set 2117 }, 2118 ], 2119 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 2120 # 2121 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 2122 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 2123 # 2124 # - In response: always set - In create/update request: always set 2125 }, 2126 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 2127 # 2128 # The maximum allowed number of tool outputs per step is 1000. 2129 # 2130 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 2131 { # A reference to a ToolExecution output file. 2132 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 2133 # 2134 # - In response: present if set by create/update request - In create/update request: optional 2135 # 2136 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 2137 "className": "A String", # The name of the class. 2138 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 2139 "name": "A String", # The name of the test case. 2140 # 2141 # Required. 2142 }, 2143 "output": { # A reference to a file. # A FileReference to an output file. 2144 # 2145 # - In response: always set - In create/update request: always set 2146 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2147 # 2148 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2149 # 2150 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2151 # 2152 # - In response: always set - In create/update request: always set 2153 }, 2154 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 2155 # 2156 # - In response: present if set by create/update request - In create/update request: optional 2157 # 2158 # # Examples 2159 # 2160 # Example 1: Compute Timestamp from POSIX `time()`. 2161 # 2162 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 2163 # 2164 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 2165 # 2166 # struct timeval tv; gettimeofday(&tv, NULL); 2167 # 2168 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 2169 # 2170 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 2171 # 2172 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 2173 # 2174 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 2175 # 2176 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 2177 # 2178 # long millis = System.currentTimeMillis(); 2179 # 2180 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 2181 # 2182 # 2183 # 2184 # Example 5: Compute Timestamp from current time in Python. 2185 # 2186 # timestamp = Timestamp() timestamp.GetCurrentTime() 2187 # 2188 # # JSON Mapping 2189 # 2190 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 2191 # 2192 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 2193 # 2194 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 2195 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 2196 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 2197 }, 2198 }, 2199 ], 2200 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 2201 # 2202 # - In response: present if set by create request - In create request: optional - In update request: never set 2203 "A String", 2204 ], 2205 }, 2206 "testIssues": [ # Issues observed during the test execution. 2207 # 2208 # For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. 2209 # 2210 # - In response: present if set by create or update - In create/update request: optional 2211 { # An abnormal event observed during the test execution. 2212 "stackTrace": { # A stacktrace. # Optional. 2213 "exception": "A String", # The stack trace message. 2214 # 2215 # Required 2216 }, 2217 "errorMessage": "A String", # A brief human-readable message describing the abnormal event. 2218 # 2219 # Required. 2220 }, 2221 ], 2222 }, 2223 "toolExecutionStep": { # Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another. # An execution of a tool (used for steps we don't explicitly support). 2224 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # A Tool execution. 2225 # 2226 # - In response: present if set by create/update request - In create/update request: optional 2227 "toolLogs": [ # References to any plain text logs output the tool execution. 2228 # 2229 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 2230 # 2231 # The maximum allowed number of tool logs per step is 1000. 2232 # 2233 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 2234 { # A reference to a file. 2235 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2236 # 2237 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2238 # 2239 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2240 # 2241 # - In response: always set - In create/update request: always set 2242 }, 2243 ], 2244 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 2245 # 2246 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 2247 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 2248 # 2249 # - In response: always set - In create/update request: always set 2250 }, 2251 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 2252 # 2253 # The maximum allowed number of tool outputs per step is 1000. 2254 # 2255 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 2256 { # A reference to a ToolExecution output file. 2257 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 2258 # 2259 # - In response: present if set by create/update request - In create/update request: optional 2260 # 2261 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 2262 "className": "A String", # The name of the class. 2263 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 2264 "name": "A String", # The name of the test case. 2265 # 2266 # Required. 2267 }, 2268 "output": { # A reference to a file. # A FileReference to an output file. 2269 # 2270 # - In response: always set - In create/update request: always set 2271 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2272 # 2273 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2274 # 2275 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2276 # 2277 # - In response: always set - In create/update request: always set 2278 }, 2279 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 2280 # 2281 # - In response: present if set by create/update request - In create/update request: optional 2282 # 2283 # # Examples 2284 # 2285 # Example 1: Compute Timestamp from POSIX `time()`. 2286 # 2287 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 2288 # 2289 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 2290 # 2291 # struct timeval tv; gettimeofday(&tv, NULL); 2292 # 2293 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 2294 # 2295 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 2296 # 2297 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 2298 # 2299 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 2300 # 2301 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 2302 # 2303 # long millis = System.currentTimeMillis(); 2304 # 2305 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 2306 # 2307 # 2308 # 2309 # Example 5: Compute Timestamp from current time in Python. 2310 # 2311 # timestamp = Timestamp() timestamp.GetCurrentTime() 2312 # 2313 # # JSON Mapping 2314 # 2315 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 2316 # 2317 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 2318 # 2319 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 2320 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 2321 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 2322 }, 2323 }, 2324 ], 2325 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 2326 # 2327 # - In response: present if set by create request - In create request: optional - In update request: never set 2328 "A String", 2329 ], 2330 }, 2331 }, 2332 "stepId": "A String", # A unique identifier within a Execution for this Step. 2333 # 2334 # Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. 2335 # 2336 # - In response: always set - In create/update request: never set 2337 "runDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took for this step to run. 2338 # 2339 # If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. 2340 # 2341 # PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. 2342 # 2343 # - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional 2344 # 2345 # # Examples 2346 # 2347 # Example 1: Compute Duration from two Timestamps in pseudo code. 2348 # 2349 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 2350 # 2351 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 2352 # 2353 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 2354 # 2355 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 2356 # 2357 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 2358 # 2359 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 2360 # 2361 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 2362 # 2363 # Example 3: Compute Duration from datetime.timedelta in Python. 2364 # 2365 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 2366 # 2367 # # JSON Mapping 2368 # 2369 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 2370 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 2371 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 2372 }, 2373 "description": "A String", # A description of this tool For example: mvn clean package -D skipTests=true 2374 # 2375 # - In response: present if set by create/update request - In create/update request: optional 2376 "labels": [ # Arbitrary user-supplied key/value pairs that are associated with the step. 2377 # 2378 # Users are responsible for managing the key namespace such that keys don't accidentally collide. 2379 # 2380 # An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. 2381 # 2382 # - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value 2383 { 2384 "value": "A String", 2385 "key": "A String", 2386 }, 2387 ], 2388 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step was created. 2389 # 2390 # - In response: always set - In create/update request: never set 2391 # 2392 # # Examples 2393 # 2394 # Example 1: Compute Timestamp from POSIX `time()`. 2395 # 2396 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 2397 # 2398 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 2399 # 2400 # struct timeval tv; gettimeofday(&tv, NULL); 2401 # 2402 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 2403 # 2404 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 2405 # 2406 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 2407 # 2408 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 2409 # 2410 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 2411 # 2412 # long millis = System.currentTimeMillis(); 2413 # 2414 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 2415 # 2416 # 2417 # 2418 # Example 5: Compute Timestamp from current time in Python. 2419 # 2420 # timestamp = Timestamp() timestamp.GetCurrentTime() 2421 # 2422 # # JSON Mapping 2423 # 2424 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 2425 # 2426 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 2427 # 2428 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 2429 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 2430 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 2431 }, 2432 "name": "A String", # A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build 2433 # 2434 # A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. 2435 # 2436 # - In response: always set - In create request: always set - In update request: never set 2437 "state": "A String", # The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE 2438 # 2439 # A PRECONDITION_FAILED will be returned if an invalid transition is requested. 2440 # 2441 # It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. 2442 # 2443 # - In response: always set - In create/update request: optional 2444 "completionTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step status was set to complete. 2445 # 2446 # This value will be set automatically when state transitions to COMPLETE. 2447 # 2448 # - In response: set if the execution state is COMPLETE. - In create/update request: never set 2449 # 2450 # # Examples 2451 # 2452 # Example 1: Compute Timestamp from POSIX `time()`. 2453 # 2454 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 2455 # 2456 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 2457 # 2458 # struct timeval tv; gettimeofday(&tv, NULL); 2459 # 2460 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 2461 # 2462 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 2463 # 2464 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 2465 # 2466 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 2467 # 2468 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 2469 # 2470 # long millis = System.currentTimeMillis(); 2471 # 2472 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 2473 # 2474 # 2475 # 2476 # Example 5: Compute Timestamp from current time in Python. 2477 # 2478 # timestamp = Timestamp() timestamp.GetCurrentTime() 2479 # 2480 # # JSON Mapping 2481 # 2482 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 2483 # 2484 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 2485 # 2486 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 2487 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 2488 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 2489 }, 2490 "dimensionValue": [ # If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. 2491 # 2492 # The keys must exactly match the dimension_definition of the execution. 2493 # 2494 # For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` 2495 # 2496 # If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` 2497 # 2498 # If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. 2499 # 2500 # A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. 2501 # 2502 # A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. 2503 # 2504 # A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. 2505 # 2506 # - In response: present if set by create - In create request: optional - In update request: never set 2507 { 2508 "value": "A String", 2509 "key": "A String", 2510 }, 2511 ], 2512 "outcome": { # Interprets a result so that humans and machines can act on it. # Classification of the result, for example into SUCCESS or FAILURE 2513 # 2514 # - In response: present if set by create/update request - In create/update request: optional 2515 "inconclusiveDetail": { # More information about an INCONCLUSIVE outcome. 2516 # 2517 # Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. 2518 # 2519 # Optional 2520 "infrastructureFailure": True or False, # If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. 2521 # 2522 # For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail. 2523 "abortedByUser": True or False, # If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running. 2524 }, 2525 "skippedDetail": { # More information about a SKIPPED outcome. 2526 # 2527 # Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. 2528 # 2529 # Optional 2530 "incompatibleAppVersion": True or False, # If the App doesn't support the specific API level. 2531 "incompatibleArchitecture": True or False, # If the App doesn't run on the specific architecture, for example, x86. 2532 "incompatibleDevice": True or False, # If the requested OS version doesn't run on the specific device model. 2533 }, 2534 "successDetail": { # More information about a SUCCESS outcome. 2535 # 2536 # Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. 2537 # 2538 # Optional 2539 "otherNativeCrash": True or False, # If a native process other than the app crashed. 2540 }, 2541 "failureDetail": { # More information about a FAILURE outcome. 2542 # 2543 # Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. 2544 # 2545 # Optional 2546 "otherNativeCrash": True or False, # If a native process other than the app crashed. 2547 "crashed": True or False, # If the failure was severe because the system under test crashed. 2548 "unableToCrawl": True or False, # If the robo was unable to crawl the app; perhaps because the app did not start. 2549 "notInstalled": True or False, # If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform. 2550 "timedOut": True or False, # If the test overran some time limit, and that is why it failed. 2551 }, 2552 "summary": "A String", # The simplest way to interpret a result. 2553 # 2554 # Required 2555 }, 2556 "deviceUsageDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How much the device resource is used to perform the test. 2557 # 2558 # This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. 2559 # 2560 # PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. 2561 # 2562 # - In response: present if previously set. - In create request: optional - In update request: optional 2563 # 2564 # # Examples 2565 # 2566 # Example 1: Compute Duration from two Timestamps in pseudo code. 2567 # 2568 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 2569 # 2570 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 2571 # 2572 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 2573 # 2574 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 2575 # 2576 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 2577 # 2578 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 2579 # 2580 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 2581 # 2582 # Example 3: Compute Duration from datetime.timedelta in Python. 2583 # 2584 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 2585 # 2586 # # JSON Mapping 2587 # 2588 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 2589 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 2590 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 2591 }, 2592 "hasImages": True or False, # Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. 2593 # 2594 # - In response: always set - In create/update request: never set 2595 }, 2596 ], 2597 }</pre> 2598</div> 2599 2600<div class="method"> 2601 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 2602 <pre>Retrieves the next page of results. 2603 2604Args: 2605 previous_request: The request for the previous page. (required) 2606 previous_response: The response from the request for the previous page. (required) 2607 2608Returns: 2609 A request object that you can call 'execute()' on to request the next 2610 page. Returns None if there are no more items in the collection. 2611 </pre> 2612</div> 2613 2614<div class="method"> 2615 <code class="details" id="patch">patch(projectId, historyId, executionId, stepId, body, requestId=None)</code> 2616 <pre>Updates an existing Step with the supplied partial entity. 2617 2618May return any of the following canonical error codes: 2619 2620- PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist 2621 2622Args: 2623 projectId: string, A Project id. 2624 2625Required. (required) 2626 historyId: string, A History id. 2627 2628Required. (required) 2629 executionId: string, A Execution id. 2630 2631Required. (required) 2632 stepId: string, A Step id. 2633 2634Required. (required) 2635 body: object, The request body. (required) 2636 The object takes the form of: 2637 2638{ # A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). 2639 # 2640 # Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). 2641 # 2642 # Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE 2643 # 2644 # A Step can be updated until its state is set to COMPLETE at which points it becomes immutable. 2645 "testExecutionStep": { # A step that represents running tests. # An execution of a test runner. 2646 # 2647 # It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. 2648 # 2649 # Users can also add test results manually by using the test_result field. 2650 "testTiming": { # Testing timing break down to know phases. # The timing break down of the test execution. 2651 # 2652 # - In response: present if set by create or update - In create/update request: optional 2653 "testProcessDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took to run the test process. 2654 # 2655 # - In response: present if previously set. - In create/update request: optional 2656 # 2657 # # Examples 2658 # 2659 # Example 1: Compute Duration from two Timestamps in pseudo code. 2660 # 2661 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 2662 # 2663 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 2664 # 2665 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 2666 # 2667 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 2668 # 2669 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 2670 # 2671 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 2672 # 2673 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 2674 # 2675 # Example 3: Compute Duration from datetime.timedelta in Python. 2676 # 2677 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 2678 # 2679 # # JSON Mapping 2680 # 2681 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 2682 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 2683 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 2684 }, 2685 }, 2686 "testSuiteOverviews": [ # List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. 2687 # 2688 # The maximum allowed number of test suite overviews per step is 1000. 2689 # 2690 # - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead) 2691 { # A summary of a test suite result either parsed from XML or uploaded directly by a user. 2692 # 2693 # Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step. 2694 "name": "A String", # The name of the test suite. 2695 # 2696 # - In create/response: always set - In update request: never 2697 "errorCount": 42, # Number of test cases in error, typically set by the service by parsing the xml_source. 2698 # 2699 # - In create/response: always set - In update request: never 2700 "totalCount": 42, # Number of test cases, typically set by the service by parsing the xml_source. 2701 # 2702 # - In create/response: always set - In update request: never 2703 "xmlSource": { # A reference to a file. # If this test suite was parsed from XML, this is the URI where the original XML file is stored. 2704 # 2705 # Note: Multiple test suites can share the same xml_source 2706 # 2707 # Returns INVALID_ARGUMENT if the uri format is not supported. 2708 # 2709 # - In create/response: optional - In update request: never 2710 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2711 # 2712 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2713 # 2714 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2715 # 2716 # - In response: always set - In create/update request: always set 2717 }, 2718 "failureCount": 42, # Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. 2719 # 2720 # - In create/response: always set - In update request: never 2721 "skippedCount": 42, # Number of test cases not run, typically set by the service by parsing the xml_source. 2722 # 2723 # - In create/response: always set - In update request: never 2724 }, 2725 ], 2726 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # Represents the execution of the test runner. 2727 # 2728 # The exit code of this tool will be used to determine if the test passed. 2729 # 2730 # - In response: always set - In create/update request: optional 2731 "toolLogs": [ # References to any plain text logs output the tool execution. 2732 # 2733 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 2734 # 2735 # The maximum allowed number of tool logs per step is 1000. 2736 # 2737 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 2738 { # A reference to a file. 2739 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2740 # 2741 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2742 # 2743 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2744 # 2745 # - In response: always set - In create/update request: always set 2746 }, 2747 ], 2748 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 2749 # 2750 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 2751 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 2752 # 2753 # - In response: always set - In create/update request: always set 2754 }, 2755 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 2756 # 2757 # The maximum allowed number of tool outputs per step is 1000. 2758 # 2759 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 2760 { # A reference to a ToolExecution output file. 2761 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 2762 # 2763 # - In response: present if set by create/update request - In create/update request: optional 2764 # 2765 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 2766 "className": "A String", # The name of the class. 2767 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 2768 "name": "A String", # The name of the test case. 2769 # 2770 # Required. 2771 }, 2772 "output": { # A reference to a file. # A FileReference to an output file. 2773 # 2774 # - In response: always set - In create/update request: always set 2775 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2776 # 2777 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2778 # 2779 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2780 # 2781 # - In response: always set - In create/update request: always set 2782 }, 2783 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 2784 # 2785 # - In response: present if set by create/update request - In create/update request: optional 2786 # 2787 # # Examples 2788 # 2789 # Example 1: Compute Timestamp from POSIX `time()`. 2790 # 2791 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 2792 # 2793 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 2794 # 2795 # struct timeval tv; gettimeofday(&tv, NULL); 2796 # 2797 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 2798 # 2799 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 2800 # 2801 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 2802 # 2803 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 2804 # 2805 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 2806 # 2807 # long millis = System.currentTimeMillis(); 2808 # 2809 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 2810 # 2811 # 2812 # 2813 # Example 5: Compute Timestamp from current time in Python. 2814 # 2815 # timestamp = Timestamp() timestamp.GetCurrentTime() 2816 # 2817 # # JSON Mapping 2818 # 2819 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 2820 # 2821 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 2822 # 2823 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 2824 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 2825 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 2826 }, 2827 }, 2828 ], 2829 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 2830 # 2831 # - In response: present if set by create request - In create request: optional - In update request: never set 2832 "A String", 2833 ], 2834 }, 2835 "testIssues": [ # Issues observed during the test execution. 2836 # 2837 # For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. 2838 # 2839 # - In response: present if set by create or update - In create/update request: optional 2840 { # An abnormal event observed during the test execution. 2841 "stackTrace": { # A stacktrace. # Optional. 2842 "exception": "A String", # The stack trace message. 2843 # 2844 # Required 2845 }, 2846 "errorMessage": "A String", # A brief human-readable message describing the abnormal event. 2847 # 2848 # Required. 2849 }, 2850 ], 2851 }, 2852 "toolExecutionStep": { # Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another. # An execution of a tool (used for steps we don't explicitly support). 2853 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # A Tool execution. 2854 # 2855 # - In response: present if set by create/update request - In create/update request: optional 2856 "toolLogs": [ # References to any plain text logs output the tool execution. 2857 # 2858 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 2859 # 2860 # The maximum allowed number of tool logs per step is 1000. 2861 # 2862 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 2863 { # A reference to a file. 2864 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2865 # 2866 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2867 # 2868 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2869 # 2870 # - In response: always set - In create/update request: always set 2871 }, 2872 ], 2873 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 2874 # 2875 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 2876 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 2877 # 2878 # - In response: always set - In create/update request: always set 2879 }, 2880 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 2881 # 2882 # The maximum allowed number of tool outputs per step is 1000. 2883 # 2884 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 2885 { # A reference to a ToolExecution output file. 2886 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 2887 # 2888 # - In response: present if set by create/update request - In create/update request: optional 2889 # 2890 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 2891 "className": "A String", # The name of the class. 2892 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 2893 "name": "A String", # The name of the test case. 2894 # 2895 # Required. 2896 }, 2897 "output": { # A reference to a file. # A FileReference to an output file. 2898 # 2899 # - In response: always set - In create/update request: always set 2900 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 2901 # 2902 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 2903 # 2904 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 2905 # 2906 # - In response: always set - In create/update request: always set 2907 }, 2908 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 2909 # 2910 # - In response: present if set by create/update request - In create/update request: optional 2911 # 2912 # # Examples 2913 # 2914 # Example 1: Compute Timestamp from POSIX `time()`. 2915 # 2916 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 2917 # 2918 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 2919 # 2920 # struct timeval tv; gettimeofday(&tv, NULL); 2921 # 2922 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 2923 # 2924 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 2925 # 2926 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 2927 # 2928 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 2929 # 2930 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 2931 # 2932 # long millis = System.currentTimeMillis(); 2933 # 2934 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 2935 # 2936 # 2937 # 2938 # Example 5: Compute Timestamp from current time in Python. 2939 # 2940 # timestamp = Timestamp() timestamp.GetCurrentTime() 2941 # 2942 # # JSON Mapping 2943 # 2944 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 2945 # 2946 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 2947 # 2948 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 2949 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 2950 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 2951 }, 2952 }, 2953 ], 2954 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 2955 # 2956 # - In response: present if set by create request - In create request: optional - In update request: never set 2957 "A String", 2958 ], 2959 }, 2960 }, 2961 "stepId": "A String", # A unique identifier within a Execution for this Step. 2962 # 2963 # Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. 2964 # 2965 # - In response: always set - In create/update request: never set 2966 "runDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took for this step to run. 2967 # 2968 # If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. 2969 # 2970 # PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. 2971 # 2972 # - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional 2973 # 2974 # # Examples 2975 # 2976 # Example 1: Compute Duration from two Timestamps in pseudo code. 2977 # 2978 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 2979 # 2980 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 2981 # 2982 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 2983 # 2984 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 2985 # 2986 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 2987 # 2988 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 2989 # 2990 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 2991 # 2992 # Example 3: Compute Duration from datetime.timedelta in Python. 2993 # 2994 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 2995 # 2996 # # JSON Mapping 2997 # 2998 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 2999 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 3000 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 3001 }, 3002 "description": "A String", # A description of this tool For example: mvn clean package -D skipTests=true 3003 # 3004 # - In response: present if set by create/update request - In create/update request: optional 3005 "labels": [ # Arbitrary user-supplied key/value pairs that are associated with the step. 3006 # 3007 # Users are responsible for managing the key namespace such that keys don't accidentally collide. 3008 # 3009 # An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. 3010 # 3011 # - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value 3012 { 3013 "value": "A String", 3014 "key": "A String", 3015 }, 3016 ], 3017 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step was created. 3018 # 3019 # - In response: always set - In create/update request: never set 3020 # 3021 # # Examples 3022 # 3023 # Example 1: Compute Timestamp from POSIX `time()`. 3024 # 3025 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 3026 # 3027 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 3028 # 3029 # struct timeval tv; gettimeofday(&tv, NULL); 3030 # 3031 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 3032 # 3033 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 3034 # 3035 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 3036 # 3037 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 3038 # 3039 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 3040 # 3041 # long millis = System.currentTimeMillis(); 3042 # 3043 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 3044 # 3045 # 3046 # 3047 # Example 5: Compute Timestamp from current time in Python. 3048 # 3049 # timestamp = Timestamp() timestamp.GetCurrentTime() 3050 # 3051 # # JSON Mapping 3052 # 3053 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 3054 # 3055 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 3056 # 3057 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 3058 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 3059 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 3060 }, 3061 "name": "A String", # A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build 3062 # 3063 # A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. 3064 # 3065 # - In response: always set - In create request: always set - In update request: never set 3066 "state": "A String", # The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE 3067 # 3068 # A PRECONDITION_FAILED will be returned if an invalid transition is requested. 3069 # 3070 # It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. 3071 # 3072 # - In response: always set - In create/update request: optional 3073 "completionTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step status was set to complete. 3074 # 3075 # This value will be set automatically when state transitions to COMPLETE. 3076 # 3077 # - In response: set if the execution state is COMPLETE. - In create/update request: never set 3078 # 3079 # # Examples 3080 # 3081 # Example 1: Compute Timestamp from POSIX `time()`. 3082 # 3083 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 3084 # 3085 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 3086 # 3087 # struct timeval tv; gettimeofday(&tv, NULL); 3088 # 3089 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 3090 # 3091 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 3092 # 3093 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 3094 # 3095 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 3096 # 3097 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 3098 # 3099 # long millis = System.currentTimeMillis(); 3100 # 3101 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 3102 # 3103 # 3104 # 3105 # Example 5: Compute Timestamp from current time in Python. 3106 # 3107 # timestamp = Timestamp() timestamp.GetCurrentTime() 3108 # 3109 # # JSON Mapping 3110 # 3111 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 3112 # 3113 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 3114 # 3115 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 3116 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 3117 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 3118 }, 3119 "dimensionValue": [ # If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. 3120 # 3121 # The keys must exactly match the dimension_definition of the execution. 3122 # 3123 # For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` 3124 # 3125 # If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` 3126 # 3127 # If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. 3128 # 3129 # A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. 3130 # 3131 # A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. 3132 # 3133 # A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. 3134 # 3135 # - In response: present if set by create - In create request: optional - In update request: never set 3136 { 3137 "value": "A String", 3138 "key": "A String", 3139 }, 3140 ], 3141 "outcome": { # Interprets a result so that humans and machines can act on it. # Classification of the result, for example into SUCCESS or FAILURE 3142 # 3143 # - In response: present if set by create/update request - In create/update request: optional 3144 "inconclusiveDetail": { # More information about an INCONCLUSIVE outcome. 3145 # 3146 # Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. 3147 # 3148 # Optional 3149 "infrastructureFailure": True or False, # If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. 3150 # 3151 # For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail. 3152 "abortedByUser": True or False, # If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running. 3153 }, 3154 "skippedDetail": { # More information about a SKIPPED outcome. 3155 # 3156 # Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. 3157 # 3158 # Optional 3159 "incompatibleAppVersion": True or False, # If the App doesn't support the specific API level. 3160 "incompatibleArchitecture": True or False, # If the App doesn't run on the specific architecture, for example, x86. 3161 "incompatibleDevice": True or False, # If the requested OS version doesn't run on the specific device model. 3162 }, 3163 "successDetail": { # More information about a SUCCESS outcome. 3164 # 3165 # Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. 3166 # 3167 # Optional 3168 "otherNativeCrash": True or False, # If a native process other than the app crashed. 3169 }, 3170 "failureDetail": { # More information about a FAILURE outcome. 3171 # 3172 # Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. 3173 # 3174 # Optional 3175 "otherNativeCrash": True or False, # If a native process other than the app crashed. 3176 "crashed": True or False, # If the failure was severe because the system under test crashed. 3177 "unableToCrawl": True or False, # If the robo was unable to crawl the app; perhaps because the app did not start. 3178 "notInstalled": True or False, # If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform. 3179 "timedOut": True or False, # If the test overran some time limit, and that is why it failed. 3180 }, 3181 "summary": "A String", # The simplest way to interpret a result. 3182 # 3183 # Required 3184 }, 3185 "deviceUsageDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How much the device resource is used to perform the test. 3186 # 3187 # This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. 3188 # 3189 # PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. 3190 # 3191 # - In response: present if previously set. - In create request: optional - In update request: optional 3192 # 3193 # # Examples 3194 # 3195 # Example 1: Compute Duration from two Timestamps in pseudo code. 3196 # 3197 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 3198 # 3199 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 3200 # 3201 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 3202 # 3203 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 3204 # 3205 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 3206 # 3207 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 3208 # 3209 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 3210 # 3211 # Example 3: Compute Duration from datetime.timedelta in Python. 3212 # 3213 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 3214 # 3215 # # JSON Mapping 3216 # 3217 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 3218 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 3219 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 3220 }, 3221 "hasImages": True or False, # Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. 3222 # 3223 # - In response: always set - In create/update request: never set 3224} 3225 3226 requestId: string, A unique request ID for server to detect duplicated requests. For example, a UUID. 3227 3228Optional, but strongly recommended. 3229 3230Returns: 3231 An object of the form: 3232 3233 { # A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). 3234 # 3235 # Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). 3236 # 3237 # Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE 3238 # 3239 # A Step can be updated until its state is set to COMPLETE at which points it becomes immutable. 3240 "testExecutionStep": { # A step that represents running tests. # An execution of a test runner. 3241 # 3242 # It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. 3243 # 3244 # Users can also add test results manually by using the test_result field. 3245 "testTiming": { # Testing timing break down to know phases. # The timing break down of the test execution. 3246 # 3247 # - In response: present if set by create or update - In create/update request: optional 3248 "testProcessDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took to run the test process. 3249 # 3250 # - In response: present if previously set. - In create/update request: optional 3251 # 3252 # # Examples 3253 # 3254 # Example 1: Compute Duration from two Timestamps in pseudo code. 3255 # 3256 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 3257 # 3258 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 3259 # 3260 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 3261 # 3262 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 3263 # 3264 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 3265 # 3266 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 3267 # 3268 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 3269 # 3270 # Example 3: Compute Duration from datetime.timedelta in Python. 3271 # 3272 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 3273 # 3274 # # JSON Mapping 3275 # 3276 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 3277 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 3278 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 3279 }, 3280 }, 3281 "testSuiteOverviews": [ # List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. 3282 # 3283 # The maximum allowed number of test suite overviews per step is 1000. 3284 # 3285 # - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead) 3286 { # A summary of a test suite result either parsed from XML or uploaded directly by a user. 3287 # 3288 # Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step. 3289 "name": "A String", # The name of the test suite. 3290 # 3291 # - In create/response: always set - In update request: never 3292 "errorCount": 42, # Number of test cases in error, typically set by the service by parsing the xml_source. 3293 # 3294 # - In create/response: always set - In update request: never 3295 "totalCount": 42, # Number of test cases, typically set by the service by parsing the xml_source. 3296 # 3297 # - In create/response: always set - In update request: never 3298 "xmlSource": { # A reference to a file. # If this test suite was parsed from XML, this is the URI where the original XML file is stored. 3299 # 3300 # Note: Multiple test suites can share the same xml_source 3301 # 3302 # Returns INVALID_ARGUMENT if the uri format is not supported. 3303 # 3304 # - In create/response: optional - In update request: never 3305 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 3306 # 3307 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 3308 # 3309 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 3310 # 3311 # - In response: always set - In create/update request: always set 3312 }, 3313 "failureCount": 42, # Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. 3314 # 3315 # - In create/response: always set - In update request: never 3316 "skippedCount": 42, # Number of test cases not run, typically set by the service by parsing the xml_source. 3317 # 3318 # - In create/response: always set - In update request: never 3319 }, 3320 ], 3321 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # Represents the execution of the test runner. 3322 # 3323 # The exit code of this tool will be used to determine if the test passed. 3324 # 3325 # - In response: always set - In create/update request: optional 3326 "toolLogs": [ # References to any plain text logs output the tool execution. 3327 # 3328 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 3329 # 3330 # The maximum allowed number of tool logs per step is 1000. 3331 # 3332 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 3333 { # A reference to a file. 3334 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 3335 # 3336 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 3337 # 3338 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 3339 # 3340 # - In response: always set - In create/update request: always set 3341 }, 3342 ], 3343 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 3344 # 3345 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 3346 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 3347 # 3348 # - In response: always set - In create/update request: always set 3349 }, 3350 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 3351 # 3352 # The maximum allowed number of tool outputs per step is 1000. 3353 # 3354 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 3355 { # A reference to a ToolExecution output file. 3356 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 3357 # 3358 # - In response: present if set by create/update request - In create/update request: optional 3359 # 3360 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 3361 "className": "A String", # The name of the class. 3362 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 3363 "name": "A String", # The name of the test case. 3364 # 3365 # Required. 3366 }, 3367 "output": { # A reference to a file. # A FileReference to an output file. 3368 # 3369 # - In response: always set - In create/update request: always set 3370 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 3371 # 3372 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 3373 # 3374 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 3375 # 3376 # - In response: always set - In create/update request: always set 3377 }, 3378 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 3379 # 3380 # - In response: present if set by create/update request - In create/update request: optional 3381 # 3382 # # Examples 3383 # 3384 # Example 1: Compute Timestamp from POSIX `time()`. 3385 # 3386 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 3387 # 3388 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 3389 # 3390 # struct timeval tv; gettimeofday(&tv, NULL); 3391 # 3392 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 3393 # 3394 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 3395 # 3396 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 3397 # 3398 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 3399 # 3400 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 3401 # 3402 # long millis = System.currentTimeMillis(); 3403 # 3404 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 3405 # 3406 # 3407 # 3408 # Example 5: Compute Timestamp from current time in Python. 3409 # 3410 # timestamp = Timestamp() timestamp.GetCurrentTime() 3411 # 3412 # # JSON Mapping 3413 # 3414 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 3415 # 3416 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 3417 # 3418 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 3419 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 3420 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 3421 }, 3422 }, 3423 ], 3424 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 3425 # 3426 # - In response: present if set by create request - In create request: optional - In update request: never set 3427 "A String", 3428 ], 3429 }, 3430 "testIssues": [ # Issues observed during the test execution. 3431 # 3432 # For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. 3433 # 3434 # - In response: present if set by create or update - In create/update request: optional 3435 { # An abnormal event observed during the test execution. 3436 "stackTrace": { # A stacktrace. # Optional. 3437 "exception": "A String", # The stack trace message. 3438 # 3439 # Required 3440 }, 3441 "errorMessage": "A String", # A brief human-readable message describing the abnormal event. 3442 # 3443 # Required. 3444 }, 3445 ], 3446 }, 3447 "toolExecutionStep": { # Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another. # An execution of a tool (used for steps we don't explicitly support). 3448 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # A Tool execution. 3449 # 3450 # - In response: present if set by create/update request - In create/update request: optional 3451 "toolLogs": [ # References to any plain text logs output the tool execution. 3452 # 3453 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 3454 # 3455 # The maximum allowed number of tool logs per step is 1000. 3456 # 3457 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 3458 { # A reference to a file. 3459 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 3460 # 3461 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 3462 # 3463 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 3464 # 3465 # - In response: always set - In create/update request: always set 3466 }, 3467 ], 3468 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 3469 # 3470 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 3471 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 3472 # 3473 # - In response: always set - In create/update request: always set 3474 }, 3475 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 3476 # 3477 # The maximum allowed number of tool outputs per step is 1000. 3478 # 3479 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 3480 { # A reference to a ToolExecution output file. 3481 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 3482 # 3483 # - In response: present if set by create/update request - In create/update request: optional 3484 # 3485 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 3486 "className": "A String", # The name of the class. 3487 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 3488 "name": "A String", # The name of the test case. 3489 # 3490 # Required. 3491 }, 3492 "output": { # A reference to a file. # A FileReference to an output file. 3493 # 3494 # - In response: always set - In create/update request: always set 3495 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 3496 # 3497 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 3498 # 3499 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 3500 # 3501 # - In response: always set - In create/update request: always set 3502 }, 3503 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 3504 # 3505 # - In response: present if set by create/update request - In create/update request: optional 3506 # 3507 # # Examples 3508 # 3509 # Example 1: Compute Timestamp from POSIX `time()`. 3510 # 3511 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 3512 # 3513 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 3514 # 3515 # struct timeval tv; gettimeofday(&tv, NULL); 3516 # 3517 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 3518 # 3519 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 3520 # 3521 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 3522 # 3523 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 3524 # 3525 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 3526 # 3527 # long millis = System.currentTimeMillis(); 3528 # 3529 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 3530 # 3531 # 3532 # 3533 # Example 5: Compute Timestamp from current time in Python. 3534 # 3535 # timestamp = Timestamp() timestamp.GetCurrentTime() 3536 # 3537 # # JSON Mapping 3538 # 3539 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 3540 # 3541 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 3542 # 3543 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 3544 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 3545 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 3546 }, 3547 }, 3548 ], 3549 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 3550 # 3551 # - In response: present if set by create request - In create request: optional - In update request: never set 3552 "A String", 3553 ], 3554 }, 3555 }, 3556 "stepId": "A String", # A unique identifier within a Execution for this Step. 3557 # 3558 # Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. 3559 # 3560 # - In response: always set - In create/update request: never set 3561 "runDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took for this step to run. 3562 # 3563 # If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. 3564 # 3565 # PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. 3566 # 3567 # - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional 3568 # 3569 # # Examples 3570 # 3571 # Example 1: Compute Duration from two Timestamps in pseudo code. 3572 # 3573 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 3574 # 3575 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 3576 # 3577 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 3578 # 3579 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 3580 # 3581 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 3582 # 3583 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 3584 # 3585 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 3586 # 3587 # Example 3: Compute Duration from datetime.timedelta in Python. 3588 # 3589 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 3590 # 3591 # # JSON Mapping 3592 # 3593 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 3594 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 3595 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 3596 }, 3597 "description": "A String", # A description of this tool For example: mvn clean package -D skipTests=true 3598 # 3599 # - In response: present if set by create/update request - In create/update request: optional 3600 "labels": [ # Arbitrary user-supplied key/value pairs that are associated with the step. 3601 # 3602 # Users are responsible for managing the key namespace such that keys don't accidentally collide. 3603 # 3604 # An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. 3605 # 3606 # - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value 3607 { 3608 "value": "A String", 3609 "key": "A String", 3610 }, 3611 ], 3612 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step was created. 3613 # 3614 # - In response: always set - In create/update request: never set 3615 # 3616 # # Examples 3617 # 3618 # Example 1: Compute Timestamp from POSIX `time()`. 3619 # 3620 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 3621 # 3622 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 3623 # 3624 # struct timeval tv; gettimeofday(&tv, NULL); 3625 # 3626 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 3627 # 3628 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 3629 # 3630 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 3631 # 3632 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 3633 # 3634 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 3635 # 3636 # long millis = System.currentTimeMillis(); 3637 # 3638 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 3639 # 3640 # 3641 # 3642 # Example 5: Compute Timestamp from current time in Python. 3643 # 3644 # timestamp = Timestamp() timestamp.GetCurrentTime() 3645 # 3646 # # JSON Mapping 3647 # 3648 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 3649 # 3650 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 3651 # 3652 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 3653 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 3654 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 3655 }, 3656 "name": "A String", # A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build 3657 # 3658 # A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. 3659 # 3660 # - In response: always set - In create request: always set - In update request: never set 3661 "state": "A String", # The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE 3662 # 3663 # A PRECONDITION_FAILED will be returned if an invalid transition is requested. 3664 # 3665 # It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. 3666 # 3667 # - In response: always set - In create/update request: optional 3668 "completionTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step status was set to complete. 3669 # 3670 # This value will be set automatically when state transitions to COMPLETE. 3671 # 3672 # - In response: set if the execution state is COMPLETE. - In create/update request: never set 3673 # 3674 # # Examples 3675 # 3676 # Example 1: Compute Timestamp from POSIX `time()`. 3677 # 3678 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 3679 # 3680 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 3681 # 3682 # struct timeval tv; gettimeofday(&tv, NULL); 3683 # 3684 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 3685 # 3686 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 3687 # 3688 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 3689 # 3690 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 3691 # 3692 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 3693 # 3694 # long millis = System.currentTimeMillis(); 3695 # 3696 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 3697 # 3698 # 3699 # 3700 # Example 5: Compute Timestamp from current time in Python. 3701 # 3702 # timestamp = Timestamp() timestamp.GetCurrentTime() 3703 # 3704 # # JSON Mapping 3705 # 3706 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 3707 # 3708 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 3709 # 3710 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 3711 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 3712 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 3713 }, 3714 "dimensionValue": [ # If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. 3715 # 3716 # The keys must exactly match the dimension_definition of the execution. 3717 # 3718 # For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` 3719 # 3720 # If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` 3721 # 3722 # If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. 3723 # 3724 # A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. 3725 # 3726 # A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. 3727 # 3728 # A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. 3729 # 3730 # - In response: present if set by create - In create request: optional - In update request: never set 3731 { 3732 "value": "A String", 3733 "key": "A String", 3734 }, 3735 ], 3736 "outcome": { # Interprets a result so that humans and machines can act on it. # Classification of the result, for example into SUCCESS or FAILURE 3737 # 3738 # - In response: present if set by create/update request - In create/update request: optional 3739 "inconclusiveDetail": { # More information about an INCONCLUSIVE outcome. 3740 # 3741 # Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. 3742 # 3743 # Optional 3744 "infrastructureFailure": True or False, # If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. 3745 # 3746 # For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail. 3747 "abortedByUser": True or False, # If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running. 3748 }, 3749 "skippedDetail": { # More information about a SKIPPED outcome. 3750 # 3751 # Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. 3752 # 3753 # Optional 3754 "incompatibleAppVersion": True or False, # If the App doesn't support the specific API level. 3755 "incompatibleArchitecture": True or False, # If the App doesn't run on the specific architecture, for example, x86. 3756 "incompatibleDevice": True or False, # If the requested OS version doesn't run on the specific device model. 3757 }, 3758 "successDetail": { # More information about a SUCCESS outcome. 3759 # 3760 # Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. 3761 # 3762 # Optional 3763 "otherNativeCrash": True or False, # If a native process other than the app crashed. 3764 }, 3765 "failureDetail": { # More information about a FAILURE outcome. 3766 # 3767 # Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. 3768 # 3769 # Optional 3770 "otherNativeCrash": True or False, # If a native process other than the app crashed. 3771 "crashed": True or False, # If the failure was severe because the system under test crashed. 3772 "unableToCrawl": True or False, # If the robo was unable to crawl the app; perhaps because the app did not start. 3773 "notInstalled": True or False, # If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform. 3774 "timedOut": True or False, # If the test overran some time limit, and that is why it failed. 3775 }, 3776 "summary": "A String", # The simplest way to interpret a result. 3777 # 3778 # Required 3779 }, 3780 "deviceUsageDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How much the device resource is used to perform the test. 3781 # 3782 # This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. 3783 # 3784 # PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. 3785 # 3786 # - In response: present if previously set. - In create request: optional - In update request: optional 3787 # 3788 # # Examples 3789 # 3790 # Example 1: Compute Duration from two Timestamps in pseudo code. 3791 # 3792 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 3793 # 3794 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 3795 # 3796 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 3797 # 3798 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 3799 # 3800 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 3801 # 3802 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 3803 # 3804 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 3805 # 3806 # Example 3: Compute Duration from datetime.timedelta in Python. 3807 # 3808 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 3809 # 3810 # # JSON Mapping 3811 # 3812 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 3813 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 3814 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 3815 }, 3816 "hasImages": True or False, # Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. 3817 # 3818 # - In response: always set - In create/update request: never set 3819 }</pre> 3820</div> 3821 3822<div class="method"> 3823 <code class="details" id="publishXunitXmlFiles">publishXunitXmlFiles(projectId, historyId, executionId, stepId, body)</code> 3824 <pre>Publish xml files to an existing Step. 3825 3826May return any of the following canonical error codes: 3827 3828- PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist 3829 3830Args: 3831 projectId: string, A Project id. 3832 3833Required. (required) 3834 historyId: string, A History id. 3835 3836Required. (required) 3837 executionId: string, A Execution id. 3838 3839Required. (required) 3840 stepId: string, A Step id. Note: This step must include a TestExecutionStep. 3841 3842Required. (required) 3843 body: object, The request body. (required) 3844 The object takes the form of: 3845 3846{ # Request message for StepService.PublishXunitXmlFiles. 3847 "xunitXmlFiles": [ # URI of the Xunit XML files to publish. 3848 # 3849 # The maximum size of the file this reference is pointing to is 50MB. 3850 # 3851 # Required. 3852 { # A reference to a file. 3853 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 3854 # 3855 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 3856 # 3857 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 3858 # 3859 # - In response: always set - In create/update request: always set 3860 }, 3861 ], 3862 } 3863 3864 3865Returns: 3866 An object of the form: 3867 3868 { # A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). 3869 # 3870 # Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). 3871 # 3872 # Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates an TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE 3873 # 3874 # A Step can be updated until its state is set to COMPLETE at which points it becomes immutable. 3875 "testExecutionStep": { # A step that represents running tests. # An execution of a test runner. 3876 # 3877 # It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. 3878 # 3879 # Users can also add test results manually by using the test_result field. 3880 "testTiming": { # Testing timing break down to know phases. # The timing break down of the test execution. 3881 # 3882 # - In response: present if set by create or update - In create/update request: optional 3883 "testProcessDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took to run the test process. 3884 # 3885 # - In response: present if previously set. - In create/update request: optional 3886 # 3887 # # Examples 3888 # 3889 # Example 1: Compute Duration from two Timestamps in pseudo code. 3890 # 3891 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 3892 # 3893 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 3894 # 3895 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 3896 # 3897 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 3898 # 3899 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 3900 # 3901 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 3902 # 3903 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 3904 # 3905 # Example 3: Compute Duration from datetime.timedelta in Python. 3906 # 3907 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 3908 # 3909 # # JSON Mapping 3910 # 3911 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 3912 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 3913 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 3914 }, 3915 }, 3916 "testSuiteOverviews": [ # List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. 3917 # 3918 # The maximum allowed number of test suite overviews per step is 1000. 3919 # 3920 # - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead) 3921 { # A summary of a test suite result either parsed from XML or uploaded directly by a user. 3922 # 3923 # Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step. 3924 "name": "A String", # The name of the test suite. 3925 # 3926 # - In create/response: always set - In update request: never 3927 "errorCount": 42, # Number of test cases in error, typically set by the service by parsing the xml_source. 3928 # 3929 # - In create/response: always set - In update request: never 3930 "totalCount": 42, # Number of test cases, typically set by the service by parsing the xml_source. 3931 # 3932 # - In create/response: always set - In update request: never 3933 "xmlSource": { # A reference to a file. # If this test suite was parsed from XML, this is the URI where the original XML file is stored. 3934 # 3935 # Note: Multiple test suites can share the same xml_source 3936 # 3937 # Returns INVALID_ARGUMENT if the uri format is not supported. 3938 # 3939 # - In create/response: optional - In update request: never 3940 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 3941 # 3942 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 3943 # 3944 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 3945 # 3946 # - In response: always set - In create/update request: always set 3947 }, 3948 "failureCount": 42, # Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. 3949 # 3950 # - In create/response: always set - In update request: never 3951 "skippedCount": 42, # Number of test cases not run, typically set by the service by parsing the xml_source. 3952 # 3953 # - In create/response: always set - In update request: never 3954 }, 3955 ], 3956 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # Represents the execution of the test runner. 3957 # 3958 # The exit code of this tool will be used to determine if the test passed. 3959 # 3960 # - In response: always set - In create/update request: optional 3961 "toolLogs": [ # References to any plain text logs output the tool execution. 3962 # 3963 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 3964 # 3965 # The maximum allowed number of tool logs per step is 1000. 3966 # 3967 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 3968 { # A reference to a file. 3969 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 3970 # 3971 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 3972 # 3973 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 3974 # 3975 # - In response: always set - In create/update request: always set 3976 }, 3977 ], 3978 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 3979 # 3980 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 3981 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 3982 # 3983 # - In response: always set - In create/update request: always set 3984 }, 3985 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 3986 # 3987 # The maximum allowed number of tool outputs per step is 1000. 3988 # 3989 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 3990 { # A reference to a ToolExecution output file. 3991 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 3992 # 3993 # - In response: present if set by create/update request - In create/update request: optional 3994 # 3995 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 3996 "className": "A String", # The name of the class. 3997 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 3998 "name": "A String", # The name of the test case. 3999 # 4000 # Required. 4001 }, 4002 "output": { # A reference to a file. # A FileReference to an output file. 4003 # 4004 # - In response: always set - In create/update request: always set 4005 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 4006 # 4007 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 4008 # 4009 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 4010 # 4011 # - In response: always set - In create/update request: always set 4012 }, 4013 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 4014 # 4015 # - In response: present if set by create/update request - In create/update request: optional 4016 # 4017 # # Examples 4018 # 4019 # Example 1: Compute Timestamp from POSIX `time()`. 4020 # 4021 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 4022 # 4023 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 4024 # 4025 # struct timeval tv; gettimeofday(&tv, NULL); 4026 # 4027 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 4028 # 4029 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 4030 # 4031 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 4032 # 4033 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 4034 # 4035 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 4036 # 4037 # long millis = System.currentTimeMillis(); 4038 # 4039 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 4040 # 4041 # 4042 # 4043 # Example 5: Compute Timestamp from current time in Python. 4044 # 4045 # timestamp = Timestamp() timestamp.GetCurrentTime() 4046 # 4047 # # JSON Mapping 4048 # 4049 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 4050 # 4051 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 4052 # 4053 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 4054 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 4055 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 4056 }, 4057 }, 4058 ], 4059 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 4060 # 4061 # - In response: present if set by create request - In create request: optional - In update request: never set 4062 "A String", 4063 ], 4064 }, 4065 "testIssues": [ # Issues observed during the test execution. 4066 # 4067 # For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. 4068 # 4069 # - In response: present if set by create or update - In create/update request: optional 4070 { # An abnormal event observed during the test execution. 4071 "stackTrace": { # A stacktrace. # Optional. 4072 "exception": "A String", # The stack trace message. 4073 # 4074 # Required 4075 }, 4076 "errorMessage": "A String", # A brief human-readable message describing the abnormal event. 4077 # 4078 # Required. 4079 }, 4080 ], 4081 }, 4082 "toolExecutionStep": { # Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another. # An execution of a tool (used for steps we don't explicitly support). 4083 "toolExecution": { # An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code. # A Tool execution. 4084 # 4085 # - In response: present if set by create/update request - In create/update request: optional 4086 "toolLogs": [ # References to any plain text logs output the tool execution. 4087 # 4088 # This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. 4089 # 4090 # The maximum allowed number of tool logs per step is 1000. 4091 # 4092 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 4093 { # A reference to a file. 4094 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 4095 # 4096 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 4097 # 4098 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 4099 # 4100 # - In response: always set - In create/update request: always set 4101 }, 4102 ], 4103 "exitCode": { # Exit code from a tool execution. # Tool execution exit code. This field will be set once the tool has exited. 4104 # 4105 # - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set. 4106 "number": 42, # Tool execution exit code. A value of 0 means that the execution was successful. 4107 # 4108 # - In response: always set - In create/update request: always set 4109 }, 4110 "toolOutputs": [ # References to opaque files of any format output by the tool execution. 4111 # 4112 # The maximum allowed number of tool outputs per step is 1000. 4113 # 4114 # - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list 4115 { # A reference to a ToolExecution output file. 4116 "testCase": { # A reference to a test case. # The test case to which this output file belongs. 4117 # 4118 # - In response: present if set by create/update request - In create/update request: optional 4119 # 4120 # Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name. 4121 "className": "A String", # The name of the class. 4122 "testSuiteName": "A String", # The name of the test suite to which this test case belongs. 4123 "name": "A String", # The name of the test case. 4124 # 4125 # Required. 4126 }, 4127 "output": { # A reference to a file. # A FileReference to an output file. 4128 # 4129 # - In response: always set - In create/update request: always set 4130 "fileUri": "A String", # The URI of a file stored in Google Cloud Storage. 4131 # 4132 # For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 4133 # 4134 # An INVALID_ARGUMENT error will be returned if the URI format is not supported. 4135 # 4136 # - In response: always set - In create/update request: always set 4137 }, 4138 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The creation time of the file. 4139 # 4140 # - In response: present if set by create/update request - In create/update request: optional 4141 # 4142 # # Examples 4143 # 4144 # Example 1: Compute Timestamp from POSIX `time()`. 4145 # 4146 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 4147 # 4148 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 4149 # 4150 # struct timeval tv; gettimeofday(&tv, NULL); 4151 # 4152 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 4153 # 4154 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 4155 # 4156 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 4157 # 4158 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 4159 # 4160 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 4161 # 4162 # long millis = System.currentTimeMillis(); 4163 # 4164 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 4165 # 4166 # 4167 # 4168 # Example 5: Compute Timestamp from current time in Python. 4169 # 4170 # timestamp = Timestamp() timestamp.GetCurrentTime() 4171 # 4172 # # JSON Mapping 4173 # 4174 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 4175 # 4176 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 4177 # 4178 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 4179 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 4180 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 4181 }, 4182 }, 4183 ], 4184 "commandLineArguments": [ # The full tokenized command line including the program name (equivalent to argv in a C program). 4185 # 4186 # - In response: present if set by create request - In create request: optional - In update request: never set 4187 "A String", 4188 ], 4189 }, 4190 }, 4191 "stepId": "A String", # A unique identifier within a Execution for this Step. 4192 # 4193 # Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. 4194 # 4195 # - In response: always set - In create/update request: never set 4196 "runDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How long it took for this step to run. 4197 # 4198 # If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. 4199 # 4200 # PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. 4201 # 4202 # - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional 4203 # 4204 # # Examples 4205 # 4206 # Example 1: Compute Duration from two Timestamps in pseudo code. 4207 # 4208 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 4209 # 4210 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 4211 # 4212 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 4213 # 4214 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 4215 # 4216 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 4217 # 4218 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 4219 # 4220 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 4221 # 4222 # Example 3: Compute Duration from datetime.timedelta in Python. 4223 # 4224 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 4225 # 4226 # # JSON Mapping 4227 # 4228 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 4229 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 4230 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 4231 }, 4232 "description": "A String", # A description of this tool For example: mvn clean package -D skipTests=true 4233 # 4234 # - In response: present if set by create/update request - In create/update request: optional 4235 "labels": [ # Arbitrary user-supplied key/value pairs that are associated with the step. 4236 # 4237 # Users are responsible for managing the key namespace such that keys don't accidentally collide. 4238 # 4239 # An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. 4240 # 4241 # - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value 4242 { 4243 "value": "A String", 4244 "key": "A String", 4245 }, 4246 ], 4247 "creationTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step was created. 4248 # 4249 # - In response: always set - In create/update request: never set 4250 # 4251 # # Examples 4252 # 4253 # Example 1: Compute Timestamp from POSIX `time()`. 4254 # 4255 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 4256 # 4257 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 4258 # 4259 # struct timeval tv; gettimeofday(&tv, NULL); 4260 # 4261 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 4262 # 4263 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 4264 # 4265 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 4266 # 4267 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 4268 # 4269 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 4270 # 4271 # long millis = System.currentTimeMillis(); 4272 # 4273 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 4274 # 4275 # 4276 # 4277 # Example 5: Compute Timestamp from current time in Python. 4278 # 4279 # timestamp = Timestamp() timestamp.GetCurrentTime() 4280 # 4281 # # JSON Mapping 4282 # 4283 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 4284 # 4285 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 4286 # 4287 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 4288 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 4289 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 4290 }, 4291 "name": "A String", # A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build 4292 # 4293 # A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. 4294 # 4295 # - In response: always set - In create request: always set - In update request: never set 4296 "state": "A String", # The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE 4297 # 4298 # A PRECONDITION_FAILED will be returned if an invalid transition is requested. 4299 # 4300 # It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. 4301 # 4302 # - In response: always set - In create/update request: optional 4303 "completionTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # The time when the step status was set to complete. 4304 # 4305 # This value will be set automatically when state transitions to COMPLETE. 4306 # 4307 # - In response: set if the execution state is COMPLETE. - In create/update request: never set 4308 # 4309 # # Examples 4310 # 4311 # Example 1: Compute Timestamp from POSIX `time()`. 4312 # 4313 # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); 4314 # 4315 # Example 2: Compute Timestamp from POSIX `gettimeofday()`. 4316 # 4317 # struct timeval tv; gettimeofday(&tv, NULL); 4318 # 4319 # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); 4320 # 4321 # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. 4322 # 4323 # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; 4324 # 4325 # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); 4326 # 4327 # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. 4328 # 4329 # long millis = System.currentTimeMillis(); 4330 # 4331 # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); 4332 # 4333 # 4334 # 4335 # Example 5: Compute Timestamp from current time in Python. 4336 # 4337 # timestamp = Timestamp() timestamp.GetCurrentTime() 4338 # 4339 # # JSON Mapping 4340 # 4341 # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported. 4342 # 4343 # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. 4344 # 4345 # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format. 4346 "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. 4347 "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive. 4348 }, 4349 "dimensionValue": [ # If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. 4350 # 4351 # The keys must exactly match the dimension_definition of the execution. 4352 # 4353 # For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` 4354 # 4355 # If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` 4356 # 4357 # If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. 4358 # 4359 # A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. 4360 # 4361 # A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. 4362 # 4363 # A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. 4364 # 4365 # - In response: present if set by create - In create request: optional - In update request: never set 4366 { 4367 "value": "A String", 4368 "key": "A String", 4369 }, 4370 ], 4371 "outcome": { # Interprets a result so that humans and machines can act on it. # Classification of the result, for example into SUCCESS or FAILURE 4372 # 4373 # - In response: present if set by create/update request - In create/update request: optional 4374 "inconclusiveDetail": { # More information about an INCONCLUSIVE outcome. 4375 # 4376 # Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. 4377 # 4378 # Optional 4379 "infrastructureFailure": True or False, # If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. 4380 # 4381 # For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail. 4382 "abortedByUser": True or False, # If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running. 4383 }, 4384 "skippedDetail": { # More information about a SKIPPED outcome. 4385 # 4386 # Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. 4387 # 4388 # Optional 4389 "incompatibleAppVersion": True or False, # If the App doesn't support the specific API level. 4390 "incompatibleArchitecture": True or False, # If the App doesn't run on the specific architecture, for example, x86. 4391 "incompatibleDevice": True or False, # If the requested OS version doesn't run on the specific device model. 4392 }, 4393 "successDetail": { # More information about a SUCCESS outcome. 4394 # 4395 # Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. 4396 # 4397 # Optional 4398 "otherNativeCrash": True or False, # If a native process other than the app crashed. 4399 }, 4400 "failureDetail": { # More information about a FAILURE outcome. 4401 # 4402 # Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. 4403 # 4404 # Optional 4405 "otherNativeCrash": True or False, # If a native process other than the app crashed. 4406 "crashed": True or False, # If the failure was severe because the system under test crashed. 4407 "unableToCrawl": True or False, # If the robo was unable to crawl the app; perhaps because the app did not start. 4408 "notInstalled": True or False, # If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform. 4409 "timedOut": True or False, # If the test overran some time limit, and that is why it failed. 4410 }, 4411 "summary": "A String", # The simplest way to interpret a result. 4412 # 4413 # Required 4414 }, 4415 "deviceUsageDuration": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # How much the device resource is used to perform the test. 4416 # 4417 # This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. 4418 # 4419 # PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. 4420 # 4421 # - In response: present if previously set. - In create request: optional - In update request: optional 4422 # 4423 # # Examples 4424 # 4425 # Example 1: Compute Duration from two Timestamps in pseudo code. 4426 # 4427 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 4428 # 4429 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 4430 # 4431 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 4432 # 4433 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 4434 # 4435 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 4436 # 4437 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 4438 # 4439 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 4440 # 4441 # Example 3: Compute Duration from datetime.timedelta in Python. 4442 # 4443 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 4444 # 4445 # # JSON Mapping 4446 # 4447 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 4448 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 4449 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 4450 }, 4451 "hasImages": True or False, # Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. 4452 # 4453 # - In response: always set - In create/update request: never set 4454 }</pre> 4455</div> 4456 4457</body></html>