Skip to content

L3 Workshop: Automation test cases are failing

0

Buildfile: D:\PhotonUser\Workshop\workspace\carddemo-automation\execute.xml execute-test-case: execute: [echo] ------------------------------------------------------------------------------------------------------------------------------------------------ [echo] Run Cupress spec: [05-transaction-report.spec.js] [echo] ------------------------------------------------------------------------------------------------------------------------------------------------ [exec] > carddemo-cypress@1.0.0 test [exec] > cypress run --spec tests/05-transaction-report.spec.js [exec] Note: You have set the environment variable: [exec] CYPRESS_RUN_BINARY=C:\Work\Programs\cypress\Cache\9.7.0\Cypress\Cypress.exe [exec] This overrides the default Cypress binary path used. [exec] ==================================================================================================== [exec] (Run Starting) [exec] ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ [exec] │ Cypress: 9.7.0 │ [exec] │ Browser: Electron 100 (headless) │ [exec] │ Node Version: v20.16.0 (C:\Work\Programs\node\node.exe) │ [exec] │ Specs: 1 found (05-transaction-report.spec.js) │ [exec] │ Searched: tests\05-transaction-report.spec.js │ [exec] └────────────────────────────────────────────────────────────────────────────────────────────────┘ [exec] ──────────────────────────────────────────────────────────────────────────────────────────────────── [exec]
[exec] Running: 05-transaction-report.spec.js (1 of 1) [exec] Browserslist: caniuse-lite is outdated. Please run: [exec] npx browserslist@latest --update-db [exec] Why you should do it regularly: [exec] https://github.com/browserslist/browserslist#browsers-data-updating [exec] Transaction report tests cases [exec] Access to application [exec] 1) Launch application [exec] 2) Check signon screen [exec] 3) Sign with USER0001 [exec] 4) Check menu screen [exec] Monthly transaction Report [exec] 5) Transaction Report [exec] 6) Check initial screen [exec] 7) Check monthly report [exec] 8) Check confirmation message [exec] 9) Confirm monthly report [exec] 10) Check submitted job report [exec] √ Wait couple of seconds for submitted job to finish (5080ms) [exec] 11) Back to main menu [exec] 1 passing (10m) [exec] 11 failing [exec] 1) Transaction report tests cases [exec] Access to application [exec] Launch application: [exec] CypressError: cy.visit() failed trying to load: [exec] http://localhost:4200/ [exec] We attempted to make an http request to this URL but the request failed without a response. [exec] We received this error at the network level: [exec] > Error: connect ECONNREFUSED 127.0.0.1:4200 [exec] Common situations why this would fail: [exec] - you don't have internet access [exec] - you forgot to run / boot your web server [exec] - your web server isn't accessible [exec] - you have weird network configuration settings on your computer [exec] at http://localhost:56672/__cypress/runner/cypress_runner.js:163608:82 [exec] at visitFailedByErr (http://localhost:56672/__cypress/runner/cypress_runner.js:162912:12) [exec] at http://localhost:56672/__cypress/runner/cypress_runner.js:163607:11 [exec] at tryCatcher (http://localhost:56672/__cypress/runner/cypress_runner.js:13022:23) [exec] at Promise._settlePromiseFromHandler (http://localhost:56672/__cypress/runner/cypress_runner.js:10957:31) [exec] at Promise._settlePromise (http://localhost:56672/__cypress/runner/cypress_runner.js:11014:18) [exec] at Promise._settlePromise0 (http://localhost:56672/__cypress/runner/cypress_runner.js:11059:10) [exec] at Promise._settlePromises (http://localhost:56672/__cypress/runner/cypress_runner.js:11135:18) [exec] at _drainQueueStep (http://localhost:56672/__cypress/runner/cypress_runner.js:7729:12) [exec] at _drainQueue (http://localhost:56672/__cypress/runner/cypress_runner.js:7722:9) [exec] at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues (http://localhost:56672/__cypress/runner/cypress_runner.js:7738:5) [exec] at Async.drainQueues (http://localhost:56672/__cypress/runner/cypress_runner.js:7608:14) [exec] From Your Spec Code: [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=support\index.js:1493:8) [exec]
[exec] From Node.js Internals: [exec] Error: connect ECONNREFUSED 127.0.0.1:4200 [exec] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) [exec]
[exec] 2) Transaction report tests cases [exec] Access to application [exec] Check signon screen: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: cosgn00-cosgn0a:eq(0), but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:106:12) [exec] 3) Transaction report tests cases [exec] Access to application [exec] Sign with USER0001: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: #userid, but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:143:10) [exec] 4) Transaction report tests cases [exec] Access to application [exec] Check menu screen: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: comen01-comen1a:eq(0), but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:149:12) [exec] 5) Transaction report tests cases [exec] Monthly transaction Report [exec] Transaction Report: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: #option, but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:182:10) [exec] 6) Transaction report tests cases [exec] Monthly transaction Report [exec] Check initial screen: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: corpt00-corpt0a:eq(0), but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:187:12) [exec] 7) Transaction report tests cases [exec] Monthly transaction Report [exec] Check monthly report: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: #monthly, but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:227:10) [exec] 8) Transaction report tests cases [exec] Monthly transaction Report [exec] Check confirmation message: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: corpt00-corpt0a:eq(0), but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:232:12) [exec] 9) Transaction report tests cases [exec] Monthly transaction Report [exec] Confirm monthly report: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: #confirm, but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:272:10) [exec] 10) Transaction report tests cases [exec] Monthly transaction Report [exec] Check submitted job report: [exec] AssertionError: Timed out retrying after 60000ms: Expected to find element: corpt00-corpt0a:eq(0), but never found it. [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:277:12) [exec] 11) Transaction report tests cases [exec] Monthly transaction Report [exec] Back to main menu: [exec] CypressError: Timed out retrying after 30000ms: cy.wait() timed out waiting 30000ms for the 1st request to the route: runTransaction. No request ever occurred. [exec] https://on.cypress.io/wait [exec] at cypressErr (http://localhost:56672/__cypress/runner/cypress_runner.js:181711:18) [exec] at Object.errByPath (http://localhost:56672/__cypress/runner/cypress_runner.js:181780:10) [exec] at checkForXhr (http://localhost:56672/__cypress/runner/cypress_runner.js:167411:92) [exec] at http://localhost:56672/__cypress/runner/cypress_runner.js:167434:28 [exec] at tryCatcher (http://localhost:56672/__cypress/runner/cypress_runner.js:13022:23) [exec] at Function.Promise.attempt.Promise.try (http://localhost:56672/__cypress/runner/cypress_runner.js:10296:29) [exec] at whenStable (http://localhost:56672/__cypress/runner/cypress_runner.js:173835:65) [exec] at http://localhost:56672/__cypress/runner/cypress_runner.js:173290:14 [exec] at tryCatcher (http://localhost:56672/__cypress/runner/cypress_runner.js:13022:23) [exec] at Promise._settlePromiseFromHandler (http://localhost:56672/__cypress/runner/cypress_runner.js:10957:31) [exec] at Promise._settlePromise (http://localhost:56672/__cypress/runner/cypress_runner.js:11014:18) [exec] at Promise._settlePromise0 (http://localhost:56672/__cypress/runner/cypress_runner.js:11059:10) [exec] at Promise._settlePromises (http://localhost:56672/__cypress/runner/cypress_runner.js:11139:18) [exec] at Promise._fulfill (http://localhost:56672/__cypress/runner/cypress_runner.js:11083:18) [exec] at http://localhost:56672/__cypress/runner/cypress_runner.js:12697:46 [exec] From Your Spec Code: [exec] at Context.eval (http://localhost:56672/__cypress/tests?p=tests\05-transaction-report.spec.js:321:10) [exec] [mochawesome] Report JSON saved to D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypress\results\mochawesome-report\mochawesome.json [exec] [mochawesome] Report HTML saved to D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypress\results\mochawesome-report\mochawesome.html [exec] (Results) [exec] ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ [exec] │ Tests: 12 │ [exec] │ Passing: 1 │ [exec] │ Failing: 11 │ [exec] │ Pending: 0 │ [exec] │ Skipped: 0 │ [exec] │ Screenshots: 11 │ [exec] │ Video: true │ [exec] │ Duration: 9 minutes, 39 seconds │ [exec] │ Spec Ran: 05-transaction-report.spec.js │ [exec] └────────────────────────────────────────────────────────────────────────────────────────────────┘ [exec] (Screenshots) [exec] - D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypre (1280x720) [exec] ss\results\screenshots\05-transaction-report.spec.js\Transaction report tests ca
[exec] ses -- Access to application -- Launch application (failed).png
[exec] - D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypre (1280x720) [exec] ss\results\screenshots\05-transaction-report.spec.js\Transaction report tests ca
[exec] ses -- Access to application -- Check signon screen (failed).png
[exec] - D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypre (1280x720) [exec] ss\results\screenshots\05-transaction-report.spec.js\Transaction report tests ca
[exec] ses -- Access to application -- Sign with USER0001 (failed).png
[exec] - D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypre (1280x720) [exec] ss\results\screenshots\05-transaction-report.spec.js\Transaction report tests ca
[exec] ses -- Access to application -- Check menu screen (failed).png
[exec] - D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypre (1280x720) [exec] ss\results\screenshots\05-transaction-report.spec.js\Transaction report tests ca
[exec] ses -- Monthly transaction Report -- Transaction Report (failed).png
[exec] - D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypre (1280x720) [exec] ss\results\screenshots\05-transaction-report.spec.js\Transaction report tests ca
[exec] ses -- Monthly transaction Report -- Check initial screen (failed).png
[exec] - D:\PhotonUser\Workshop\workspace\carddemo-automation\tests-cases\02-online\cypre (1280x720) [exec] ss\results\screenshots\05-transaction-report.spec.js\Transaction report tests ca
[exec] ses -- Monthly transaction Report -- Check mont

