Class: Swiftrail::Testrail::Reporter
- Inherits:
-
Object
- Object
- Swiftrail::Testrail::Reporter
- Defined in:
- lib/swiftrail/testrail/reporter.rb
Instance Method Summary collapse
-
#initialize(test_report_patterns, tests_patterns, test_rail_username, test_rail_password, test_rail_base_url, strict) ⇒ Reporter
constructor
A new instance of Reporter.
- #report_results(run_id, dry_run) ⇒ Object
Constructor Details
#initialize(test_report_patterns, tests_patterns, test_rail_username, test_rail_password, test_rail_base_url, strict) ⇒ Reporter
Returns a new instance of Reporter.
9 10 11 12 13 14 15 16 |
# File 'lib/swiftrail/testrail/reporter.rb', line 9 def initialize(test_report_patterns, tests_patterns, test_rail_username, test_rail_password, test_rail_base_url, strict) @test_report_patterns = test_report_patterns @tests_patterns = tests_patterns @test_rail_username = test_rail_username @test_rail_password = test_rail_password @test_rail_base_url = test_rail_base_url @strict = strict end |
Instance Method Details
#report_results(run_id, dry_run) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/swiftrail/testrail/reporter.rb', line 18 def report_results(run_id, dry_run) unless dry_run test_rail_client(run_id).publish_results(purge(assembler(swift_test_parser.parse, junit_parser.parse).assemble, run_id)) else STDOUT::puts("RUN_ID = #{run_id}") STDOUT::puts(purge(assembler(swift_test_parser.parse, junit_parser.parse).assemble, run_id).map(&:to_json)) end end |