Class: Rubotium::TestCasesReader
- Inherits:
-
Object
- Object
- Rubotium::TestCasesReader
- Defined in:
- lib/rubotium/test_cases_reader.rb
Instance Method Summary collapse
- #create_runnable_test(test) ⇒ Object
-
#initialize(device, test_package, options = {}) ⇒ TestCasesReader
constructor
A new instance of TestCasesReader.
- #read_tests ⇒ Object
Constructor Details
#initialize(device, test_package, options = {}) ⇒ TestCasesReader
Returns a new instance of TestCasesReader.
3 4 5 6 7 |
# File 'lib/rubotium/test_cases_reader.rb', line 3 def initialize(device, test_package, = {}) @device = device @test_package = test_package @annotation = .delete(:annotation) end |
Instance Method Details
#create_runnable_test(test) ⇒ Object
16 17 18 |
# File 'lib/rubotium/test_cases_reader.rb', line 16 def create_runnable_test(test) Rubotium::RunnableTest.new(test.class_name, test.test_name) end |
#read_tests ⇒ Object
9 10 11 12 13 14 |
# File 'lib/rubotium/test_cases_reader.rb', line 9 def read_tests result = device.shell(instrument_command).result Rubotium::Adb::Parsers::TestResultsParser.new(result).test_results.map{|test| create_runnable_test(test) } end |