AutoBE
    Preparing search index...

    Interface IAutoBeTestValidateProps

    Configuration interface for validating E2E test functions against API specifications to ensure structural integrity and business logic compliance.

    This interface defines the input parameters required for comprehensive validation of Test agent-generated E2E test functions, ensuring they conform to API contracts, maintain proper business workflow structure, and follow established testing patterns. The validation process verifies both syntactic correctness and semantic alignment with business requirements.

    The validation combines API specification analysis with test function AST examination to identify structural inconsistencies, API contract violations, missing business logic steps, and deviations from established testing conventions before test compilation and execution.

    This validation layer is essential for maintaining test reliability and ensuring that generated test functions accurately represent intended business scenarios while properly integrating with the target API surface area.

    Samchon

    interface IAutoBeTestValidateProps {
        document: IDocument;
        function: IFunction;
    }
    Index

    Properties

    Properties

    document: IDocument

    Complete OpenAPI document specification defining the target API surface area and business operations.

    Contains the comprehensive AutoBeOpenApi.IDocument AST structure that defines all available API endpoints, operation specifications, request/response schemas, and business logic contracts that the test function should validate. This document serves as the authoritative source for API specification compliance checking during test validation.

    The document enables the validation process to verify that:

    • Test function API calls reference valid, existing endpoints
    • Request body structures align with defined schema requirements
    • Parameter types and constraints match API specifications
    • Response data access patterns correspond to actual response schemas
    • Business workflow sequences follow logical API operation dependencies
    • Error testing scenarios target realistic API failure conditions

    The API document provides the foundational context for ensuring test functions accurately represent the intended API surface area and will execute successfully against the actual backend implementation without structural or contract violations.

    function: IFunction

    E2E test function AST structure requiring validation for correctness and compliance.

    Contains the complete AutoBeTest.IFunction AST representation generated by the Test agent, including the strategic plan, draft implementation, and structured statement sequence that comprises the test function logic. This AST structure undergoes comprehensive validation to ensure it meets quality standards and accurately implements the intended business scenario.

    The validation process analyzes the test function structure to verify:

    Structural Integrity:

    • AST statement types conform to AutoBeTest interface specifications
    • Expression hierarchies maintain proper type relationships
    • Control flow patterns follow established conventions
    • Variable references align with API response capture patterns

    API Integration Compliance:

    • API operation statements reference valid endpoints from the document
    • Argument object structures match expected parameter schemas
    • Response data access patterns correspond to actual API response types
    • Authentication and session management sequences follow proper patterns

    Business Logic Validation:

    • Test workflow represents complete, realistic business scenarios
    • Data dependencies flow correctly through API operation sequences
    • Validation predicates verify meaningful business conditions
    • Error testing scenarios cover appropriate business rule violations

    Testing Best Practices:

    • Predicate usage patterns follow established validation conventions
    • Random data generation produces business-appropriate test values
    • Test coverage addresses both positive and negative scenarios
    • Documentation and naming conventions provide clear business context

    The validation ensures that the test function AST will generate reliable, executable test code that accurately validates the target business functionality while maintaining integration consistency with the API specification and following established testing quality standards.