Agile Performance Testing - Testing Experience
Agile Performance Testing - Testing Experience
Agile Performance Testing - Testing Experience
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Image5: Output of job “HelloWorld”<br />
Jobs for our tests<br />
In our Hudson set-up, we defined a set of jobs to automatically<br />
execute our tests. These jobs need to be executed on each single<br />
machine, representing a single environment.<br />
The jobs do the following:<br />
• update_svn: revert and update from SVN<br />
• init_server: clean and restart application server<br />
• Install: install software, configure and deploy<br />
• Runtest: setup, run tests, load results into database<br />
• Reg_report_trunk: create report from database<br />
Image6: Overview of jobs<br />
update_svn<br />
This job updates the sources of our test software. All update_svn<br />
jobs get started by one common job - updatesvn_all_trunk, i.e.<br />
the updatesvn_all_trunk job starts jobs update_svn_65_1, update_svn_65_3,<br />
etc. The updatesvn_all_trunk job does not do<br />
anything on its own; it is only responsible to start the children<br />
jobs. The job itself gets started via a remote trigger.<br />
Image7: Remote trigger<br />
With this remote trigger, the job can be started by calling the URL<br />
HUDSON_URL/view/Trunk%20jobs/job/updatesvn_all_trunk/<br />
build?token=TOKEN_NAME.<br />
So any other process, ANT script or other continuous integration<br />
server can trigger the first job on this Hudson server. In our case,<br />
www.testingexperience.com<br />
it is the software build server that starts the Hudson test server.<br />
The update_svn job uses an ANT script to clean, revert local<br />
changes and get updates from SVN. We already had these ANT<br />
SVN targets in place, and therefore did not use Hudson’s internal<br />
SVN integration. Our SVN jobs start ant target svn-all, with<br />
parameters svn.user=$SVNUSER and svn.password=$SVNPWD.<br />
These $-values represent variables, and will also be available on<br />
the node as environment variables. Variables can also be set during<br />
execution (as parameterized builds), on the level of a job, on<br />
the level of a node, or as a global parameter. As our svn.user and<br />
password are the same on all nodes; we used a global parameters<br />
for this, which you can define under main configure menu, and<br />
they are therefore valid for all nodes and all jobs.<br />
Alternatively, Hudson also<br />
provides SVN integration. It<br />
requires that SVN executable<br />
is available on the remote<br />
node, and authentication is<br />
working on that node. Inside<br />
the job you will then need to<br />
define the SVN URL. The first<br />
time Hudson will check out<br />
under the remote directory /<br />
, and once checked<br />
out, it will do updates on this<br />
directory. When you have multiple jobs on the same node, Hudson<br />
would create separate SVN working directories for each job.<br />
To avoid this, you can use symbolic links to have one single physical<br />
directory only.<br />
The Magazine for Professional Testers<br />
29