简体   繁体   中英

Tests running locally but no test generation on jenkins ‘Publish JUnit test result report’ failed: No test report files were found

I have been writing unit tests for my angular app and they run pretty well on jasmine . However when putting them on jenkins the build doesn't get completed and I have no report generated, I get the following error .

[32m28 07 2019 12:52:27.841:INFO [karma]: [39mKarma v1.7.1 server started at http://0.0.0.0:9876/
[32m28 07 2019 12:52:27.844:INFO [launcher]: [39mLaunching browser ChromeHeadless with unlimited concurrency
[32m28 07 2019 12:52:27.875:INFO [launcher]: [39mStarting browser ChromeHeadless
[31m28 07 2019 12:52:46.448:ERROR [karma]: [39m{ inspect: [Function: inspect] }
Build step 'Execute shell' marked build as failure
Recording test results
ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?
Finished: FAILURE

What I tried to do is making two separate jenkins projects . In each one I put a different test file ( in total they're two tests files) . One of the projects run pretty well but the second one sends back the mentionned Error , I get the same error when putting both test files in the same jenkins project .

This is the project (website folder) https://github.com/testing-angular-applications/testing-angular-applications.git The tests are the two .spec files inside chapter03 (inside the same git)

At least I should get the report file but the build didn't go to that point ( no report has been generated)

Resolved !

I had to downgrade to Jasmine core 2.4.1 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM