MSBTest is a simple testing framework for testing MSBuild scripts
- Add a new project to your solution by using the MSBuild-project-template
- Install nuget package MSBuild.MSBTest
The nuget package will install the following files to your project
- Properties/MSBTest.props
- readme/MSBTest.readme.txt
Based on conventions MSBTest will find tests, extensions and the collection of scripts which should be test.
The typicall folder structure will look like similar to this:
project
|-Properties
|-|-MSBTest.props
|-extensions
|-|-imports.targets
|-readme
|-|-MSBTest.readme.txt
|-src
|-|-imports.targets
|-tests
|-|-sample-test-suite
|-|-|-sample.test.targets
|-|-test.import
Global settings to control the behaviour of MSBTest like tracing or additional project specific configurations.
If a folder extensions with a containing imports.targets file is present you'll can use this to add custom MSBuild tasks of inline MSBuild tasks to your testsuite. Import with
<Import Project="$(ExtensionsImports)" Condition="Exists('$(ExtensionsImports)')" />
Readme with some additional information about available variables
If a folder src with a containing imports.target file is present you'll can use this to import custom MSBuild targets, projects and props. Import with
<Import Project="$(SourceImports)" Condition="Exists('$(SourceImports)')"/>
Files named *.test.targets placed in the folder tests will be identified as test scripts. These files will be excecuted during build time. Contributing
If you are interested in contributing,
- Get a Github account
- Fork the project
- Make your feature addition or bugfix. Please also update the changelog.
- Send me a pull request via GitHub