Testing with Cypress
While testing with Dusk allows you to use a browser running in a separate server/VM/container, Cypress requires that Chrome (or similar) be available in the same VM as NodeJS.
Here is an example pipeline script showing you what dependencies you'll need to run Cypress tests:
- name: Install Cypress Dependencies
cmd: |
curl -sSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - \
&& echo "deb https://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list \
&& sudo apt-get update \
&& sudo apt-get install -y google-chrome-stable \
xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2
# Optionally install extra fonts (likely not needed)
sudo apt-get install -y fontconfig \
fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg \
fonts-kacst fonts-symbola fonts-noto fonts-freefont-ttf
You may not need to, but we recommend using the larger server size for Cypress tests, as Chrome may use a lot of resources.