Hook into rake for reporting results

Hi,

I’m building an integration tool between software projects and issue
trackers. What would be the best way to report test success/failures
from a ruby project?

I would need to be able to individually identify which tests
failed, passed, or are pending (success on expected failures and fail if
passing on an expected failure).
I would also like to have minimal modifications if I wanted to add this
tool to an existing ruby project.
A report could either be written to a file or execute custom code to
interact with another software package.

From what I have found, it would be best to hook into the rake system
either via a custom runner or formatter. There isn’t too much
documentation on either of these so I’m not sure if this is the right
way.

Any suggestions?

Thanks.
milki

If I was you, I’d look at the code for minitest and or simplecov/rcov.

I guess you could simply analyze the output of a rake test task.

Maybe create a rake task that calls the :test task and processes its
output?


Michael S.

On 07:44 Tue 19 Apr , Steve K. wrote:

If I was you, I’d look at the code for minitest and or simplecov/rcov.

I can understand the suggestion for minitest, but simlecov/rcov are
coverage tools. What in simplecov/rcov do you have in mind that would
help with determinining test results?

On 09:05 Tue 19 Apr , Michael S. wrote:

I guess you could simply analyze the output of a rake test task.
Maybe create a rake task that calls the :test task and processes its output?

I think this could work, but I’m not sure if it would destinguish
between pending test results or individual test results.

What in simplecov/rcov do you have in mind that would

help with determinining test results?

Simplecov, at least in the way I’m using it, hooks into my existing rake
test task to do its thing with outputting coverage. That was the aspect
I
was thinking of, latching onto another task.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs