-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The VSTS task doesn't fail when there are invalid unit tests.
When running the command coverage run -m xmlrunner discover -s . -p test_*.py manually, coverage outputs the failed xml, etc. but the task doesn't output anything to console on this step and appears as if everything is fine while it's not. I see in the code that it's set to silent so I'm assuming this is intended behavior? Can't there be an option passed in to allow failing the task whenever tests are not passing. I don't want the build process to even continue when there are failures.
coverage run -m xmlrunner discover -s . -p test_*.py output
FAIL [0.000s]: test_test (tests.misc.test_fail.TestUnitTestDiscovery)
Traceback (most recent call last):
File "C:\agent_work\6\s\src\tests\misc\test_fail.py", line 6, in test_test
self.assertTrue(False)
AssertionError: False is not true
Runner Code
// Execute the unit tests
let unittestTool = tl.tool(coverageToolPath).arg(['run', '-m', 'xmlrunner', 'discover', '-s', '.', '-p', testFilePattern]);
unittestTool.execSync(toolRunOptions);