Acceptance Tests

Acceptance Tests are structured procedures that verify whether specific acceptance criteria have been met. They provide the step-by-step instructions for confirming that requirements have been implemented correctly.

Overview

Acceptance Tests in Test & Accept directly verify specific Acceptance Criteria within SOW Items. This relationship forms a complete traceability chain from high-level project requirements down to detailed verification procedures.

The hierarchy is:

  1. Statement of Work - The overall scope document
  2. SOW Items - Specific deliverables within the SOW
  3. Acceptance Criteria - Binary pass/fail conditions for each SOW Item
  4. Acceptance Tests - Procedures that verify each Acceptance Criterion

Acceptance Tests:

  • Provide detailed verification procedures for each acceptance criterion
  • Include setup instructions, execution steps, and pass/fail criteria
  • Document the evidence of requirement satisfaction
  • Ensure complete traceability from requirements to verification
  • Allow for consistent repeatability of verification procedures

By linking tests directly to acceptance criteria, Test & Accept ensures comprehensive coverage and traceability throughout the project lifecycle.

The Acceptance Test Model

  • Name
    id
    Type
    string
    Description

    Unique identifier for the acceptance test.

  • Name
    sowItemId
    Type
    string
    Description

    ID of the SOW Item this test belongs to.

  • Name
    criterionId
    Type
    string
    Description

    ID of the acceptance criterion this test verifies.

  • Name
    title
    Type
    string
    Description

    The title of the test procedure.

  • Name
    description
    Type
    string
    Description

    Overall description of what the test verifies.

  • Name
    prerequisites
    Type
    string
    Description

    Required setup before the test can be executed.

  • Name
    steps
    Type
    array
    Description

    Ordered array of test steps to follow.

  • Name
    expectedResults
    Type
    string
    Description

    The results that indicate a successful test.

  • Name
    status
    Type
    string
    Description

    Current status (e.g., "pending", "passed", "failed").

  • Name
    createdBy
    Type
    string
    Description

    The user ID of who created the test.

  • Name
    createdAt
    Type
    timestamp
    Description

    Timestamp of when the test was created.

  • Name
    updatedAt
    Type
    timestamp
    Description

    Timestamp of when the test was last updated.

Creating Acceptance Tests

Via the UI

  1. Navigate to a SOW Item
  2. Click "Add Test Procedure"
  3. Link the test to the relevant acceptance criterion
  4. Fill in the test details:
    • Title
    • Description
    • Prerequisites
    • Test steps
    • Expected results
  5. Click "Save Test"

Via the API

// Create a new acceptance test
const newTest = await apiClient.tests.create(
  "sow_id",
  "sow_item_id",
  {
    criterionId: "criterion_id",
    title: "User Login Test",
    description: "Verify that users can log in with valid credentials",
    prerequisites: "Test user account must exist in the system",
    steps: [
      { number: 1, description: "Navigate to the login page" },
      { number: 2, description: "Enter valid username and password" },
      { number: 3, description: "Click the 'Login' button" }
    ],
    expectedResults: "User is authenticated and redirected to the dashboard",
    status: "pending"
  }
);

AI-Generated Test Procedures

Test & Accept includes AI capabilities that can automatically generate test procedures based on acceptance criteria:

  1. Navigate to a SOW Item
  2. Click the "Generate Tests" button
  3. Review and edit the auto-generated test procedures
  4. Save the finalized tests

Test Structure

A well-structured acceptance test typically includes:

  1. Prerequisites: Any required setup or preconditions
  2. Test Steps: Numbered, sequential actions to perform
  3. Expected Results: Clear definition of what indicates success
  4. Actual Results: Observations during test execution
  5. Evidence: Screenshots, logs, or other verification data
  6. Pass/Fail Status: The outcome of the test execution

Executing Tests

To execute an acceptance test:

  1. Navigate to the test procedure
  2. Ensure all prerequisites are in place
  3. Follow each step in sequence
  4. Compare actual results to expected results
  5. Update the test status (passed/failed)
  6. Add any evidence or notes about the execution

Test Status Management

Acceptance tests have three possible statuses:

  • Pending: The test has been defined but not yet executed
  • Passed: The test has been executed and all acceptance criteria were met
  • Failed: The test has been executed and one or more acceptance criteria were not met

To update a test's status:

// Update test status
await apiClient.tests.updateStatus(
  "test_id",
  "passed",
  {
    notes: "All steps executed successfully, verified dashboard redirect",
    executedBy: "user_id",
    executedAt: new Date().toISOString()
  }
);

Best Practices

  • Complete Coverage: Ensure every acceptance criterion has at least one test
  • Clear Instructions: Write steps that anyone could follow without special knowledge
  • Specific Expectations: Define precisely what success looks like
  • Reusable Tests: Design tests to be repeatable across versions
  • Independent Tests: Each test should stand alone and not depend on other tests
  • Evidence-Based: Include provisions for capturing verification evidence
  • Maintainable: Update tests when requirements change

API Reference

EndpointMethodDescription
/api/v1/sows/{sowId}/testsGETList all tests for a SOW
/api/v1/sows/{sowId}/items/{itemId}/testsGETList tests for a SOW Item
/api/v1/tests/{id}GETGet test by ID
/api/v1/sows/{sowId}/items/{itemId}/testsPOSTCreate a new test
/api/v1/tests/{id}PUTUpdate a test
/api/v1/tests/{id}DELETEDelete a test
/api/v1/tests/{id}/structureGETGet test with full structure

For complete API details, refer to the API Reference.

Was this page helpful?