Skip to content

Latest commit

 

History

History
52 lines (43 loc) · 1.13 KB

File metadata and controls

52 lines (43 loc) · 1.13 KB

Running tests

Running backend tests

  • To run the full suite, make sure you have everything installed for dev and run
    pytest
  • To run with coverage
    pytest --cov
  • To run a specific test suite
    pytest dv/tests/test_import/test_import_news.py

Running E2E tests

Prepare env:

  • Clone repository locally
  • Make sure that the app is running. Either using install for dev
  • Seed the database with data for the E2E tests. Only needs to be done once, but if you change anything in the DB you may need to run it again.
    ./manage.py seed_db
    # OR if running in docker
    docker compose exec web ./manage.py seed_db
  • Install dev frontend dependencies:
    npm install

Interactive running options:

  • Open interactive Cypress test runner and manually run specs from there
    npm run test:open

Headless running options:

  • Run the FULL suite headless
    npm run test
  • Run single spec headless
    npm run test -- -s cypress/e2e/2014-2021/test-overview.cy.js