Environments
Declare Environment Configuration
- specmatic.yaml
- specmatic.json
version: 2
environments:
staging:
baseurls:
auth.spec: http://localhost:8080
variables:
username: jackie
password: PaSsWoRd
{
"version": 2,
"environments": {
"staging": {
"baseurls": {
"auth.spec": "http://localhost:8080"
},
"variables": {
"username": "jackie",
"password": "PaSsWoRd"
}
}
}
}
The environments key in this example contains configuration for the staging environment. It can contain configuration for any number of environments.
Environment Configuration Options
Each environment configuration can contain:
Base URLs
baseurls - needed when running contracts as test as part of authentication
Variables
variables - these values are plugged into the Examples rows of an auth contract for authentication, or even when running regular contract tests