Real-World Use Case: Automated QA & API Test Suites
PostQode provides AI testing agents (API Agent, Web Agent, Mobile Agent) designed to automate end-to-end testing workflows and integrate test execution into continuous integration (CI/CD) pipelines.
Scenario Overview
Goal: Import an existing OpenAPI specification, generate assertion-backed API test suites, run browser UI smoke tests, and export HTML execution reports in CI/CD.
Workflow Step-by-Step
Step 1: Import API Spec & Generate Test Suites
- Open PostQode in API Agent mode.
- Instruct PostQode:
Import swagger.json and generate functional test suites for all User Authentication and Payment endpoints. - PostQode invokes native tools (
import_library,create_test_suite,create_test_case) to construct:- Request payloads with dynamic variables (
{{baseUrl}},{{authToken}}) - Assertion checks (HTTP 200/201 status, response body schema validation, response time < 500ms)
- Request payloads with dynamic variables (
Step 2: Running Automated API Tests
- Run the test suite:
Execute the User Authentication test suite against environment stage-api.example.com. - PostQode executes requests programmatically, verifies assertions, and reports summary results:
| Test Case | Method | Endpoint | Status | Duration |
|---|---|---|---|---|
| User Signup | POST | /api/v1/auth/signup | PASSED | 142ms |
| User Login | POST | /api/v1/auth/login | PASSED | 98ms |
| Fetch Profile | GET | /api/v1/user/profile | PASSED | 45ms |
Step 3: Web UI & Browser Automation (web-qa)
- Switch to
web-qaAgent or Web Agent. - Instruct PostQode:
Open https://staging.example.com, log in using test credentials, navigate to Dashboard, and verify the Summary cards load cleanly without console errors. - PostQode drives a persistent Chromium browser session (
postqode_browser_agent), takes accessibility tree snapshots, fills forms, verifies visual elements, and captures screenshots.
Step 4: CLI Execution & CI/CD Pipeline Export
To run test suites headlessly in your Command Prompt / Terminal or inside CI/CD runners (GitHub Actions, GitLab CI, Jenkins):
- Install PostQode CLI globally or run on-demand via
npx:npm install -g @postqode/cli - Execute test suites and export standalone HTML reports:
npx @postqode/cli run --suite "User Auth" --reporter html --output ./reports/test-report.html - View or archive HTML, JSON, or JUnit XML reports directly inside CI build artifacts!