AutoBE
    Preparing search index...

    Array literal for creating array values directly.

    Represents direct array construction with explicit elements. Essential for providing list data in test scenarios such as multiple products, user lists, or configuration arrays, particularly as parameters for API operations.

    E2E testing scenarios:

    • Product lists for bulk API operations
    • Tag arrays for categorization in API requests
    • Multiple item selections for API parameters
    • Configuration option lists for test setup
    • Multiple entity references for relationship testing

    Note: Commonly used as arguments in IApiOperateStatement when API operations require array parameters, or for constructing test data to be used in business logic.

    AI function calling usage: Use when business scenarios require explicit list data rather than dynamic array generation from captured API responses.

    interface IArrayLiteralExpression {
        elements: IExpression[];
        type: "arrayLiteralExpression";
    }
    Index

    Properties

    Properties

    elements: IExpression[]

    Array of expressions representing the array elements.

    Each element can be any valid expression (literals, identifiers referencing captured data, function calls, etc.). Elements should represent meaningful business data appropriate for the array's purpose.

    ⚠️ CRITICAL AI RESTRICTION: Each element MUST be an AST expression, NOT raw JSON values! ⚠️ ❌ WRONG: ["item1", "item2", 123] (raw JSON values) ✅ CORRECT: [IStringLiteral, IStringLiteral, INumericLiteral] (AST expressions)

    Examples:

    • [product1, product2, product3] for entity arrays (referencing captured data)
    • ["electronics", "gadgets"] for category tags
    • [{ name: "file1.jpg" }, { name: "file2.jpg" }] for file lists
    • [seller.id, customer.id] for ID arrays (mixing captured data)

    AI content strategy: Populate with realistic business data that reflects actual usage patterns, mixing literals and references to captured data as appropriate.

    type: "arrayLiteralExpression"

    Type discriminator.