Browse DevX
Sign up for e-mail newsletters from DevX


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

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.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Finishing the Meeting
Once again, Eddie refreshes the browser and this time a simple page is displayed, showing the build results, as in Figure 3.

Figure 3. Build Results: The figure shows the build results in a browser.
eXtreme Eddie: Hey, Pete! You can browse to the CCNET folder on my computer to see the build results!

Pete does so on the machine that he and Deepak are working on.

Panic Pete: Cool!

Pete and Deepak open their browser and navigate to the CCNET folder on Eddie's computer.

.NET Deepak: That is cool, but do we have to look at the browser each time we want to see the build results? It would be cool if we could have an application that monitors the build results.

eXtreme Eddie: I think you can do that. There is an application called cctray that runs in your system tray and notifies you of the build results.

.NET Deepak: Cool; how do I run it?

eXtreme Eddie: Hold on. We'll find out and let you know.

Skeptic Sue: Let's run the cctray app and see what it does.

eXtreme Eddie: OK

Navigating to the C:\Projects\SportSPeak\CruiseControl.NET\cctray folder on his computer in File Explorer, Eddie double clicks on the cctray.exe icon. A CC icon appears in the system tray and a notification bubble appears stating Monitor started. A couple of seconds later, an error message box is displayed indicating a socket exception: No connection could be made because the target machine actively refused it.

eXtreme Eddie: Maybe we need to set up the Cruise Control server application? Let's look in the Help.

The two Cruise Control investigators discover that they need to have the Cruise Control server running for the cctray application to run. They also find out that they should add a line to the ccnet.config file to indicate the Web server URL. They add this to the project element under the name element:

<cruisecontrol> <project> <name>SportSPeak</name> <webURL>http://EddiesMachine/ccnet</webURL>

eXtreme Eddie: Ok, Deepak, you can run the cctray executable and in the settings, point to my computer. You should then get the latest build results.

.NET Deepak: Great. Thanks. That is so cool. Does it give me the test results as well?

Skeptic Sue: No we haven't gotten to that yet. I think that's the next thing for us to do.

eXtreme Eddie: I agree. It's important that we get the tests running every time we rebuild the system.

Skeptic Sue: Right. Let's see how we run NUnit tests from Cruise Control.

Once more, the two Cruise Control sleuths search through the Help files. They discover that they can add a tasks section to the ccnet.config file to run NUnit tests. After the Build element and before the Publishers element, they add the tasks element

<tasks> <nunit> <path> C:\Program Files\NUnit 2.2\bin\nunit-console.exe </path> <assemblies> <assembly> C:\Inetpub\wwwroot\SportSPeak\bin\SportSPeak.dll </assembly> </assemblies> </nunit> </tasks>

Eddie runs ccnet and refreshes his browser. Sue and Eddie both see that something in their project is amiss, as in Figure 4.

Figure 4.A Test Fails: The figure shows the screen for a failing test.  
Skeptic Sue: Hey guys; we have the tests running and one is failing.

Panic Pete: (Defensively.) It wasn't me!

.NET Deepak: What test? My cctray application shows a successful build.

eXtreme Eddie: Yes, we should really be using a build script from NAnt or something, as running the tests directly from Cruise Control only displays the results in the Web page. Right-click on your cctray icon and select Launch Web page.

.NET Deepak: Ok, it's the test we are working to fix at the moment!

Panic Pete: (Sighs.) Phew...

Skeptic Sue: We have a running version of Cruise Control, so I guess we should get this running on the build computer now, rather than just Eddie's computer.

eXtreme Eddie: Yes and sometime later in the project we might move over to using NAnt.

Skeptic Sue: I agree.

The ccnet.config file that Sue and Eddie ended up with is shown in Listing 2. Now that you have seen this team get started with their project, what should they do next? What tools should they use? What tools would you like them to explore for you? Let me know and your suggestions will be considered for possible future articles.

For more information, you can explore the Cruise Control .NET home page and read this great article on getting started with Cruise Control .NET.

Dr. Neil Roodyn is an independent itinerant consultant, trainer, and author. He travels the world working with software companies. Dr. Neil loves Australia, where he spends the summer enjoying the Sydney lifestyle and helping software development teams get more productive. Dr. Neil spends his other summer each year flying between northern Europe and the USA, working with software teams and writing about his experiences. Neil brings his business and technical skills to the companies he works with to ensure that he has happy customers. You can find out more from his Web site.
Comment and Contribute






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



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