Can we get jacoco report when test run fails - code-coverage

Can we get jacoco report when test run fails?
During execution of the tests if test gets failed then if we can able to proceed and create report?
If any way to create .exec file when we do manual execution
Thanks,

Related

Generate JUnit / TestNg like reports manually in Jenkins

I have test cases as executables ( windows exe ) and I am running all the test cases (exe) in Jenkins. Each test case produce output text file and at the end of the testcase, there is a formatted string like "TestCaseName PASSED/FAILED".
I can see from the build status if all the test cases were successful or not but if any of them fails, the build also says it fails. I want to use Jenkins Test Results Analyser or any other plugin to show as a table to see in which build which test case failed. The Jenkins Test Results Analyser works fine with jUnit or TestNg test reports. I was to thinking to generate manually such reports as post build step or if there is any other tool available?

junitxml jenkins plugin not showing output of passed tests (PyTest)

I am running pytest tests in a Jenkins scheduled job and generating a junitxml report as the following
pytest --junitxml=report.xml
Then I am using a post build action of publish junit test result and I can see the results but I don't see output of the passed tests (Even if I check the checkbox of "Retain long standard output/error"
Anyone succeeded in showing the output of passed tests when using pytest + junitxml publisher in Jenkins ?
It's due to Pytest that doesn't add end of line in the .xml.

Jenkins JUnit Plugin empty tests file not failing

I'm using the Jenkins JUnit Plugin to collect my tests result and according to the documentation:
Allow empty results: If checked, the default behavior of failing a
build on missing test result files or empty test results is changed to
not affect the status of the build. Please note that this setting make
it harder to spot misconfigured jobs or build failures where the test
tool does not exit with an error code when not producing test report
files.
This is how I use it:
junit testResults: '**/reports/junit*.xml', testDataPublishers: [[$class: 'StabilityTestDataPublisher']]
So the behavior should fail if the test file is empty but I get "UNSTABLE" result with the message
Test report file /opt/workspace/integrations_develop/reports/junit_integrations.xml was length 0
How can I make it fail if the test file is empty?

How to display test results on jenkins from results.xml file without running the testcases from jenkins

I have multiple xml result files collected from different builds and I have to display a consolidated report on jenkins.
Is there any plugin available to perform the above action?
We also tried JUnit plugin, we got the following error:
ERROR: Step 'Publish JUnit test result report' failed: Test reports were found but none of them are new. Did leafNodes run? For example, D:\jenkins\workspace\test-1\testng-results.xml is 14 min old
try to check the timestamp when the junit report was generated and last execution time of jenkins job. Both timestamp should match.
If you see a difference, delete the report and re-generate the report.

Does Cucumber generates HTML build report for failed build?

I have cucumber application. On Bamboo CI i trigger the build. For pass build cucumber generates HTML reports but for failed build it doesn't generates HTML report.
Please verify it.
I don't know about cucumber but in Bamboo you can move Tasks to below that line whatever it is called, for the task to be executed disregard the exit codes of the previous tasks. This allows you to e.g. execute a task that generates documentation even in case that compilation fails.

Resources