Closed TobiasDo1 closed 4 years ago
I have an idea that your Azure pipeline will fail if you have failing tests. By default, cli will exit with code 1 in that case.
You can change that behavior by adding -fcode=0
so it will only exit with 1 if a real error (of the client software itself) occurs.
If that's not the problem, the following things would be interesting:
The content of ut_tests.xml and x_covertura.xml. Also, please try to run the following command:
utplsql run <connection_detials> --tags=portal -d -f=ut_documentation_reporter -f=ut_tfs_junit_reporter -o=ut_tests.xml -f=ut_coverage_cobertura_reporter -o=x_cobertura.xml -fcode=2
The additional documentation-reporter will output to screen so we can see what's happening.
The -fcode
will set failure code to 2 if it's due to failed tests, so we can distinguish.
@TobiasDo1 It looks like the tests completed but some tests are failng.
What we tend to do in our own utPLSQL self-testing on Travis is run utplsql-cli with several reporters and output the ut_documentation_reporter
to the screen.
https://travis-ci.org/github/utPLSQL/utPLSQL/jobs/716290552#L5814-L5825
In our case, we do fail the build if any f the tests fail, but at least we see the failing tests in the output.
If you prefer to use Azure reporting on test results, change proposed by @pesse should do the trick.
Thanks @pesse and @jgebal for your suggestions.
If I run
utplsql run <connection_detials> --tags=portal -d -f=ut_documentation_reporter -f=ut_tfs_junit_reporter -o=ut_tests.xml -f=ut_coverage_cobertura_reporter -o=x_cobertura.xml -fcode=2
it ends up in some ORA exception. Not sure, if I am missing anything from my end.
I have replaced -fcode=2 parameter with --failure-exit-code=2 and this works.
@pesse, you were rigth with your idea that azure task breaks because of failed unit test.
Thanks @pesse and @jgebal so much for your support.
Thanks for the catch - seems we have a regression here and I should change -fcode
to -E
for example (new command-line library only allows a single letter after a single -
- double-dash notation works, though)
Is there any way to figure out, why this run failed?
It is being executed on Azure server via pipeline.
The command is: utplsql run --tags=portal -d=true -f=ut_tfs_junit_reporter -o=ut_tests.xml -f=ut_coverage_cobertura_reporter -o=x_cobertura.xml
Observations I made:
How to get more debug info? Any help is appreciated.