Is there a possibility to create a reporter where we get also more
information about passed test? What I want is to show which except’s has
been executed with which results.

You could do that. Create a custom formatter that tracks the information
you want and reports it however you want (e.g. to stdout or CouchDB or
whatever). Our docs show how to define one
<https://relishapp.com/rspec/rspec-core/v/3-7/docs/formatters/custom-formatters>
and list all the events you can subscribe to
<http://rspec.info/documentation/3.7/rspec-core/RSpec/Core/Formatters/Protocol.html>.
It sounds like you want this formatter to be in addition to a normal one
(rather than replacing it), so be sure to call config.add_formatter twice —
once with your normal output formatter, and once with your custom one.

Note that there are no events for each individual expectation. You’ll have
to extend RSpec a bit to do that. It’s not too bad, though:

module ExtendExpect
  def expect(*args, &block)
    # put whatever custom logic around `expect` you want.  e.g. you
could notify your custom formatter from here
    super
  endend
RSpec.configure do |c|
  c.include ExtendExpectend

HTH,
Myron
​


On Fri, Jan 5, 2018 at 5:24 AM, Attila Strba <[email protected]>
wrote:

> Hi Guys,
> we are trying to use RSpec for our Integration and System testing. Just a
> short overview of our test framework to give some background regarding my
> question. We have a various Hardware hooked up to Jenkins clients which we
> control over Ruby and control the test execution/test logic currently in
> Minitest. The results of the test execution  are beeing pushed to a
> CouchDB. We want to move away from Minitest due to it's limitation for this
> use case like: no support for test suites, dependent tests, random
> execution order etc.  Rspec seems to have all the features we need. There
> is one point missing though, and that is my question:
>
> Is there a possibility to create a reporter where we get also more
> information about passed test? What I want is to show which except's has
> been executed with which results.
>
> Thank you in advance for any help.
> greetings
> Attila
>
> --
> You received this message because you are subscribed to the Google Groups
> "rspec" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/rspec/39fc23b5-b721-478c-9ef8-df60d1c89297%40googlegroups.com
> <https://groups.google.com/d/msgid/rspec/39fc23b5-b721-478c-9ef8-df60d1c89297%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/CADUxQmvwspC1PH3MzhyQpZyseWng%3Dw3i9rOedTt2HzPkByU%3DKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to