class TestdroidApi::Client::Project::TestRun::DeviceRun
Attributes
device_id[R]
fail_message[R]
finished[R]
id[R]
junit_url[R]
logs_url[R]
name[R]
screenshots_url[R]
state[R]
Public Class Methods
new(client, run, config)
click to toggle source
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 10 def initialize(client, run, config) @client = client @project_id = run.project_id @run_id = run.id update(config) end
Public Instance Methods
finished?()
click to toggle source
Did test run finish
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 70 def finished? finished end
junit_results()
click to toggle source
Get device run's test results as JUnit XML
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 29 def junit_results res_name = 'junit XML' endpoint = "projects/#{@project_id}/runs/#{@run_id}/device-runs/#{id}_junit.xml" @client.get_file(endpoint, res_name) end
logs()
click to toggle source
Get device run's logs
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 37 def logs res_name = 'log' endpoint = "projects/#{@project_id}/runs/#{@run_id}/device-runs/#{id}_log.txt" @client.get_file(endpoint, res_name) end
results()
click to toggle source
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 74 def results raise NotImplementedError end
screenshot(screenshot_id)
click to toggle source
Get device's run screenshot. @param screenshot_id [Integer] screenshot id
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 62 def screenshot(screenshot_id) res_name = 'screenshot' endpoint = "projects/#{@project_id}/runs/#{@run_id}/device-runs/#{id}/screenshots/#{screenshot_id}" @client.get_file(endpoint, res_name) end
screenshots()
click to toggle source
Returns screenshots' ids for device run.
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 53 def screenshots res_name = 'deviceRunScreenshots' endpoint = "projects/#{@project_id}/runs/#{@run_id}/device-runs/#{id}/screenshots" @client.get_api_request(endpoint, res_name) end
screenshots_zip()
click to toggle source
Get device run's screenshots as a zip file.
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 45 def screenshots_zip res_name = 'screenshots.zip' endpoint = "projects/#{@project_id}/runs/#{@run_id}/device-runs/#{id}/screenshots.zip" @client.get_file(endpoint, res_name) end
update!()
click to toggle source
Updates device run information
# File lib/testdroid-api/client/project/test_run/device_run.rb, line 19 def update! res_name = 'deviceRun' endpoint = "projects/#{@project_id}/runs/#{@run_id}/device-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/device_run.rb, line 79 def update(config) @id = config['id'] @device_id = config['deviceId'] @fail_message = config['customerFailureMessage'] @name = config['deviceName'] @state = config['groupState'] @finished = config['finished'] @screenshots_url = config['screenshotsURI'] @junit_url = config['junitURI'] @logs_url = config['logURI'] end