test/admin_ui: Browser-based tests for the
admin-uicomponent using Capybara.
test/apis: HTTP tests for the internal APIs provided by API Umbrella.
test/processes: Testing the behavior of API Umbrella's server processes.
test/proxy: Testing the behavior of API Umbrella's proxy features.
test/testing_sanity_checks: Tests to sanity check certain behaviors of the overall test suite.
For running the tests, the
Dockerfile-test can be used. After building the base-image, the test image can be build:
docker build -f Dockerfile-test --build-arg BASE_IMAGE=<IMAGE_TO_TEST> -t umbrella-test .
docker-compose -f docker/compose/docker-compose.yaml up
Test can then be executed via:
docker run --network host -v $(pwd)/pics:/app/test/tmp/capybara umbrella-test make test
All screenshots taken by selenium/capybara can be found at $(pwd)/pics after that. To access logfiles of all umbrella components, the tests should be executed as following:
docker run --network host -v $(pwd)/pics:/app/test/tmp/capybara --entrypoint bash -it umbrella-test make test
Logs can be found at
Running Individual Tests
Individual tests can be run in a similar way. Precondition is a running enviornment, as described in the previous paragraph.
The test to run can be provided via the environment variable
TEST_TO_RUN and can either be a single test file(f.e.
or a folder to run all test below that(f.e.
docker run -e TEST_TO_RUN=<MY_TEST> --network host -v $(pwd)/pics:/app/test/tmp/capybara --entrypoint bash -it umbrella-test make single-test