Migration Guide
Breaking changes from older TestFlowKit versions. Run tkit validate after migrating.
1. Environment variables (replaces environments)
Before:
active_environment: "local"
environments:
local:
frontend_base_url: "http://localhost:3000"
staging:
frontend_base_url: "https://staging.example.com"
tkit run --env staging
After:
settings:
env_file: ".env.local.yml"
env:
base_url: "http://localhost:3000"
frontend:
base_url: "{{ env.base_url }}"
# .env.staging.yml
base_url: "https://staging.example.com"
tkit run --env-file .env.staging.yml
In Gherkin and config, replace environment-specific keys with {{ env.variable_name }}.
2. Unified APIs (replaces backend + graphql blocks)
Before:
backend:
baseUrl: "https://api.example.com"
endpoints:
get_users:
method: GET
path: "/users"
graphql:
url: "https://api.example.com/graphql"
queries:
get_user: "queries/get_user.graphql"
After:
apis:
definitions:
my_api:
type: rest
base_url: "https://api.example.com"
endpoints:
get_users:
method: GET
path: "/users"
my_graphql:
type: graphql
endpoint: "https://api.example.com/graphql"
operations:
get_user:
type: query
operation: "queries/get_user.graphql"
Step syntax change:
| Old | New |
|---|---|
I prepare a REST request to "get_users" | I prepare a request to "my_api.get_users" |
I prepare a GraphQL request for the "get_user" query | I prepare a request to "my_graphql.get_user" |
I send the GraphQL request | I send the request |
Field renames:
| Old | New |
|---|---|
baseUrl | base_url |
url (GraphQL) | endpoint |
headers | default_headers |
queries | operations |
Checklist
- Replace
environmentswithenv:+ env files - Replace
--envwith--env-file - Move
frontend.base_urlintofrontendsection with{{ env.base_url }} - Merge
backendandgraphqlintoapis.definitions - Update all feature files to
"api_name.endpoint_name"syntax - Run
tkit validate
Next Steps
- testflowkit.yml — Current config reference
- API Testing — Updated API steps