Class: PlatformAPI::TestRun

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

An execution or trial of one or more tests

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TestRun

Returns a new instance of TestRun.



3457
3458
3459
# File 'lib/platform-api/client.rb', line 3457

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object

Create a new test-run.

Parameters:

  • body:

    the object to pass as the request payload



3464
3465
3466
# File 'lib/platform-api/client.rb', line 3464

def create(body = {})
  @client.test_run.create(body)
end

#info(test_run_id) ⇒ Object

Info for existing test-run.

Parameters:

  • test_run_id:

    unique identifier of a test run



3471
3472
3473
# File 'lib/platform-api/client.rb', line 3471

def info(test_run_id)
  @client.test_run.info(test_run_id)
end

#info_by_pipeline(pipeline_id, test_run_number) ⇒ Object

Info for existing test-run by Pipeline

Parameters:

  • pipeline_id:

    unique identifier of pipeline

  • test_run_number:

    the auto incrementing test run number



3486
3487
3488
# File 'lib/platform-api/client.rb', line 3486

def info_by_pipeline(pipeline_id, test_run_number)
  @client.test_run.info_by_pipeline(pipeline_id, test_run_number)
end

#list(pipeline_id) ⇒ Object

List existing test-runs for a pipeline.

Parameters:

  • pipeline_id:

    unique identifier of pipeline



3478
3479
3480
# File 'lib/platform-api/client.rb', line 3478

def list(pipeline_id)
  @client.test_run.list(pipeline_id)
end

#update(test_run_number, body = {}) ⇒ Object

Update a test-run’s status.

Parameters:

  • test_run_number:

    the auto incrementing test run number

  • body:

    the object to pass as the request payload



3494
3495
3496
# File 'lib/platform-api/client.rb', line 3494

def update(test_run_number, body = {})
  @client.test_run.update(test_run_number, body)
end