This project contains automated tests for OJS (Open Journal Systems) using Playwright.
-
Install dependencies:
pip install -r requirements.txt
-
Install required Browser and Dependency for Playwright
playwright install --with-deps chromium
-
Configure environment variables: Create a
.env
file in the project root with the following variables:BASE_URL="https://your-ojs-instance.com" OJS_USER="your-username" OJS_PASS="your-password"
The default values are:
- BASE_URL="https://cdatp.journals.qucosa.de/cdatp/oaipmh"
- OJS_USER="admin"
- OJS_PASS="password"
Run all tests:
pytest
Run a specific test file:
pytest test_suite.py
Run a specific test:
pytest test_suite.py::TestFrontend::test_homepage_static_content
The tests use the following environment variables from the .env
file:
BASE_URL
: The base URL of the OJS instance to testOJS_USER
: The username for authenticationOJS_PASS
: The password for authentication
You can also override these variables by passing them as command-line options:
pytest --base-url="https://another-ojs-instance.com" --ojs-user="another-user" --ojs-pass="another-password"