In the previous post we created a load test for the book store service. We developed a functional test per user scenario for generating synthetic load and walked through the entire process of creating and running the Load Test.
In this post we will see how the Load Test can be executed continuously via 'Cruise Control .NET' (CCNet) and provide immediate feedback via CCNet's portal.
here's a quick video that shows the load tests run from CCNet and the results presented in CCNet's portal.
Throughout the post, we'll register the Load Test to run via CCNet and extend the portal to show a summary of the load test results using the trx file generated by the test.
In the next post, we'll take a step forward and add a custom task to CCNet that will query the database and generate a custom xml summary that includes performance highlights, comparison with previous runs and exception details for all the tests that have failed. We will also extend the portal to present the custom content.
The source code is available here http://bookstoreservice.codeplex.com/SourceControl/list/changesets
We'll start by installing CCNet from here
Once the installation is complete, we'll add the appropriate project/tasks to CCNet configuration file located here: %Program Files%CruiseControl.NET\server\ccnet.config
With the configuration above, CCNet will do the following (every 4 hours or one demand):
- Delete the results from last run (MSTest doesn't override the results)
- Build the BookStore.sln
- Run the load test.
- Add the result trx to the build log (so we can present it in the portal)
Now. we need to extend the CCNet portal to present the results. We need to:
- Create xsl that transform the results trx to HTML
- Copy the xsl to '%Program Files%\CruiseControl.NET\webdashboard\xsl'
- Add link to the xsl to 'Program Files (x86)\CruiseControl.NET\webdashboard\dashboard.config'
- Restart IIS
Here's the xsl:
Here's the modified dashboard.config:
We are done!
Now we can start the 'Cruise Control .NET' service or run the executable process from %Program Files%CruiseControl.NET\server\ccnet.exe.
Once the CCNet service/process is started, we can go ahead and trigger a build.The simplest way is to browse to the portal (installed and deployed to IIS during the installation) and force a build.
Once the build is complete, we can see the results here:
Another way to trigger a build is using the CCtray client application. The application can be installed from the portal.
CCTray installation can also be found here: '%Program Files%\CruiseControl.NET\webdashboard\cctray'
Once the installation is complete, the CCTray application will be available in the Task Bar (Notification Area). We need to add the project, right click and select 'Force Build'.