|
||
|
|
|
Compass Version1.2
Script ListScripts are at the core of how Compass works. Each build run that is executed, executes a series of scripts in order. The scripts do all the heavy lifting for Compass and they also are the key to Compass versatility and expandability. Compass is distributed with many common scripts for checking out code from repositories, building source code using common build tools and for running unit tests. Scripts are managed by site-wide administrators only for security purposes since scripts are run on all build client machines. In the Compass web interface one of the main navigation tabs that is available to site-wide administrators is 'Scripts'. After clicking on the 'Scripts' main menu tab, a paginated list of all scripts installed on the Compass Server is displayed. Each script in the list is displayed with some basic information about the script and if the script is a custom script not distributed with Compass then there is a link to edit the script. The page also has buttons for adding scripts and unit test parsers and for filtering the script list. The Script List page looks like this right after installation: ![]() There are two types of scripts in Compass, regular scripts and Unit Test Parsers. Unit Test Parsers are a special type of script that Compass uses to parse the output of a regular script in order to extract information about how many tests succeeded and failed. Unit Test parsers are attached to build steps in the build editor and are run immediately after the script for that build step is run. Because unit test parsers parse the output of a regular script, you will see in the script list pairs of scripts with names like: "PyUnit Test Runner" and "PyUnit Test Parser". The test runner script executes a unit test and captures the output, then the test parser, parses the output that was captured and determines how many tests succeeded and failed. On the script list there is a link for every script called 'usage' This brings up a dialog that shows the usage notes for the script. When each script is created (or edited) the author has the opportunity to add usage notes to the script describing what parametrization it has and in general how the script should be used. It is up to the author to give adequate explanation for each script and how to use it in build plans. There is more information on usage notes in the Build plan editor documentation but it's good to note that this is one place where users can view the usage notes for all scripts. The rest of this chapter explains how to add, edit and generally how to work with scripts and unit test parsers in the following sections: |





