The application currently uses one framework for frontend testing: Jest. There are plans to implement back-end tests in the future.
Frontend tests leverage the Jest framework.
To run the Jest test suite, execute the command docker exec -it webpack_watcher npm test
.
To update snapshots, execute docker exec -it webpack_watcher npm run-script update-snapshot
.
Data validation scripts are in scripts/data_validation
folder.
To run the data validation scripts, follow the steps below:
-
Copy
env_validation.hjson
file fromenv_sample.hjson
filecp scripts/data_validation/env_sample.hjson scripts/data_validation/env_validation.hjson
-
Update the configuration values. Note the hard-coded Michigan specific filters in various query strings. Please adjust those values based on your institution's needs.
-
Run the data validation script within the Docker container:
- Validate queries using UDP BigQuery Expanded Table:
This script will validate queries against the UDP BigQuery
expanded
table, and compare whether the data results are identical with those returned from theevents
table queries.docker exec -it student_dashboard /bin/bash -c \ "python scripts/data_validation/validate_udp_events_vs_expanded.py"
- Validate queries using UDP BigQuery Expanded Table:
This script will validate queries against the UDP BigQuery