01.02.2013 Views

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

Software Development Cross Solution - Index of - Free

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

setting up continuous integration<br />

At the wheel <strong>of</strong> CI with CruiseControl<br />

The three main jobs <strong>of</strong> a CI tool are to get a version <strong>of</strong> the code from<br />

your repository, build that code, and then run a suite <strong>of</strong> tests against<br />

it. To give you a flavor <strong>of</strong> how CI is set up, let’s take a look at how that<br />

works in CruiseControl:<br />

2<br />

1<br />

In CruiseControl, your project is described using an XML<br />

document, much the same as in Ant, except this script<br />

describes what is going be done, and when.<br />

254 Chapter 7<br />

Add your JUnit test suite to your Ant build<br />

Before you build your CruiseControl project, you need to add your<br />

JUnit tests into your Ant build file.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Create your CruiseControl project<br />

The next step is to create a CruiseControl project and begin to define your<br />

build and test process.<br />

<br />

<br />

You last saw Ant in<br />

Chapter 6.5.<br />

<br />

<br />

<br />

A new target called<br />

“test” that depends<br />

on the “compile”<br />

target having finished<br />

successfully<br />

Here’s where the magic happens. All <strong>of</strong> the classes in your<br />

project that begin with the word “Test” are automatically<br />

executed as JUnit tests. No need for you to specify each<br />

one individually.<br />

The project tag bounds all <strong>of</strong><br />

your project’s configuration.<br />

Download at WoweBook.Com<br />

The “all” target is just a nicer way <strong>of</strong> saying “compile,<br />

build, and test everything.”

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!