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.
: 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.
Pete and Deepak open their browser and navigate to the
CCNET folder on Eddie's computer.
: 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.
: 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.
: Cool; how do I run it?
: Hold on. We'll find out and let you know.
: Let's run the cctray app
and see what it does.
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.
: 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
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
Eddie runs ccnet and refreshes his browser. Sue and Eddie both see that something in their project is amiss, as in Figure 4.
C:\Program Files\NUnit 2.2\bin\nunit-console.exe
|Figure 4.A Test Fails: The figure shows the screen for a failing test.
: Hey guys; we have the tests running and one is failing.
(Defensively.) It wasn't me!
: What test? My cctray
application shows a successful build.
: 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.
: Ok, it's the test we are working to fix at the moment!
: 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.
: Yes and sometime later in the project we might move over to using NAnt.
: I agree.
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.