REST Resource: projects.histories.executions.environments

Resource: Environment

An Environment represents the set of test runs (Steps) from the parent Execution that are configured with the same set of dimensions (Model, Version, Locale, and Orientation). Multiple such runs occur particularly because of features like sharding (splitting up a test suite to run in parallel across devices) and reruns (running a test multiple times to check for different outcomes).

JSON representation
{
  "projectId": string,
  "historyId": string,
  "executionId": string,
  "environmentId": string,
  "dimensionValue": {
    string: string,
    ...
  },
  "displayName": string,
  "creationTime": {
    object (Timestamp)
  },
  "completionTime": {
    object (Timestamp)
  },
  "shardSummaries": [
    {
      object (ShardSummary)
    }
  ],
  "environmentResult": {
    object (MergedResult)
  },
  "resultsStorage": {
    object (ResultsStorage)
  }
}
Fields
projectId

string

Output only. A Project id.

historyId

string

Output only. A History id.

executionId

string

Output only. An Execution id.

environmentId

string

Output only. An Environment id.

dimensionValue

map (key: string, value: string)

Dimension values describing the environment. Dimension values always consist of "Model", "Version", "Locale", and "Orientation".

  • In response: always set
  • In create request: always set
  • In update request: never set

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

displayName

string

A short human-readable name to display in the UI. Maximum of 100 characters. For example: Nexus 5, API 27.

creationTime

object (Timestamp)

Output only. The time when the Environment was created.

completionTime

object (Timestamp)

Output only. The time when the Environment status was set to complete.

This value will be set automatically when state transitions to COMPLETE.

shardSummaries[]

object (ShardSummary)

Output only. Summaries of shards.

Only one shard will present unless sharding feature is enabled in TestExecutionService.

environmentResult

object (MergedResult)

Merged result of the environment.

resultsStorage

object (ResultsStorage)

The location where output files are stored in the user bucket.

ShardSummary

Result summary for a shard in an environment.

JSON representation
{
  "runs": [
    {
      object (StepSummary)
    }
  ],
  "shardResult": {
    object (MergedResult)
  }
}
Fields
runs[]

object (StepSummary)

Summaries of the steps belonging to the shard.

With flaky_test_attempts enabled from TestExecutionService, more than one run (Step) can present. And the runs will be sorted by multistepNumber.

shardResult

object (MergedResult)

Merged result of the shard.

StepSummary

This type has no fields.

Lightweight summary of a step within this execution.

MergedResult

Merged test result for environment.

If the environment has only one step (no reruns or shards), then the merged result is the same as the step result. If the environment has multiple shards and/or reruns, then the results of shards and reruns that belong to the same environment are merged into one environment result.

JSON representation
{
  "state": enum (State),
  "outcome": {
    object (Outcome)
  },
  "testSuiteOverviews": [
    {
      object (TestSuiteOverview)
    }
  ]
}
Fields
state

enum (State)

State of the resource

outcome

object (Outcome)

Outcome of the resource

testSuiteOverviews[]

object (TestSuiteOverview)

The combined and rolled-up result of each test suite that was run as part of this environment.

Combining: When the test cases from a suite are run in different steps (sharding), the results are added back together in one overview. (e.g., if shard1 has 2 failures and shard2 has 1 failure than the overview failureCount = 3).

Rollup: When test cases from the same suite are run multiple times (flaky), the results are combined (e.g., if testcase1.run1 fails, testcase1.run2 passes, and both testcase2.run1 and testcase2.run2 fail then the overview flakyCount = 1 and failureCount = 1).

ResultsStorage

The storage for test results.

JSON representation
{
  "resultsStoragePath": {
    object (FileReference)
  },
  "xunitXmlFile": {
    object (FileReference)
  }
}
Fields
resultsStoragePath

object (FileReference)

The root directory for test results.

xunitXmlFile

object (FileReference)

The path to the Xunit XML file.

Methods

get

Gets an Environment.

list

Lists Environments for a given Execution.