View on GitHub

Tista Covid-19 Tracker

Simple application for tracking key pandemic data at the national, state, and county levels.

End-to-End tests for Covid-12 Tracker Application

The UI e2e tests are based on the CodeceptJS + Selenium.

Before each tests

  1. Please configure your project with using a .env file. See Development - Configuration section on the main README.md file.
  2. Generate static data from the database: cd tests/e2e && npm run generate

Local Selenium server

Start Selenium server locally

# Install required libraries first
npm run selenium:install-locally
# Start selemium with Chrome
npm run selenium:start-locally

Start Selenium server locally with docker

npm run selenium:start-docker

Tests for Web Application

Simple test UI with the local Selenium Server

npm run test:webapp
ZIPS=20850,20147 npm run test:webapp
ZIPS_COUNT=25 npm run test:webapp

If you want to test with the remote Selenium Test use a system variable for that

SELENIUM_SERVER=<selenium host address>:4444 npm run test:webapp

If you want to see a browser

HEADLESS=false ZIPS=20850 npm run test:webapp

If you want to see more details

npm run test:webapp -- --verbose

Tests for API

npm run test:api
ZIPS=20850,20147 npm run test:api
ZIPS_COUNT=25 npm run test:api

System environment for tests