class TestdroidApi::Client::Project::TestRun
Attributes
id[R]
name[R]
project_id[R]
state[R]
Public Class Methods
new(client, project, config)
click to toggle source
# File lib/testdroid-api/client/project/test_run.rb, line 7 def initialize(client, project, config) @client = client @project_id = project.id update(config) end
Public Instance Methods
device_runs()
click to toggle source
Returns devices that the run was executed on. @return [Array<TestdroidApi::Client::TestRun::DeviceRun>]
# File lib/testdroid-api/client/project/test_run.rb, line 30 def device_runs res_name = "deviceRuns" endpoint = "projects/#{@project_id}/runs/#{id}/device-runs" results = @client.get_api_request(endpoint, res_name) results.map{|device_run| TestdroidApi::Client::Project::TestRun::DeviceRun.new(@client, self, device_run) } end
finished?()
click to toggle source
Did test run finish @return [Boolean]
# File lib/testdroid-api/client/project/test_run.rb, line 66 def finished? state == 'FINISHED' end
junit_results_zip()
click to toggle source
Get test run's junit results as a zip file
# File lib/testdroid-api/client/project/test_run.rb, line 49 def junit_results_zip res_name = 'junits.zip' endpoint = "projects/#{@project_id}/runs/#{id}/junits.zip" @client.get_file(endpoint, res_name) end
logs_zip()
click to toggle source
Get test run's logs as a zip file.
# File lib/testdroid-api/client/project/test_run.rb, line 57 def logs_zip res_name = 'logs.zip' endpoint = "projects/#{@project_id}/runs/#{id}/logs.zip" @client.get_file(endpoint, res_name) end
results()
click to toggle source
# File lib/testdroid-api/client/project/test_run.rb, line 24 def results raise NotImplementedError end
screenshots_zip()
click to toggle source
Get test run's screenshots as a zip file.
# File lib/testdroid-api/client/project/test_run.rb, line 41 def screenshots_zip res_name = 'screenshots.zip' endpoint = "projects/#{@project_id}/runs/#{id}/screenshots.zip" @client.get_file(endpoint, res_name) end
update!()
click to toggle source
Updates test_run information
# File lib/testdroid-api/client/project/test_run.rb, line 15 def update! res_name = "run" endpoint = "projects/#{@project_id}/runs/#{id}" config = @client.get_api_request(endpoint, res_name) update(config) end
Private Instance Methods
update(config)
click to toggle source
# File lib/testdroid-api/client/project/test_run.rb, line 71 def update(config) @id = config['id'] @name = config['displayName'] @state = config['groupState'] end