class TestRail::RSpecAdaptor
Public Instance Methods
submit(example)
click to toggle source
Submits an example test results If the test case exists, it will reuse the id, otherwise it will create a new Test Case in TestRails @param example [RSpec::Core::Example] A test case example after execution
# File lib/testrail/rspec_adaptor.rb, line 23 def submit(example) return unless @enabled test_case_section = example.example_group.description.strip test_case_name = example.description.strip test_result = example.exception.nil? test_comment = example.exception submit_test_result( section_name: test_case_section, test_name: test_case_name, success: test_result, comment: test_comment ) end