AutoBE
    Preparing search index...

    Interface AutoBeTestWriteEvent

    Event fired when the Test agent writes and completes individual test scenario files.

    This event provides real-time visibility into the test file creation process as the Test agent systematically writes test scenarios for each API endpoint. Each write event represents the completion of a specific test file that implements use case scenarios, ensuring comprehensive coverage of API functionality and business logic validation.

    The write events enable stakeholders to monitor the test suite development and understand how comprehensive validation coverage is being built to ensure the generated application functions correctly under realistic operational conditions and properly implements business requirements.

    Michael

    interface AutoBeTestWriteEvent {
        completed: number;
        created_at: string & Format<"date-time">;
        domain: string;
        draft: string;
        final?: string;
        id: string;
        location: string;
        review?: string;
        scenario: string;
        step: number;
        tokenUsage: IAutoBeTokenUsageJson.IComponent;
        total: number;
        type: "testWrite";
    }

    Hierarchy (View Summary)

    Index

    Properties

    completed: number

    Number of items completed.

    Tracks how many items have been successfully processed so far in the current operation. This value increments as each item is completed, providing real-time progress indication.

    The ratio of completed to total gives the completion percentage: progress = (completed / total) * 100

    created_at: string & Format<"date-time">

    Timestamp when the event was created.

    ISO 8601 formatted date-time string indicating when this event was emitted by the system. This timestamp is crucial for event ordering, performance analysis, and debugging the agent workflow execution timeline.

    Format: "YYYY-MM-DDTHH:mm:ss.sssZ" (e.g., "2024-01-15T14:30:45.123Z")

    domain: string

    Functional domain category for test organization.

    Primary API resource domain (e.g., "user", "article", "payment") used for file structure and logical test grouping.

    draft: string

    Initial test code implementation.

    First working version of the TypeScript E2E test function, implementing the complete business scenario with proper types and SDK usage.

    final?: string

    Final production-ready test code.

    Polished implementation incorporating all review feedback, ready for deployment in the actual test suite.

    id: string

    A unique identifier for the event.

    location: string

    File system path where the test file should be located.

    Specifies the relative or absolute path for the test file within the project structure. This location typically follows testing conventions and may be organized by API endpoints, feature modules, or business domains to ensure logical test suite organization and easy navigation.

    Example: "test/features/api/order/test_api_shopping_order_publish.ts"

    review?: string

    Code review feedback and improvement suggestions.

    Quality assessment results identifying issues, best practice violations, and specific recommendations for code refinement.

    scenario: string

    Test scenario description and implementation strategy.

    Detailed explanation of the business scenario to be tested, including step-by-step execution plan and test methodology.

    step: number

    Iteration number of the requirements analysis this test writing reflects.

    Indicates which version of the requirements analysis this test file creation work is based on. This step number ensures that the test scenarios are aligned with the current requirements and helps track the development of validation coverage as business requirements and API specifications evolve.

    The step value enables proper synchronization between test writing activities and the underlying requirements, ensuring that the test suite remains relevant to the current project scope and validation objectives.

    Detailed token usage metrics for the current operation.

    Contains comprehensive token consumption data including total usage, input token breakdown with cache statistics, and output token categorization by generation type. This component-level tracking enables precise analysis of resource utilization for specific agent operations such as schema generation, test writing, or code implementation.

    The token usage data helps identify optimization opportunities, monitor operational costs, and ensure efficient use of AI resources throughout the automated backend development process.

    total: number

    Total number of items to process.

    Represents the complete count of operations, files, endpoints, or other entities that need to be processed in the current workflow step. This value is typically determined at the beginning of an operation and remains constant throughout the process.

    Used together with the completed field to calculate progress percentage and estimate time to completion.

    type: "testWrite"

    Unique identifier for the event type.

    A literal string that discriminates between different event types in the AutoBE system. This field enables TypeScript's discriminated union feature, allowing type-safe event handling through switch statements or conditional checks.

    Examples: "analyzeWrite", "prismaSchemas", "interfaceOperations", "testScenarios"