RSpec through Ant
Hello,
I'm currently trying to get RSpec running through Ant to have more configuration and flexibility.
I've managed to fire up RSpec properly with Ant now, but I don't succeed in getting all output back into TeamCity.
This is my build.xml:
<?xml version="1.0"?>
<project name="rubycas" default="init">
<description>
This buildfile is used to build the RubyCAS project under TeamCity and run the required tasks to validated
whether the project is stable and fully functional.
</description>
<property name="test_type" value="cucumber" />
<target name="init">
<echo message="##teamcity[testStarted name='Rubycas']" />
<condition property="cucumberBool">
<equals arg1="${test_type}" arg2="cucumber" />
</condition>
<condition property="rspecBool">
<equals arg1="${test_type}" arg2="rspec" />
</condition>
</target>
<target name="rspec" if="rspecBool" depends="init">
<exec executable="rspec" outputproperty="result">
<arg value="--require teamcity/spec/runner/formatter/teamcity/formatter" />
<arg value="--format Spec::Runner::Formatter::TeamcityFormatter" />
</exec>
<echo message="${result}" />
</target>
<target name="cucumber" if="cucumberBool" depends="init">
<exec executable="cucumber" outputproperty="result">
<arg value="--format junit" />
<arg value="--out results" />
<arg value="features" />
</exec>
<echo message="${result}" />
</target>
</project>
How can I get the result from RSpec into TeamCity?
How can I get the result from RSpec into TeamCity?
Please sign in to leave a comment.
Ok,
managed to get further with this, and get output, but its not working as expected, because of the TeamCity formatter.
I would like to attach the TeamCityFormatter to my RSpec and Cucumber tasks, so I tried this:
This gives me the following output:
So how can I get this properly working?