asked a year ago125 views

2 Answers
0

The errors you're experiencing in the AWS Blu Age L3 Workshop automation tests are primarily related to connectivity issues. The main error indicates that Cypress is failing to connect to the application at http://localhost:4200, with the error "ECONNREFUSED 127.0.0.1:4200". This suggests that the web application is not running or is running on a different port.

This is likely due to a Tomcat version compatibility issue. The automation project is designed to work with Tomcat 9.0.x, but you might be using Tomcat 10.0.x. In Tomcat 10, Java packages changed from javax.servlet to jakarta.servlet, which causes compatibility problems with the workshop application.

To resolve this issue:

  1. Check if the web application is running and accessible. The error suggests it's not running on port 4200.

  2. Verify that all required datasources (jics, bluesam, bac, primary) are correctly configured.

  3. Ensure the DB server is started and running correctly.

  4. Replace the Tomcat installation in your automation project with the one from c:\work\programs\tomcat, or downgrade to Tomcat 9.0.x which is compatible with the workshop.

  5. After making these changes, run the execute.xml file again to restart the application.

  6. Make sure to synchronize configurations by running the Publish action on the Tomcat server to ensure everything is properly synchronized between the Eclipse WST working folder and the Tomcat configuration folder.

Once the application is properly running on the expected port, the Cypress tests should be able to connect and execute successfully.
Sources
AWS Blu Age L3 workshop - Automation step error | AWS re:Post
Blu Age L3 Workshop Automation Execute Online | AWS re:Post

