Setting up your CI Environment: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
(Created page with 'To reap the maximum benefit from your test assets, you need to run your tests as part of a [http://en.wikipedia.org/wiki/Continuous_integration continuous integration] environmen…')
 
No edit summary
Line 1: Line 1:
To reap the maximum benefit from your test assets, you need to run your tests as part of a [http://en.wikipedia.org/wiki/Continuous_integration continuous integration] environment.
To reap the maximum benefit from your test assets, you need to run your tests as part of a [http://en.wikipedia.org/wiki/Continuous_integration continuous integration] environment.


In this scenario, the following automated steps take place on a regular, periodic basis (typically nightly):
In this scenario, the following automated steps take place on a regular, periodic basis (typically nightly or with each new checkin):


* Automated source code check out from source control system
* source code check out from source control system
* Automated build of the target executable code (including STRIDE runtime and tests)
* build of the target executable code (including STRIDE runtime and tests)
* Automated downloaded of executable image to the target hardware
* downloaded of executable image to the target hardware
* Automated start of target code execution on the hardware
* start of target code execution on the hardware
* Automated running of all STRIDE tests and results publication to Test Space
* running of all STRIDE tests and results publication to Test Space


Note that the Test Space to which the results are published should be configured to notify on setbacks and errors.
The first four steps above are very build/platform specific and require specific domain knowledge to implement. There are many CI servers that help make the scheduling and execution of automated build/test cycles easier to manage. In particular, we've had good success with [https://hudson.dev.java.net/ Hudson] as it's both easy to set-up and flexible in its configuration. [http://cruisecontrol.sourceforge.net/ CruiseControl is another popular CI server and is worth serious consideration. For any particular build/test environment, there might be other tools that might be more appropriate - so we recommend that you spend some time investigating the existing CI tools that are available. The WikiPedia article cited above is a good place to start as well as [http://confluence.public.thoughtworks.org/display/CC/CI+Feature+Matrix this matrix] which compares some of the features or many popular CI servers.
 
The final step - executing and publishing - is easily accomplished with one or more calls to the [[Stride_Runner|stride runner]]. This tool is command -line based and should mesh well with any of the standard CI servers since most of these tools have the ability to execute command line processes.
 
Once these automated steps are running regularly, we recommend that the testspace to which the results are published be configured to notify on setbacks and errors. This gives the team maximum visibility of the automated tests. Any user that does not wish to be notified for the space can, of course, disable his notifications.

Revision as of 17:00, 17 September 2009

To reap the maximum benefit from your test assets, you need to run your tests as part of a continuous integration environment.

In this scenario, the following automated steps take place on a regular, periodic basis (typically nightly or with each new checkin):

  • source code check out from source control system
  • build of the target executable code (including STRIDE runtime and tests)
  • downloaded of executable image to the target hardware
  • start of target code execution on the hardware
  • running of all STRIDE tests and results publication to Test Space

The first four steps above are very build/platform specific and require specific domain knowledge to implement. There are many CI servers that help make the scheduling and execution of automated build/test cycles easier to manage. In particular, we've had good success with Hudson as it's both easy to set-up and flexible in its configuration. CruiseControl is another popular CI server and is worth serious consideration. For any particular build/test environment, there might be other tools that might be more appropriate - so we recommend that you spend some time investigating the existing CI tools that are available. The WikiPedia article cited above is a good place to start as well as [http://confluence.public.thoughtworks.org/display/CC/CI+Feature+Matrix this matrix which compares some of the features or many popular CI servers.

The final step - executing and publishing - is easily accomplished with one or more calls to the stride runner. This tool is command -line based and should mesh well with any of the standard CI servers since most of these tools have the ability to execute command line processes.

Once these automated steps are running regularly, we recommend that the testspace to which the results are published be configured to notify on setbacks and errors. This gives the team maximum visibility of the automated tests. Any user that does not wish to be notified for the space can, of course, disable his notifications.