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">&para;</a> <a href="#documentation">&uarr;</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 &lt;your distro&gt;</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 &quot;$WORKSPACE/test.csv&quot; \ + &quot;$WORKSPACE/test/suite.bxt&quot;</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&#39;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>&lt;publishers&gt; + ... + &lt;hudson.plugins.plot.PlotPublisher plugin=&quot;plot@1.5&quot;&gt; + &lt;plots&gt; + &lt;hudson.plugins.plot.Plot&gt; + &lt;title&gt;Number of tests&lt;/title&gt; + &lt;yaxis&gt;Number of tests&lt;/yaxis&gt; + &lt;series&gt; + &lt;hudson.plugins.plot.CSVSeries&gt; + &lt;file&gt;test.csv&lt;/file&gt; + &lt;label&gt;&lt;/label&gt; + &lt;fileType&gt;csv&lt;/fileType&gt; + &lt;strExclusionSet&gt; + &lt;string&gt;OK&lt;/string&gt; + &lt;string&gt;Failed&lt;/string&gt; + &lt;string&gt;Total&lt;/string&gt; + &lt;/strExclusionSet&gt; + &lt;inclusionFlag&gt;INCLUDE_BY_STRING&lt;/inclusionFlag&gt; + &lt;exclusionValues&gt;Total,OK,Failed&lt;/exclusionValues&gt; + &lt;url&gt;&lt;/url&gt; + &lt;displayTableFlag&gt;false&lt;/displayTableFlag&gt; + &lt;/hudson.plugins.plot.CSVSeries&gt; + &lt;/series&gt; + &lt;group&gt;Test&lt;/group&gt; + &lt;numBuilds&gt;100&lt;/numBuilds&gt; + &lt;csvFileName&gt;1620406039.csv&lt;/csvFileName&gt; + &lt;csvLastModification&gt;0&lt;/csvLastModification&gt; + &lt;style&gt;line&lt;/style&gt; + &lt;useDescr&gt;false&lt;/useDescr&gt; + &lt;/hudson.plugins.plot.Plot&gt; + &lt;hudson.plugins.plot.Plot&gt; + &lt;title&gt;Test Execution Time&lt;/title&gt; + &lt;yaxis&gt;Test time (s)&lt;/yaxis&gt; + &lt;series&gt; + &lt;hudson.plugins.plot.CSVSeries&gt; + &lt;file&gt;test.csv&lt;/file&gt; + &lt;label&gt;&lt;/label&gt; + &lt;fileType&gt;csv&lt;/fileType&gt; + &lt;strExclusionSet&gt; + &lt;string&gt;Time&lt;/string&gt; + &lt;/strExclusionSet&gt; + &lt;inclusionFlag&gt;INCLUDE_BY_STRING&lt;/inclusionFlag&gt; + &lt;exclusionValues&gt;Time&lt;/exclusionValues&gt; + &lt;url&gt;&lt;/url&gt; + &lt;displayTableFlag&gt;false&lt;/displayTableFlag&gt; + &lt;/hudson.plugins.plot.CSVSeries&gt; + &lt;/series&gt; + &lt;group&gt;Test&lt;/group&gt; + &lt;numBuilds&gt;100&lt;/numBuilds&gt; + &lt;csvFileName&gt;336296054.csv&lt;/csvFileName&gt; + &lt;csvLastModification&gt;0&lt;/csvLastModification&gt; + &lt;style&gt;line&lt;/style&gt; + &lt;useDescr&gt;false&lt;/useDescr&gt; + &lt;/hudson.plugins.plot.Plot&gt; + &lt;/plots&gt; + &lt;/hudson.plugins.plot.PlotPublisher&gt; + ... +&lt;/publishers&gt;</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>