Skip to main content

Conduits

Conduits are Nidra's powerful test flow system that allows you to chain multiple requests together, extract variables from responses, and validate API behavior with assertions.

What is a Conduit?

A Conduit is an automated sequence of HTTP requests that execute in order. Think of it as a test script or workflow that:

  • Executes requests sequentially
  • Extracts data from responses to use in subsequent requests
  • Validates responses with assertions
  • Simulates complex user workflows
  • Automates integration testing

Use Cases

Conduits are perfect for:

  • Authentication flows: Login → Get token → Make authenticated request
  • CRUD operations: Create resource → Read it → Update it → Delete it
  • Multi-step workflows: Create user → Verify email → Complete profile
  • Integration testing: Test complete business processes
  • Data setup: Prepare test data for manual testing

Creating a Conduit

  1. Navigate to "Conduits" in the sidebar
  2. Click "New Conduit"
  3. Give your conduit a name
  4. Add steps to your conduit
  5. Configure each step
  6. Click "Save"

Conduit Steps

Each step in a conduit can be:

  • Request: Execute an HTTP request
  • Delay: Wait for a specified time
  • Variable: Set or modify variables
  • Assertion: Validate response data
  • Script: Custom JavaScript logic (advanced)

Request Steps

The most common step type executes an HTTP request:

  1. Select an existing request from a collection
  2. Or create a new request inline
  3. Configure variable extraction
  4. Add assertions

Variable Extraction

Extract data from responses to use in later steps:

Example: Extract user ID from response

{
"id": 12345,
"email": "user@example.com"
}

Extract id as {{userId}} to use in subsequent requests.

Learn more about extraction →

Assertions

Validate that responses meet expectations:

  • Status code is 200
  • Response contains specific data
  • Response time is under threshold
  • Headers are correct

Learn more about assertions →

Running Conduits

Execute your conduit:

  1. Click "Run Conduit"
  2. Watch the steps execute in sequence
  3. View results for each step
  4. Review any failed assertions

Execution Results

After running a conduit, you'll see:

  • Overall success/failure status
  • Results for each step
  • Response data and timing
  • Assertion results
  • Extracted variables

Advanced Features

Conditional Steps

Execute steps based on conditions:

  • Skip steps if previous step failed
  • Branch based on response data
  • Retry failed steps

Loops

Repeat steps multiple times:

  • Iterate over arrays
  • Poll until condition is met
  • Stress testing

Data-Driven Testing

Run the same conduit with different data sets:

  • CSV file import
  • JSON data arrays
  • Variable substitution

Conduit Variables

Variables in conduits have their own scope:

  • Conduit variables: Temporary variables that exist during execution
  • Extracted variables: Data pulled from responses
  • Environment variables: From the active environment

Variables can be:

  • Set at the start of the conduit
  • Extracted from responses
  • Modified during execution
  • Saved to the environment after completion

Best Practices

  • Keep conduits focused: One conduit per workflow or test scenario
  • Use descriptive names: For both conduits and steps
  • Add assertions liberally: Validate assumptions at each step
  • Handle errors gracefully: Plan for failure scenarios
  • Document your conduits: Explain what the conduit tests and why
  • Clean up after yourself: Delete test data created during execution

Debugging Conduits

When a conduit fails:

  1. Check the step that failed
  2. Review the request and response
  3. Verify variable values
  4. Check assertion logic
  5. Run individual steps manually

Scheduling Conduits

Run conduits on a schedule for continuous testing:

  • Hourly, daily, or weekly execution
  • Monitor API health
  • Catch regressions early

Next Steps