Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

eXtreme .NET: Practice Your XP with a Fictional Case Study : Page 3

Here's a perfect chance to be the proverbial 'fly on the wall' as you listen in on a team's efforts to use XP (eXtreme Programming) techniques to improve the way they deliver software.


advertisement
Exploring Cruise Control .NET
CruiseControl.NET consists of a number of small applications that help with automating the build and test process. At its core is the CruiseControl.NET server that monitors a source control database (SourceSafe for this team) and commences a build each time a new file (or files) get checked-in. Cruise control also provides tools to allow the development team to receive feedback on the current state of the build. This way if a build doesn't complete or tests are failing, the whole team can be aware of this and take action to correct the issue.

Publish the build results to a log in order for the Web application to read.
After a quick coffee break we find Sue and Eddie together at Eddie's development PC as they start working on setting up Cruise Control for the new project.

Skeptic Sue: What do we need to get Cruise Control up and running?

eXtreme Eddie: Let's start with the Cruise Control software. The latest version is 0.7 and we can get that from their Web site at http://ccnet.thoughtworks.com.

Skeptic Sue: Ok, got it. It's a zip file with a bunch of files in it. Where do you want to install it?

eXtreme Eddie: I'll create a directory on this computer to put all of our project files into. For the moment, put the zip file in a C:\Projects folder.

Skeptic Sue: Ok, now I'll create a subfolder for the SportSPeak files, so we'll have C:\Projects\SportSPeak\.

eXtreme Eddie: Great. I'll unzip the Cruise Control files into that directory.

Skeptic Sue: Ok, now what?

eXtreme Eddie: Well, from what I read in the product specs, I think there should be a server-side program to run. That program will carry out our build process. I expect it is called something like cc.exe or ccnet.exe.

Skeptic Sue: It's probably in the server directory that we just unzipped.

eXtreme Eddie: Yes, there it is: ccnet.exe. Let's run it.

Eddie double-clicks on the ccnet.exe file. A command window appears, some text scrolls down it, and then the command window vanishes.

Skeptic Sue: Oh, I guess it's done.

eXtreme Eddie: Hmmm. Something doesn't seem right. Hold on. Let's do that again in a command window.

Eddie opens a new command window, navigates to the C:\Projects\SportSPeak\CruiseControl.NET\Server folder and types ccnet.exe, then hits the Enter key. Eddie and Sue see the screen shown in Figure 1.

 
Figure 1. The CCNET.exe Application: Running CCNET.exe for the first time.  
Skeptic Sue: Well that's still not so good, is it?

eXtreme Eddie: Nope, but it tells us that we need to have a configuration file.

Skeptic Sue: How do we know what that should look like?

eXtreme Eddie: Just a hunch, but I'll bet it is an XML file. Let's look in the Doc directory for some help.

Sue and Eddie browse through the HTML documentation files for a few minutes before coming across a file that looks like it has the information they need. It is located in C:\Projects\SportSPeak\CruiseControl.NET\Doc\CCNET\Configuring the Server.html. Using this information, they build a very simple configuration file, as shown in Listing 1.

When Sue runs
ccnet.exe in the command line, she and Eddie see the output shown in Figure 2.

 
Figure 2.Success: Here's the first successful run of CCNET.  
eXtreme Eddie: Cool!

Skeptic Sue: My guess is that we'd press Control-C to stop it.

eXtreme Eddie: Yeah, try it.

Sue presses CTRL-C and the application stops running.

eXtreme Eddie: Let's try that again.

Eddie runs ccnet.exe again and this time it doesn't build because no modifications have been detected.

eXtreme Eddie: It would be useful if we could get it to rebuild each time while we are setting this up so we can see the effects of the changes we are making.

Skeptic Sue: I guess we need to change something in the triggers section; let's see what the documentation says.

They read further.

eXtreme Eddie: Here it says that we can use the forceBuildInterval trigger. That should do it.

They change the triggers section to read:

</i><triggers> <forceBuildInterval seconds="60" /> </triggers>

When they run ccnet.exe again, it rebuilds. They leave the program running and it continues to rebuild the application about once a minute.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date