Open iantei opened 1 day ago
Explored into other repository, primarily, e-mission-server, to see how the testing was executed automatically.
Github Actions
Following approach has been used for the setup of automated testing:
.github/workflows/test_with_docker.yml
run: docker compose -f setup/docker-compose.tests.yml up --exit-code-from web-server
services:
web-server:
#builds from tests/dockerfile
build: tests
COPY start_script.sh /start_script.sh
CMD ["/bin/bash", "/start_script.sh"]
This runs: `start_script.sh` which has the following:
source setup/setup_tests.sh source setup/activate_tests.sh ./runAllTests.sh
runAllTests.sh has the following script:
PYTHONPATH=. python -m unittest discover -s emission/tests -p Test*;
Finds all the unites files which start with Test, and executes the test.
e-mission-server makes use of GitHub Actions and unittest - unit testing framework, to execute test cases for the e-mission-server automatically.
For em-public-dashboard, we have extensive use of .ipynb python Jupyter notebooks, along with few python .py files.
While following the above mentioned steps in e-mission-server enables unit testing the code of em-public-dashboard; I am also considering the aspect of how can we automate this process :
Accounting both of the cases of automating the current process in more linear way, and utilizing the automation unit testing process alike in server side, I would like to propose two different tasks at a very high level to execute this task of "Enable automated testing for Public Dashboard":
load_mongodump.sh
, launch the docker containers, execute all the generate_plots.py @shankari @JGreenlee Please let me know about your thoughts on this.
Currently, we are testing the changes for the Public Dashboard in the following way:
Load the dataset into MongoDB using
load_mongodump.sh
script.Execute the docker-compose:
Once the docker containers are up, we enter into the docker container for server
Then execute the generate_plots.py scripts to pass notebooks as the args
Then launch the
http://localhost:3274
and test the changes in it.