Hi,
I run e2e tests on CI environment, but I cannot see the artifacts.
bitbucket-pipelines.yml:
image: cypress/base:10
options: max-time: 20
pipelines:
default:
-step:
script:
- npm install
- npm run test
artifacts:
- /opt/atlassian/pipelines/agent/build/cypress/screenshots/*
- screenshots/*.png
- **/*.png
Maybe I typed the wrong path, but I am not sure. Does anyone have any ideas what I am doing wrong?
Hi
I'm facing the similar issue, step 1 produces .tar , step 2 can find it and use it but step 3 does not find the artifact at all. :(
any solution yet?
thanks
hi guys,
I have tried what @Philip Hodder mentioned above and it's working this is my solution
this is the custom pipeline in my bitbucket config file to run cypress.
please try cypress/screenshots/**/*.png in artifact section
"cypress:pipeline": "cypress run --env user=${E2E_USER_EMAIL},pass=${E2E_USER_PASSWORD} --browser chrome --spec cypress/integration/src/**/*.spec.ts"
pipelines:
custom:
healthCheck:
- step:
name: Integration and E2E Test
script:
- npm install
- npm run cypress:pipeline
artifacts:
# store any generated images as artifacts
- cypress/screenshots/**/*.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same issue here. Any solution yet @Philip Hodder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Piotr,
What do you see if you list the content of directories?
image: cypress/base:10
options: max-time: 20
pipelines:
default:
- step:
script:
- npm install
- npm run test
- ls -R /opt/atlassian/pipelines/agent/build/cypress/screenshots
- ls -R screenshots
- ls -R
artifacts:
- /opt/atlassian/pipelines/agent/build/cypress/screenshots/*
- screenshots/*.png
- **/*.png
What are in the logs listed in your 'Build Teardown'? Is there any reference to artifacts?
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Philip Hodder,
Thank you for the answer.
I tried very many different cases to get screenshots, but it still doesn't work, even with your suggestion, and I have not any idea why, what wrong could be with it?
Thanks,
Piotr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you post the log output for a build using the configuration I provided? We can use that to debug further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried as you wrote. When every pipeline (tests) failed then I always got this message:
What I'd like to do is to see screenshots when something went wrong.
Artifacts tab is still blank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you try this YAML instead?
image: cypress/base:10
options: max-time: 20
pipelines:
default:
-step:
script:
- npm install
- npm run test
artifacts:
- /opt/atlassian/pipelines/agent/build/cypress/screenshots/** # Double star provides recursive search.
If that doesn't work. Can you take a screenshot of the 'Build Teardown' section, as there is a 1GB file size limit for artifacts, and you may be hitting it.
e.g.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried change artifact's path to many different options, but nothing helps. Here is an example of 'Build teardown':
I also tried to add:
- set +e npm run test
to
bitbucket-pipelines.yml
to pass pipeline, but nothing happened, and every time I get the result as shown above
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @piotrpodyma ! Do you have any success results (get screenshots)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.