0

Building a local project for UI and API based automated checking and getting the following terminal errors

 [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.852 s <<< FAILURE! - in com.automationintesting.unit.taskanalysis.ServeContentTest
[ERROR] checkUiServesStaticContent  Time elapsed: 2.445 s  <<< ERROR!
java.lang.Error: 
Failed Approval 

Then

2021-07-25 12:33:20.795  INFO 21905 --- [extShutdownHook] o.s.b.a.ApplicationAvailabilityBean      : Application availability state ReadinessState changed from ACCEPTING_TRAFFIC to REFUSING_TRAFFIC
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   ServeContentTest.checkUiServesStaticContent:33 »  Failed Approval
  Approved:/...

And then

[INFO] project-assets ..................... FAILURE [  8.788 s]

Before finally

Error: Unable to access jarfile assets/api/target/project-assets-*.jar
Waiting for RBP to turn on............................................................

I have tried following both resolutions given in this Q: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.

Namely, adding the surefire plugin to the pom.xml, and also adding configuration to surefire so that it ignores failing tests. As signposted in an answer to this article: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test

At a loss now, as the build states different reasons for failing after removing and then rebuilding locally given previous build failures. I spent a while making sure i had correctly configured JDK paths to JAVA env vars and that the pom.xml specifies the preferred version env (JDK 8). This was when the back-end build wasn't working. It seems to be fine this time round (i.e. no errors in terminal).

An important side note is i have just noticed a build failure with the front-end...

npm ERR! code 1
npm ERR! path /Users/fraserjamieson/postCC/testing/restful-booker-platform/restful-booker-platform/assets/js/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node scripts/build.js

Does anyone have any idea or can think of something i haven't tried, how i can go about the best ways of diagnosing and fixing this? i'm a total unix noob/novice, and feel like i'd need to take a course in the aforementioned or try reaching out here.

Much appreciated, and please do let me know if i have missed important info out.

  • First I strongly recommend to upgrade to version of maven-surefire-plugin because you are using a 10 year old version..Can you also write which Java version and Maven version you are using? – khmarbaise Jul 25 '21 at 13:14

0 Answers0