Skip to main content

New Feature: Pairwise Combinatorial Testing for Optimal Test Data Generation

· 3 min read
Alan Richardson
Creator of AnyWayData

New feature for test data generation: Pairwise Testing! This addition brings combinatorial testing capabilities directly to AnyWayData, helping you generate efficient test data sets with pairs coverage and minimal redundancy.

What's New

The pairwise feature automatically generates the minimal set of test data combinations that provides 100% pairwise coverage across your enum parameters. Instead of testing every possible combination (which can be exponentially large), pairwise ensures every pair of values across different parameters is tested at least once.

Key Benefits

  • 90-99% reduction in test data size compared to full factorial testing
  • 100% pairwise coverage guarantee - no missed parameter interactions
  • Automatic optimization using advanced combinatorial algorithms
  • Seamless integration with existing AnyWayData workflows
  • Multiple interface options - works in both the main app and data generator

How It Works

When you define 2 or more enum fields in your test data schema, AnyWayData automatically detects the opportunity for pairwise generation and shows a "Generate Pairwise" button.

Example: Configuration Testing

Let's say you're testing a web application with these configuration options:

browser
chrome,firefox,safari,edge
device
desktop,tablet,mobile
theme
light,dark

A full factorial test would require 4 × 3 × 2 = 24 test cases. With pairwise, you get complete pairwise coverage with just 8 test cases - a 67% reduction while maintaining comprehensive interaction testing.

Real-World Impact

This feature is particularly powerful for:

  • Web application testing across browsers, devices, and configurations
  • API testing with multiple parameter combinations
  • Mobile app testing across OS versions, device types, and settings
  • Configuration validation for software with multiple options
  • A/B testing setup with various feature flag combinations

Technical Excellence

The implementation uses a greedy set cover approximation algorithm that:

  • Runs efficiently in O(n² × v² × log(pairs)) time complexity
  • Produces deterministic results for consistent testing
  • Handles any number of parameters and values per parameter
  • Integrates seamlessly with AnyWayData's existing enum data type system

Getting Started

In the Main App (app.html)

  1. Open the Test Data section
  2. Define your enum parameters in the text schema:
    color
    red,blue,green
    size
    small,large
  3. Click "Generate Pairwise" when the button appears
  4. Export your optimized test data in any format

In the Data Generator (generator.html)

  1. Set up enum fields using the schema builder
  2. Click "Generate Pairwise" to download your combinations
  3. Choose from CSV, JSON, SQL, or any other export format

Integration and Future

Pairwise generation works seamlessly with:

  • All export formats - CSV, JSON, Markdown, SQL, and code generation
  • Grid editing capabilities - manually adjust combinations as needed
  • REST API access - generate pairwise data programmatically
  • Existing test data workflows - combine with faker and regex data

This feature represents our commitment to bringing enterprise-grade testing methodologies to an accessible, user-friendly interface. Whether you're a test engineer planning test campaigns or a developer setting up configuration tests, pairwise testing helps you achieve better coverage with less effort.