Run the backend test suite¶
Conventions for writing specs are in Backend testing. This page covers CI, parallel runs and local browser setup for the Easy8 team.
CI¶
GitLab CI runs the specs on every pushed commit. The pipeline is defined in .gitlab-ci.yml. Specs without an explicit type: run in the CI others job.
Parallel execution¶
Use parallel runs for large parts of the suite. Complete the one-time setup in Parallel RSpec setup first.
Run all unit tests (feature specs excluded) with 6 workers, the default of the rake task (lib/tasks/rspec_parallel.rake):
Set another worker count with an argument or with PARALLEL_TEST_PROCESSORS:
Run one directory in parallel:
Parallel runs cut the full unit suite from about an hour to roughly 10-15 minutes on a multi-core machine.
Feature specs in a browser on macOS¶
Feature specs use Chrome through Selenium. On macOS install chromedriver and remove its quarantine flag:
To use another Chromium-based browser, add the path of its binary to the :selenium_chrome driver registration in spec/capybara_config.rb: