drift-testing

Generate and verify contract tests from OpenAPI specs with Drift CLI.

6|3|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/pactflow/pactflow-agent-skills --skill drift-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drift-testing
Source: https://github.com/pactflow/pactflow-agent-skills/tree/main/plugins/swagger-contract-testing/skills/drift-testing
Command: npx skills add https://github.com/pactflow/pactflow-agent-skills --skill drift-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Drift testing automates the generation and verification of contract tests against OpenAPI specs, enabling teams to quickly validate API conformance and detect drift without manual scripting.

Core Features & Use Cases

  • Generate Drift test cases from an OpenAPI spec, covering common scenarios such as 200/201 responses, 401, and 404.
  • Use lifecycle hooks and Lua-exported functions to seed data for stateful tests and clean up after runs.
  • Integrate with PactFlow BDCT to publish verification bundles and drive contract transparency.

Quick Start

Provide your OpenAPI spec path and let Drift generate a complete test suite and BDCT artifacts.

Frequently Asked Questions about drift-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate contract testing against an OpenAPI spec?

You can seed data for stateful tests using lifecycle hooks and Lua-exported functions to set up pre-seeded data for operations requiring state, and clean up after test runs.

Can I publish verification bundles to PactFlow BDCT?

Drift testing targets scenarios requiring pre-seeded data for stateful operations, utilizing lifecycle hooks and Lua-exported functions to seed data and clean up after runs.

Do I need Lua to handle stateful operations in Drift testing?

Drift testing uses Lua-exported functions within lifecycle hooks to seed data for stateful operations and clean up after test runs, ensuring tests cover multiple response codes accurately.

What is the best way to detect API conformance drift without manual scripting?

Drift testing detects API drift by automating contract test generation and verification against OpenAPI specs, eliminating manual scripting. It quickly validates API conformance by covering multiple response codes and edge cases.

Does drift testing support authentication edge cases and 404 responses?

Drift testing covers authentication edge cases and 404 responses by generating test cases from OpenAPI specs that target multiple response codes including 200/201, 401, and 404.

How do I set up pre-seeded data for stateful API contract tests?

Use lifecycle hooks and Lua-exported functions within Drift testing to seed data required for stateful operations and clean up after test runs, ensuring accurate contract verification.