Environment Mgmt
Handle multile stages of delivery effortlessly. The Environment Management features let you run the same test suite cleanly against Local, Dev, Staging, and Production layers.
The configuration pattern
Manage environments via dynamic fixtures and JSON mappings. Centralize your URLs and keys under one structure.
{
"dev": {
"url": "https://dev.example.com"
},
"staging": {
"url": "https://staging.example.com"
}
}
Pass via CLI
Switching environment happens right at the pytest invocation level, ensuring absolute isolation:
pytest tests/ --env staging