Mixed Java and Ruby projects... can TC report on both tests...
Hi,
I am introducing a little ruby (via JRuby) into our codebase.
We have some ruby tests that I'd like run alongside our Java ones.
Currently, its all driven from Ant, running both sets of tests (for ruby I am doing this:
<target name="tests-ruby" >
<mkdir dir="./test-output/ruby/${ant.project.name}"/>
<java classname="org.jruby.Main" >
<classpath refid="ionplatformdevelopment.module.test.classpath"/>
<arg line="-I../config/RaboWriter/internalmarkets ../config/RaboWriter/internalmarkets_test/depth_cacher_test.rb"/>
</java>
</target>
Is there a way to get TC to report on both kinds of tests?
Or should I have a separate project to run the other tests.
Thanks,
Chris
Please sign in to leave a comment.
PS We are still on TC6, although I dont see any obvious new features for this in 6.5 or 7.
Hi Chris.
Sorry for late reply.
You can use some formatter for your Ruby tests which will produce JUnit-like xml. And later import such report with "XML Report Processing" feature.
Another good idea to reconfigure your build configuration to use Rake-runner with specified path to JRuby interpreter. Rake-runner may automatically inject test formatters.
Thanks - will try that out when I am back at work in a weeks time :)
Hi,
Finally got some time to work on this...
Got it working via this method:
I didnt want to install ant/jruby onto the build machine(s) - leaving them as generic as possible.
The ant part I used is this:
<java classname="org.jruby.Main" dir="..">
<classpath refid="[our main app classpath, which includes jruby]"/>
<arg line="-I./gems/gems/ci_reporter-1.7.1/lib/ -I./gems/gems/builder-3.1.0/lib/ -I../[path for ruby scripts] -I[path for ruby test scripts] [path to a ruby script that runs all tests]"/>
</java>
Thanks,
Chris