Test step (Pipeline) not displaying despite being configured

0

After the AWS Amplify interface update, the test step that used to run after the build is no longer being displayed. I have already configured the amplify.yml file, and it is possible to see in the build log that the tests were executed. I would like to know if the test step was removed in this new interface or if I need to make a new configuration in addition to amplify.yml and the USER_DISABLE_TESTS variable?

Before the interface update

Enter image description here

After the interface update

Enter image description here

And this is the test section of my amplify.yml

test:
  phases:
    preTest:
      commands:
        - pnpm install http-server@14.1.1
        - pnpm install start-server-and-test@2.0.4
        - pnpm install cypress@10.3.0
        - pnpm install @cypress/webpack-preprocessor@5.12.0
        - pnpm install @badeball/cypress-cucumber-preprocessor@11.5.1
    test:
      commands:
        - npx start-server-and-test serve-build 5173
  artifacts:
    baseDirectory: cypress
    configFilePath: "**/mochawesome.json"
    files:
      - "**/*.png"
      - "**/*.mp4"
Herbert
asked 12 days ago287 views
1 Answer
1
Accepted Answer

The Amplify team is aware of this feature and they are working on adding this test phase back in the near future.


As a workaround, I suggest using the AWS CLI to access the Test Artifacts[1][2]. The GetJob API Endpoint returns a testArtifactsUrl field which contains "The URL to the test artifact for the execution step." The CLI Command will be:


$ aws amplify get-job --region <Region> --app-id <App-ID> --branch-name <Branch-name> --job-id <Job id>


  1. https://docs.aws.amazon.com/amplify/latest/APIReference/API_GetJob.html
  2. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/amplify/get-job.html
AWS
Srinath
answered 12 days ago