Class: Google::Apis::ToolresultsV1beta3::TestSuiteOverview

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/toolresults_v1beta3/classes.rb,
generated/google/apis/toolresults_v1beta3/representations.rb,
generated/google/apis/toolresults_v1beta3/representations.rb

Overview

A summary of a test suite result either parsed from XML or uploaded directly by a user. 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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TestSuiteOverview

Returns a new instance of TestSuiteOverview



2736
2737
2738
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2736

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#elapsed_timeGoogle::Apis::ToolresultsV1beta3::Duration

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.

Examples

Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds 0) duration.seconds += 1; duration.nanos -= 1000000000; else if (duration.seconds > 0 && duration.nanos < 0) duration.seconds -= 1; duration.nanos += 1000000000; Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos = 1000000000) end.seconds += 1; end.nanos -= 1000000000; Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration. FromTimedelta(td)

JSON Mapping

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". Corresponds to the JSON property elapsedTime



2696
2697
2698
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2696

def elapsed_time
  @elapsed_time
end

#error_countFixnum

Number of test cases in error, typically set by the service by parsing the xml_source.

  • In create/response: always set - In update request: never Corresponds to the JSON property errorCount

Returns:

  • (Fixnum)


2703
2704
2705
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2703

def error_count
  @error_count
end

#failure_countFixnum

Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user.

  • In create/response: always set - In update request: never Corresponds to the JSON property failureCount

Returns:

  • (Fixnum)


2710
2711
2712
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2710

def failure_count
  @failure_count
end

#nameString

The name of the test suite.

  • In create/response: always set - In update request: never Corresponds to the JSON property name

Returns:

  • (String)


2716
2717
2718
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2716

def name
  @name
end

#skipped_countFixnum

Number of test cases not run, typically set by the service by parsing the xml_source.

  • In create/response: always set - In update request: never Corresponds to the JSON property skippedCount

Returns:

  • (Fixnum)


2723
2724
2725
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2723

def skipped_count
  @skipped_count
end

#total_countFixnum

Number of test cases, typically set by the service by parsing the xml_source.

  • In create/response: always set - In update request: never Corresponds to the JSON property totalCount

Returns:

  • (Fixnum)


2729
2730
2731
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2729

def total_count
  @total_count
end

#xml_sourceGoogle::Apis::ToolresultsV1beta3::FileReference

A reference to a file. Corresponds to the JSON property xmlSource



2734
2735
2736
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2734

def xml_source
  @xml_source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2741
2742
2743
2744
2745
2746
2747
2748
2749
# File 'generated/google/apis/toolresults_v1beta3/classes.rb', line 2741

def update!(**args)
  @elapsed_time = args[:elapsed_time] if args.key?(:elapsed_time)
  @error_count = args[:error_count] if args.key?(:error_count)
  @failure_count = args[:failure_count] if args.key?(:failure_count)
  @name = args[:name] if args.key?(:name)
  @skipped_count = args[:skipped_count] if args.key?(:skipped_count)
  @total_count = args[:total_count] if args.key?(:total_count)
  @xml_source = args[:xml_source] if args.key?(:xml_source)
end