AutoBE
    Preparing search index...

    Pattern-based random string generator.

    Generates strings matching specific patterns using regular expressions or format strings. Essential for creating data that matches exact business format requirements like codes, identifiers, and structured text for API operations.

    E2E testing scenarios:

    • Product SKU generation for API parameters
    • User ID formats for business system integration
    • Business code patterns for API operations
    • Structured identifier creation for entity relationships
    • Format-specific text generation for validation testing

    API integration: Particularly useful for generating parameters that must match specific format requirements in IApiOperateStatement calls.

    AI pattern usage: Ensure patterns match actual business format requirements and API validation rules.

    interface IPatternRandom {
        pattern: string;
        type: "patternRandom";
    }
    Index

    Properties

    Properties

    pattern: string

    Regular expression pattern for string generation.

    Defines the exact format structure for generated strings. Should match business format requirements and validation patterns used in API operations.

    Examples:

    • "SKU-[0-9]{6}" for product SKUs in business systems
    • "[A-Z]{3}-[0-9]{4}" for order codes in API operations
    • "[a-zA-Z]{5,10}" for username patterns with length constraints
    • "[A-Z]{2}[0-9]{8}" for business reference numbers

    AI pattern creation: Ensure patterns generate valid data that passes business validation rules and format requirements used in API calls.

    type: "patternRandom"

    Type discriminator.