This guide explains how to set up your local environment for developing and running tests in the OQTOPUS Test Suite.
Install the following tools before starting development.
| Tool | Version | Description | Install Guide |
|---|---|---|---|
| runn | latest | Core testing framework for scenario tests | https://github.com/k1LoW/runn#install |
| Task | latest | Task runner for simplifying test commands | https://taskfile.dev/installation/ |
| Python | >=3.12 | Required for documentation generation | https://www.python.org/downloads/ |
| uv | >=0.10 | Python package and project manager (for docs) | https://docs.astral.sh/uv/getting-started/installation/ |
!!! note
If you only intend to run the runn tests and not build the documentation, Python and uv are optional.
Clone the repository:
git clone https://github.com/oqtopus-team/test-suite.git
cd test-suiteThe repository is organized as follows:
test-suite/
├─ scenario-tests/ # Scenario tests for quantum job execution
│ ├─ estimation-job/ # Estimation job tests
│ ├─ mp-job/ # Multi-programming job tests
│ ├─ sampling-job/ # Sampling job tests
│ ├─ sse-job/ # SSE job tests
│ ├─ setup/ # Setup tests
│ └─ runn-included/ # Shared test includes
├─ endurance-test/ # Endurance tests for long-term stability
├─ docs/ # Documentation sources (MkDocs)
├─ .github/ # GitHub workflows and repository settings
├─ mkdocs.yml # MkDocs configuration
└─ README.md # Project overview
To run the tests against the OQTOPUS Cloud API, configure your environment variables.
-
Navigate to the
scenario-testsdirectory:cd scenario-tests -
Create a
.envfile based on the required variables:touch .env
-
Populate the
.envfile with your API credentials:# API Configuration USER_API_ENDPOINT="<your-api-endpoint>" Q_API_TOKEN="<your-api-token>" DEVICE_ID="<your-device-id>"
USER_API_ENDPOINT: The full URL to your target OQTOPUS Cloud User-API endpoint (e.g.,https://api.example.com).Q_API_TOKEN: Your authentication token for the API.DEVICE_ID: The target device identifier (e.g.,qulacs).
!!! warning
Do not commit the .env file to version control. It is already added to .gitignore to prevent secret leakage.
Profiles let you switch between multiple environments (e.g., staging, production) without editing .env each time.
-
Create a profile file under
profiles/(at the repository root, shared betweenscenario-testsande2e):cp profiles/example.env profiles/<profile-name>.env
-
Edit the new profile file with the target environment's credentials:
USER_API_ENDPOINT="https://your-target-endpoint" Q_API_TOKEN="your-api-token" DEVICE_ID="your-device-id"
-
Specify the profile when running a task:
PROFILE=<profile-name> task runn-all
For example, if you created
profiles/staging.env:PROFILE=staging task runn-all
The profile file takes precedence over .env. Variables not defined in the profile fall back to .env.
Install documentation dependencies:
make installBuild the documentation:
make docs-buildLint markdown files:
make md-lintThis project uses MkDocs to generate the HTML documentation. Start the documentation server with:
make docs-serveOpen the documentation in your browser at http://localhost:8000.
Once your environment is set up, refer to the Development Flow to learn how to run tests and contribute changes.