在 Docker Container 跑 Visual Testing 之基本設定

Cypress + Docker + Chromatic ❤️

步驟

FROM cypress/base:16.13.0 # create cypress base image
RUN mkdir /app # create working directory for ducker build
WORKDIR /app # specify a path for a working directory
COPY . /app # copy cypress project code into the working directory
RUN npm install # install all dependencies
RUN $(npm bin)/cypress verify # verify cypress has been successfully installed and loaded, and make sure that cypress is ready
RUN ["npm", "run", "chromatic"] # run visual testing with chromatic
node_modules
docker build -t cypress . # create a docker image inside the root "." of the project.

在 Docker Container 跑 Visual Testing 的結果

查看 Chromatic 的結果

更多細節。

查看 Chromatic 的結果


visual testing Docker Chromatic Cypress 自動化測試 視覺測試 End-to-End Testing 端對端測試 閱讀筆記 Cypress 讀書會 cypress.io visual regression testing 讀書會