Migration Guide

Guide for migrating from older TestFlowKit versions

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:

OldNew
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" queryI prepare a request to "my_graphql.get_user"
I send the GraphQL requestI send the request

Field renames:

OldNew
baseUrlbase_url
url (GraphQL)endpoint
headersdefault_headers
queriesoperations

Checklist

  • Replace environments with env: + env files
  • Replace --env with --env-file
  • Move frontend.base_url into frontend section with {{ env.base_url }}
  • Merge backend and graphql into apis.definitions
  • Update all feature files to "api_name.endpoint_name" syntax
  • Run tkit validate

Next Steps