doc/index.html in bauxite-0.4.4 vs doc/index.html in bauxite-0.4.5
- old
+ new
@@ -459,15 +459,109 @@
<p>Finally, to execute <a href="Bauxite.html">Bauxite</a> loading our plugin
we can type:</p>
<pre>bauxite -e plugins my_test.bxt</pre>
+
+<h2 id="label-Jenkins+Integration">Jenkins Integration<span><a href="#label-Jenkins+Integration">¶</a> <a href="#documentation">↑</a></span></h2>
+
+<p>If you want to run <a href="Bauxite.html">Bauxite</a> tests in your <a
+href="http://jenkins-ci.org/">Jenkins CI</a> server you must install
+<code>xvfb</code> and <code>selenium-server-standalone</code>. Googling for
+<code>selenium headless jenkins <your distro></code> is a great
+start. Assuming you installed Ruby and <a href="Bauxite.html">Bauxite</a>
+for the <code>jenkins</code> user (see the instructions above), you can
+create an execute shell build task with the following text:</p>
+
+<pre>#!/bin/bash
+source ~/.rvm/scripts/rvm
+bauxite -l echo -u http://localhost:4444/wd/hub \
+ -t 60 -o 240 --csv-summary "$WORKSPACE/test.csv" \
+ "$WORKSPACE/test/suite.bxt"</pre>
+
+<p>Assuming you have Selenium Server running on localhost and your workspace
+(e.g. GIT repo) contains a folder named <code>test</code> with a file named
+<code>suite.bxt</code> the configuration above should work like a charm.</p>
+
+<p><code>suite.bxt</code> could be something like:</p>
+
+<pre># === suite.bxt === #
+test login.bxt
+test register.bxt
+test browse_arround.bxt
+test purchase_something.bxt
+# more tests here...</pre>
+
+<p>Note the <code>--csv-summary</code> option in the configuration above. That
+option generates a single-ling CSV file ideal to feed the <code>Plot</code>
+Jenkins plugin. I won't go into the details of configuring the Plot
+plugin, but instead here is a fragment of a possible Jenkins config.xml
+plotting the <a href="Bauxite.html">Bauxite</a> test results:</p>
+
+<pre><publishers>
+ ...
+ <hudson.plugins.plot.PlotPublisher plugin="plot@1.5">
+ <plots>
+ <hudson.plugins.plot.Plot>
+ <title>Number of tests</title>
+ <yaxis>Number of tests</yaxis>
+ <series>
+ <hudson.plugins.plot.CSVSeries>
+ <file>test.csv</file>
+ <label></label>
+ <fileType>csv</fileType>
+ <strExclusionSet>
+ <string>OK</string>
+ <string>Failed</string>
+ <string>Total</string>
+ </strExclusionSet>
+ <inclusionFlag>INCLUDE_BY_STRING</inclusionFlag>
+ <exclusionValues>Total,OK,Failed</exclusionValues>
+ <url></url>
+ <displayTableFlag>false</displayTableFlag>
+ </hudson.plugins.plot.CSVSeries>
+ </series>
+ <group>Test</group>
+ <numBuilds>100</numBuilds>
+ <csvFileName>1620406039.csv</csvFileName>
+ <csvLastModification>0</csvLastModification>
+ <style>line</style>
+ <useDescr>false</useDescr>
+ </hudson.plugins.plot.Plot>
+ <hudson.plugins.plot.Plot>
+ <title>Test Execution Time</title>
+ <yaxis>Test time (s)</yaxis>
+ <series>
+ <hudson.plugins.plot.CSVSeries>
+ <file>test.csv</file>
+ <label></label>
+ <fileType>csv</fileType>
+ <strExclusionSet>
+ <string>Time</string>
+ </strExclusionSet>
+ <inclusionFlag>INCLUDE_BY_STRING</inclusionFlag>
+ <exclusionValues>Time</exclusionValues>
+ <url></url>
+ <displayTableFlag>false</displayTableFlag>
+ </hudson.plugins.plot.CSVSeries>
+ </series>
+ <group>Test</group>
+ <numBuilds>100</numBuilds>
+ <csvFileName>336296054.csv</csvFileName>
+ <csvLastModification>0</csvLastModification>
+ <style>line</style>
+ <useDescr>false</useDescr>
+ </hudson.plugins.plot.Plot>
+ </plots>
+ </hudson.plugins.plot.PlotPublisher>
+ ...
+</publishers></pre>
</main>
<footer id="validator-badges" role="contentinfo">
<p><a href="http://validator.w3.org/check/referer">Validate</a>
- <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.0.
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>