Integration and smoke tests are run by Jenkins.
Integration tests ...
- run every 30 minutes and when application branches are merged to master
- staging environment only
Smoke tests ...
- run every 30 minutes and when application branches are merged to master
- production environment only
Both test suites are run against the Firefox browser.
bundle install
bundle exec rspec spec/integration # Integration tests only
bundle exec rspec spec/smoke # Smoke tests only
These tests run fine locally. The only change to the default development configuration is to redirect email to mailtrap.
When configuring SMTP (get the credentials by logging into mailtrap), note that the MoJ network blocks outgoing requests on port 2525, so use port 465 instead of the default copy-paste config.
- Configure mailtrap (in
prison-visits-2 - development.rb
) - Start PVB2 (app & sidekiq)
- Start PVB Public (app)
- Run tests
I recommend copying .env.example
to .env
and using direnv to automatically load these configuration variables (brew install direnv
).
See .env.example
for default development configuration.
API token for Mailtrap, used to fetch email via the API.
This should be the start page for creating a new booking.
This should be the index page of prisons used by staff.
Staff login details (for single sign on).
docker build -t pvb-integration .
docker run --env-file=.env pvb-integration