Question

We're using TeamCity with Specflow/SpecRun as our test runner.

In the TeamCity build configuration section, under 'Build Failure Conditions', there are two checkboxes whose meaning I'm not sure of.

The page section is titled 'Fail Build if' and the checkboxes in question are 'at least one test failed' and 'an error message is logged by the build runner'

Those are fairly vague phrases and I was hoping someone could point me to the TC documentation for what those boxes are looking for when determining if a test failed?

Was it helpful?

Solution

You can take a look here for the general documentation

http://confluence.jetbrains.com/display/TCD8/Build+Failure+Conditions

The basic idea is that teamcity already provides options for common failures in the build process (like test failing,build running for longer time etc). This is in the first category of "common conditions".

The second category is where you want to use a specific metric from within your process to fail your build. For ex , you can use code coverage statistics to fail the build if coverage is less than a particular number (say 50%) , or if you want to put in some tolerance for unit tests failures. For ex if you want to fail your build only if more than 5% of your unit tests fail, then you can use this option. This enables you to be a bit more flexible with the failure conditions you want to put in. You can use this effectively to automate your CI and Artefact approval processes

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top