Module: Inferno::DSL::Results
- Included in:
- Entities::TestGroup, Entities::TestSuite
- Defined in:
- lib/inferno/dsl/results.rb
Overview
This module contains methods to set test results.
Instance Method Summary collapse
-
#cancel(message = '') ⇒ Object
Halt execution of the current test.
- #identifier(identifier = nil) ⇒ Object
-
#omit(message = '') ⇒ void
Halt execution of the current test and mark it as omitted.
-
#omit_if(test, message = '') ⇒ void
Halt execution of the current test and mark it as omitted if a condition is true.
-
#pass(message = '') ⇒ void
Halt execution of the current test and mark it as passed.
-
#pass_if(test, message = '') ⇒ void
Halt execution of the current test and mark it as passed if a condition is true.
-
#skip(message = '') ⇒ void
Halt execution of the current test and mark it as skipped.
-
#skip_if(test, message = '') ⇒ void
Halt execution of the current test and mark it as skipped if a condition is true.
-
#wait(identifier:, message: '', timeout: 300) ⇒ void
Halt execution of the current test and wait for execution to resume.
- #wait_timeout(timeout = nil) ⇒ Object
Instance Method Details
#cancel(message = '') ⇒ Object
Halt execution of the current test. This provided for testing purposes and should not be used in real tests.
107 108 109 |
# File 'lib/inferno/dsl/results.rb', line 107 def cancel( = '') raise Exceptions::CancelException, end |
#identifier(identifier = nil) ⇒ Object
93 94 95 |
# File 'lib/inferno/dsl/results.rb', line 93 def identifier(identifier = nil) @identifier ||= identifier end |
#omit(message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as omitted.
45 46 47 |
# File 'lib/inferno/dsl/results.rb', line 45 def omit( = '') raise Exceptions::OmitException, end |
#omit_if(test, message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as omitted if a condition is true.
55 56 57 |
# File 'lib/inferno/dsl/results.rb', line 55 def omit_if(test, = '') raise Exceptions::OmitException, if test end |
#pass(message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as passed.
9 10 11 |
# File 'lib/inferno/dsl/results.rb', line 9 def pass( = '') raise Exceptions::PassException, end |
#pass_if(test, message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as passed if a condition is true.
19 20 21 |
# File 'lib/inferno/dsl/results.rb', line 19 def pass_if(test, = '') raise Exceptions::PassException, if test end |
#skip(message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as skipped.
27 28 29 |
# File 'lib/inferno/dsl/results.rb', line 27 def skip( = '') raise Exceptions::SkipException, end |
#skip_if(test, message = '') ⇒ void
This method returns an undefined value.
Halt execution of the current test and mark it as skipped if a condition is true.
37 38 39 |
# File 'lib/inferno/dsl/results.rb', line 37 def skip_if(test, = '') raise Exceptions::SkipException, if test end |
#wait(identifier:, message: '', timeout: 300) ⇒ void
This method returns an undefined value.
Halt execution of the current test and wait for execution to resume.
85 86 87 88 89 90 |
# File 'lib/inferno/dsl/results.rb', line 85 def wait(identifier:, message: '', timeout: 300) identifier(identifier) wait_timeout(timeout) raise Exceptions::WaitException, end |
#wait_timeout(timeout = nil) ⇒ Object
98 99 100 |
# File 'lib/inferno/dsl/results.rb', line 98 def wait_timeout(timeout = nil) @wait_timeout ||= timeout end |