2021-04-29 21:17:54 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
module Ci
|
|
|
|
# rubocop: disable Graphql/AuthorizeTypes
|
|
|
|
class TestSuiteType < BaseObject
|
|
|
|
graphql_name 'TestSuite'
|
|
|
|
description 'Test suite in a pipeline test report.'
|
|
|
|
|
|
|
|
connection_type_class(Types::CountableConnectionType)
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
field :name, GraphQL::Types::String, null: true,
|
2021-04-29 21:17:54 +05:30
|
|
|
description: 'Name of the test suite.'
|
|
|
|
|
|
|
|
field :total_time, GraphQL::FLOAT_TYPE, null: true,
|
|
|
|
description: 'Total duration of the tests in the test suite.'
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
field :total_count, GraphQL::Types::Int, null: true,
|
2021-04-29 21:17:54 +05:30
|
|
|
description: 'Total number of the test cases in the test suite.'
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
field :success_count, GraphQL::Types::Int, null: true,
|
2021-04-29 21:17:54 +05:30
|
|
|
description: 'Total number of test cases that succeeded in the test suite.'
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
field :failed_count, GraphQL::Types::Int, null: true,
|
2021-04-29 21:17:54 +05:30
|
|
|
description: 'Total number of test cases that failed in the test suite.'
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
field :skipped_count, GraphQL::Types::Int, null: true,
|
2021-04-29 21:17:54 +05:30
|
|
|
description: 'Total number of test cases that were skipped in the test suite.'
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
field :error_count, GraphQL::Types::Int, null: true,
|
2021-04-29 21:17:54 +05:30
|
|
|
description: 'Total number of test cases that had an error.'
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
field :suite_error, GraphQL::Types::String, null: true,
|
2021-04-29 21:17:54 +05:30
|
|
|
description: 'Test suite error message.'
|
|
|
|
|
|
|
|
field :test_cases, Types::Ci::TestCaseType.connection_type, null: true,
|
|
|
|
description: 'Test cases in the test suite.'
|
|
|
|
end
|
|
|
|
# rubocop: enable Graphql/AuthorizeTypes
|
|
|
|
end
|
|
|
|
end
|