for UC Berkeley Student Information Systems (SIS) Campus Solutions
By default, the following values are used. New values must be set while running the framework and will be automatically picked up.
SIS_TEST_DIR=<project-dir>/test
: If using external test directory, set to location of external test directory.SIS_LOGS_DIR=<project-dir>/logs
: If using external logs directory, set to location of external logs directory.SIS_SERVER_PORT=8421
: Set to port number that server should listen on.SIS_DASHBOARD_PORT=3000
: Set to port number that dashboard should be available on. number.SIS_TEST_WEBDRIVER=selenium
: Selenium WebDriver runs test on the graphical Firefox browser. If deploying in an environment wihtout a graphical interface (for example, a remote server), setSIS_TEST_WEBDRIVER=poltergeist
. The framework will then use Poltergeist WebDriver on PhantomJS headless browser.
The QA Test Automation framework is itself highly automated. There are a number of ways to set up and run the framework. The two main components: server and dashboard have been Dockerized. Local installation is also possible but not recommended.
First, add the configuration/credential files required for running the tests by following these instructions.
Then, follow instructions in one of the following sections.
This method uses pre-built images from the
ucberkeley public Docker registry. Alternatively, images
can be built locally by running scripts/build.sh
(after installing Docker Engine).
- Install Docker Engine.
- Install the QATA framework with
scripts/install.sh
. This will create a symlink to the server script in /usr/bin. - Run the service with
qata start
(may required sudo. If using external test and/or logs directory, run assudo -E qata start
to pass in environment variables). The first run will take longer since the docker container will be downloaded and then run. - When required, stop the service with
qata stop
, or restart withqata restart
- If required, attach to the service with
qata attach
.
This method uses Docker Compose to automate the process of building and running images.
- Install Docker Compose (in addition to Docker Engine).
- In the project directory, run
docker-compose up
(may require sudo. If using external test and/or logs directory, run assudo -E docker-compose up
to pass in environment variables). The first run will take longer since the Docker images will be built and then run.
This method runs Docker Engine inside a Vagrant VM.
- In the project directory, run
vagrant up
. This will also build the Docker images inside the VM and set all environment variables. vagrant ssh
into the VM and then start the service withsudo -E qata start
.
This method may speed up testing, but is otherwise not recommended. Follow instructions in qatserver/README.md and dashboard/README.md.
- Keep the test execution server files and Gemfile (and Gemfile.lock) in docker/sis-qa-test-auto
in sync with corresponding file(s) in the server directory and the test directory by running
scripts/sync.sh
. The up-to-date Gemfile will ensure that all required gems are installed when the sis-qa-test-auto docker container is being built. Though all dependencies are checked for during test execution, and installed if not satisfied, having them pre-installed will speed up test execution considerably. - You can clean up the logs folder by running
scripts/cleanup.sh
.