Class: TestdroidAPI::DeviceRun

Inherits:
CloudResource show all
Defined in:
lib/testdroid_api/device_runs.rb

Instance Method Summary collapse

Methods inherited from CloudResource

#camel_case_it, #delete, #download_file, #inspect, #method_missing, #refresh, #set_up_properties_from, #snake_case_it, #sub_items, #update

Constructor Details

#initialize(uri, client, params = {}) ⇒ DeviceRun

Returns a new instance of DeviceRun.



5
6
7
8
# File 'lib/testdroid_api/device_runs.rb', line 5

def initialize(uri, client, params= {})
  super uri, client, "deviceRun", params
  @uri, @client = uri, client
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TestdroidAPI::CloudResource

Instance Method Details

#download_junit(file_name = "junit.xml") ⇒ Object



14
15
16
# File 'lib/testdroid_api/device_runs.rb', line 14

def download_junit(file_name="junit.xml")
  @client.download("#{@uri}/junit.xml", file_name)
end

#download_logs(file_name = "log.txt") ⇒ Object



18
19
20
# File 'lib/testdroid_api/device_runs.rb', line 18

def download_logs(file_name="log.txt")
  @client.download("#{@uri}/logs", file_name)
end

#download_performance(file_name = "performance_data.txt") ⇒ Object



10
11
12
# File 'lib/testdroid_api/device_runs.rb', line 10

def download_performance(file_name="performance_data.txt")
  @client.download("#{@uri}/performance", file_name)
end