Full MSBuild plugin guide
MSBuild
is the Microsoft .NET build tool software for automating software build processes. It is similar to NAnt.
1. Install MSBuild plugin
 | Be Careful
Available since GreenPepper 2.5.1 |
The
MSBuild tasks are used during the Integration test phase of the build life cycle to execute the specifications of an application. They generate reports in plain HTML file format (*.html). By default, these files are generated in the build file directory.
There are two
MSBuild tasks :
- <GreenPepperTask>: Executes the specifications and generates reports
- <FreezeTask>: Downloads the specifications locally
To use the MSBuild Tasks for GreenPepper, you must load task extensions assembly: GreenPepper.Extensions.dll
To do so, you have to indicate in your MSBuild project file :
2. Use
<GreenPepperTask>
MSBuild task that executes
specifications.
Parameters
| Attribute |
Type |
Description |
Required |
| Input |
string |
The specification to use as input, for a suite this is the GreenPepper UID that you can find in your GreenPeppper Confluence's Space Registration page |
True |
| Repository |
ITaskItem |
The repository to fetch specifications from |
True |
| Output |
string |
The path to produce reports (defaults to current directory) |
False |
| OutputType |
string |
The output type of report (defaults to plain) |
False |
| Suite |
bool |
It runs a suite rather than a single test (output must refer to a directory). Default value is false |
False |
| Appconfig |
string |
The application configuration file to use for the GreenPepper test domain. If none specified, will try all assemblies to see if there is a corresponding .config (only the first one will be use) |
False |
| SystemUnderDevelopment |
ITaskItem |
The system under development to execute |
False |
| Assemblies |
ITaskItem[] |
List of assemblies to use for execution. |
False |
| StopOnFirstFailure |
bool |
Stop the execution of the specification on the first failure. The default is false |
False |
| ContinueOnError |
bool |
It determines if the build should continue on task failure or if it must stop the build process. The default is true see MSBuild task |
False |
| Condition |
bool |
The task will be executed only if condition match see MSBuild task |
False |
Elements
<Repository>
| Attribute |
Type |
Description |
Required |
| Include |
Class |
Repository full class name |
True |
| Sub-element |
Type |
Description |
Required |
| Arguments |
Argument |
A set of repository arguments |
True |
<Arguments>
| Sub-element |
Type |
Description |
Required |
| Argument |
string |
repository argument like the Server Url |
True |
</Arguments>
</Repository>
<Assemblies>
| Attribute |
Type |
Description |
Required |
| Include |
string |
Assembly path |
True |
</Assemblies>
<SystemUnderDevelopment>
| Attribute |
Type |
Description |
Required |
| Include |
Class |
SystemUnderDevelopment full class name |
True |
| Sub-element |
Type |
Description |
Required |
| Arguments |
Argument |
A set of system under development arguments |
False |
<Arguments>
| Sub-element |
Type |
Description |
Required |
| Argument |
string |
system under developement argument |
True |
</Arguments>
</SystemUnderDevelopment>
Requirements
Assembly: GreenPepper.Extensions
Examples
GreenPepperRepository
FileSystemRepository
<FreezeTask>
MSBuild task that fetch
specifications on local file system.
Have a look at this blog post : Put your specifications in the freezer
Parameters
| Attribute |
Type |
Description |
Required |
| Repositories |
ITaskItem[] |
Repositories to fetch specifications from |
True |
| Output |
string |
Path to produce reports (defaults to current directory) |
False |
| Condition |
bool |
The task will be executed only if condition match see MSBuild task |
False |
Elements
<Repositories>
Contains a set of <Repositories> ITaskItem :
| Attribute |
Type |
Description |
Required |
| Include |
Class |
Repository full class name |
True |
| Sub-element |
Type |
Description |
Required |
| Arguments |
Argument |
A set of repository arguments |
True |
| Name |
string |
A name for you to identify a repository |
False |
| Suites |
Suite |
A set of specifications suite to freeze |
False |
| Tests |
Test |
A set of specifications tests to freeze |
False |
<Arguments>
| Sub-element |
Type |
Description |
Required |
| Argument |
string |
repository argument like the Server Url |
True |
</Arguments>
<Suites>
| Sub-element |
Type |
Description |
Required |
| Suite |
string |
The suite name |
True |
</Suites>
<Tests>
| Sub-element |
Type |
Description |
Required |
| Test |
string |
The test name |
True |
</Tests>
</Repositories>
Requirements
Assembly: GreenPepper.Extensions
Examples
GreenPepperRepository
To test this example copy the sample in GreenPepper_Freeze.proj and run it by :
FileSystemRepository