Execution in Flows
Learn how QA teams use your external test cases in visual test flows.
Two Node Types
ReAPI provides two nodes for running external test cases:
| Node | Purpose | Use Case |
|---|---|---|
| External Test Case | Run a specific test | Known test, specific scenario |
| External Test Case Selector | Run tests by tags | Run all smoke tests, all auth tests |
External Test Case Node
Runs a single, specific test case.
Configuration
Node Type: External Test Case
Settings:
Library: MyTestLib # Your external library
Test Case: auth-login # Specific test ID
Timeout: 30000 # Override default timeoutWhen to Use
- Running a specific test in a flow
- Tests that must run in order
- Setup/teardown tests
- Critical path tests
Example Flow
┌─────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Start │───▶│ External Case: │───▶│ External Case: │
└─────────┘ │ auth-login │ │ verify-profile │
└──────────────────┘ └──────────────────┘External Test Case Selector Node
Runs multiple tests filtered by tags.
Configuration
Node Type: External Test Case Selector
Settings:
Library: MyTestLib
Tags: ["smoke", "auth"] # Filter criteria
Match Mode: ALL # ALL = must have all tags
# ANY = must have at least one tag
Parallel Level: 3 # Run 3 tests concurrentlyMatch Modes
ALL Mode - Test must have ALL specified tags:
// Tags filter: ["smoke", "auth"]
// ✅ Included
{ tags: ["smoke", "auth", "critical"] } // Has both
// ❌ Excluded
{ tags: ["smoke"] } // Missing "auth"
{ tags: ["auth", "regression"] } // Missing "smoke"ANY Mode - Test must have at least ONE specified tag:
// Tags filter: ["smoke", "auth"]
// ✅ Included
{ tags: ["smoke"] } // Has "smoke"
{ tags: ["auth", "regression"] } // Has "auth"
{ tags: ["smoke", "auth"] } // Has both
// ❌ Excluded
{ tags: ["regression", "e2e"] } // Has neitherExample Flow
┌─────────┐ ┌──────────────────────┐ ┌─────────────┐
│ Start │───▶│ Selector: │───▶│ Visual Node │
└─────────┘ │ Tags: ["smoke"] │ │ Cleanup API │
│ Mode: ANY │ └─────────────┘
│ Parallel: 5 │
└──────────────────────┘
│
▼
Runs all tests tagged "smoke"
5 at a time in parallelCombining Visual and External Tests
Mix external test cases with visual API nodes:
┌─────────┐
│ Start │
└────┬────┘
│
▼
┌────────────────────┐
│ Visual API Node │ ◀── QA-created: Setup test data
│ POST /api/setup │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ External Case: │ ◀── Developer-created: Complex auth flow
│ auth-full-flow │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ Selector: │ ◀── Run all payment tests
│ Tags: ["payments"] │
└─────────┬──────────┘
│
▼
┌────────────────────┐
│ Visual API Node │ ◀── QA-created: Verify final state
│ GET /api/verify │
└────────────────────┘Execution Order
Within a Selector
Tests run based on priority, then alphabetically:
// Priority 1 runs first
{ id: "setup", priority: 1 }
// Then priority 2
{ id: "test-a", priority: 2 }
{ id: "test-b", priority: 2 } // Alphabetical within same priority
// Then no priority (defaults to 999)
{ id: "cleanup" }Parallel Execution
With parallelLevel: 3:
Time ─────────────────────────────────────────▶
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Test 1 │ │ Test 2 │ │ Test 3 │
└────┬────┘ └────┬────┘ └────┬────┘
│ │ │
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Test 4 │ │ Test 5 │ │ Test 6 │
└─────────┘ └─────────┘ └─────────┘Note: Tests sharing context should use parallelLevel: 1 or be in separate flows.
Viewing Results
Test Report
Each external test case shows:
- Test name and ID
- Pass/fail status
- All assertion results
- Logs from
$log() - API calls from
$reportApiRequest() - Execution time
Assertion Details
┌─────────────────────────────────────────────┐
│ Test: auth-login │
│ Status: ✅ Passed │
│ Duration: 234ms │
├─────────────────────────────────────────────┤
│ Assertions: │
│ ✅ status: 200 equals 200 │
│ ✅ hasToken: true equals true │
│ ✅ schema: valid response schema │
├─────────────────────────────────────────────┤
│ API Calls: │
│ POST /api/auth/login → 200 (234ms) │
├─────────────────────────────────────────────┤
│ Logs: │
│ [info] Test started │
│ [debug] Response received │
│ [info] Test completed │
└─────────────────────────────────────────────┘Best Practices
Tag Strategy for QA
Help QA find the right tests:
// By feature area
tags: ["auth"]
tags: ["users"]
tags: ["payments"]
// By test type
tags: ["smoke"] // Quick sanity checks
tags: ["regression"] // Full test suite
tags: ["e2e"] // End-to-end flows
// By environment
tags: ["prod-safe"] // Safe to run in production
tags: ["staging-only"] // Only for stagingDocumentation for QA
Add clear descriptions:
{
id: "payment-refund-flow",
name: "Payment Refund Flow",
description: "Tests the complete refund process: initiate refund, " +
"verify status transitions, confirm final balance. " +
"Requires an existing order in context.",
tags: ["payments", "refunds", "regression"],
}Priority Guidelines
priority: 1 // Setup tests, must run first
priority: 2 // Core functionality
priority: 3 // Edge cases
priority: 10 // Cleanup tests, run last