Skip to content

Files

Latest commit

7f64906 · Mar 21, 2020

History

History
This branch is 1 commit behind picoCTF/picoCTF:master.

integration

picoCTF-web Integration Tests

Tests which verify the overall behavior of the web platform, usually by making multiple API calls. In some cases, tests directly interact with the database.

Usage

  1. The development dependencies must be installed in order to run the test suite. To do so, run pip install .[dev] from the picoCTF-web directory.

  2. The test suite expects to be able to bring up MongoDB and Redis servers on their default ports. Depending on your system, you may need to modify pytest.ini:

    variable purpose
    mongo_exec path to mongod executable
    redis_exec path to redis-server executable
  3. Ensure that the FLASK_ENV environment variable is not set in your current shell. Running the Flask app in development mode can be useful for local development, but also modifies Flask's exception handling behavior and will break the tests.

  4. Run pytest from the picoCTF-web directory. A code coverage report will also be generated by default at ./coverage_report.