1

enter image description here

I have one test case passing and one failing upon which I run my Cypress E2E pipeline task in Azure.

Above error occurs and fails Azure build. But if I have all the test cases passed then build is successful.

Your ideas and experience would help a lot. Thanks in advance

coloraddict
  • 113
  • 1
  • 12
  • Running Cypress E2E test task on Angular App in Azure Pipeline should be NPM task or Powershell script? Can anybody please help me with the YAML specifications. – coloraddict Jun 28 '22 at 17:43
  • 1
    E2E tests are there for a reason. Most of the time to stop deployment of faulty code. If you won the pipeline then you can change the conditions for the next step after the E2E test. Look in your pipeline for ```condition``` Reference: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml – Charlie V Jun 28 '22 at 18:00

1 Answers1

0

Sometimes, this could be because of missing node modules. It is better to remove the entire node module folder in local.

  1. run the commend npm i which can help us to download all the node packages.
  2. run the commend npm build which can check the errors are still there or not?

If there are any package error's resolve those.

Note:

  1. First test it in local then ignore the default files to move into thebuild. Check with building pipeline. To know about the pipeline creation procedure. Follow the link.

Document Credits: https://q-automations.com/

Sairam Tadepalli
  • 1,563
  • 1
  • 3
  • 11