answered a year ago

0

The errors you're experiencing in the AWS Blu Age L3 Workshop automation tests are primarily related to connectivity issues. The main error indicates that Cypress is failing to connect to the application at http://localhost:4200, with the error "ECONNREFUSED 127.0.0.1:4200". This suggests that the web application is not running or is running on a different port.

This is likely due to a Tomcat version compatibility issue. The automation project is designed to work with Tomcat 9.0.x, but you might be using Tomcat 10.0.x. In Tomcat 10, Java packages changed from javax.servlet to jakarta.servlet, which causes compatibility problems with the workshop application.

To resolve this issue:

  1. Check if the web application is running and accessible. The error suggests it's not running on port 4200.
  2. Verify that all required datasources (jics, bluesam, bac, primary) are correctly configured.
  3. Ensure the DB server is started and running correctly.
  4. Replace the Tomcat installation in your automation project with the one from c:\work\programs\tomcat, or downgrade to Tomcat 9.0.x which is compatible with the workshop.
  5. After making these changes, run the execute.xml file again to restart the application.
  6. Make sure to synchronize configurations by running the Publish action on the Tomcat server to ensure everything is properly synchronized between the Eclipse WST working folder and the Tomcat configuration folder.

Once the application is properly running on the expected port, the Cypress tests should be able to connect and execute successfully.

AWS

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.