Giter Club home page Giter Club logo

ministryofjustice.prison-visits-integration-tests's Introduction

Integration & Smoke Tests

for the

Prison Visits Booking Service

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.

Setup instructions

Running tests

bundle install
bundle exec rspec spec/integration   # Integration tests only
bundle exec rspec spec/smoke         # Smoke tests only

Running tests locally

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.

  1. Configure mailtrap (in prison-visits-2 - development.rb)
  2. Start PVB2 (app & sidekiq)
  3. Start PVB Public (app)
  4. Run tests

Test Configuration

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.

MAILTRAP_API_TOKEN

API token for Mailtrap, used to fetch email via the API.

START_PAGE

This should be the start page for creating a new booking.

PRISON_START_PAGE

This should be the index page of prisons used by staff.

EMAIL & PASSWORD

Staff login details (for single sign on).

Docker build

docker build -t pvb-integration .
docker run --env-file=.env pvb-integration

ministryofjustice.prison-visits-integration-tests's People

Contributors

alan avatar chrishanes avatar dependabot-preview[bot] avatar dependabot-support avatar doctorpod avatar kpobeenorris avatar mattpep avatar mloughran avatar rossjones avatar starswan avatar stupidcodefactory avatar tobyret avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.