saucelabs / saucectl-puppeteer-example

A showcase of saucectl running puppeteer + jest.
Other
10 stars 17 forks source link

download artifacts from docker container #5

Open sky172839465 opened 3 years ago

sky172839465 commented 3 years ago

Hi, is there any approach to download jest puppeteer test result for calculation? My integration test need some calculation for build information and save test log into file, ex: 13/15 test passed.

At local I'm using jest-junit with jest puppeteer, after test finish I can get functional-test.xml summary file, than I can generate some build information from this xml.

In saucectl docker container, I expect there have some field let me set jest config, ex:

config
  jest: jest.config.js

and after test finish these outputs should copy to root folder or some where I can specify, like saucectl with cypress can download file from sacue cloud https://docs.saucelabs.com/testrunner-toolkit/configuration/cypress/index.html#example-configuration

artifacts:
  download:
    when: always
    match:
      - console.log
    directory: ./artifacts/