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:
- Statement of Work - The overall scope document
- SOW Items - Specific deliverables within the SOW
- Acceptance Criteria - Binary pass/fail conditions for each SOW Item
- 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
- Navigate to a SOW Item
- Click "Add Test Procedure"
- Link the test to the relevant acceptance criterion
- Fill in the test details:
- Title
- Description
- Prerequisites
- Test steps
- Expected results
- 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:
- Navigate to a SOW Item
- Click the "Generate Tests" button
- Review and edit the auto-generated test procedures
- Save the finalized tests
When using AI-generated tests, always review them carefully to ensure they completely verify the acceptance criteria. Make edits as needed to improve coverage and clarity.
Test Structure
A well-structured acceptance test typically includes:
- Prerequisites: Any required setup or preconditions
- Test Steps: Numbered, sequential actions to perform
- Expected Results: Clear definition of what indicates success
- Actual Results: Observations during test execution
- Evidence: Screenshots, logs, or other verification data
- Pass/Fail Status: The outcome of the test execution
Executing Tests
To execute an acceptance test:
- Navigate to the test procedure
- Ensure all prerequisites are in place
- Follow each step in sequence
- Compare actual results to expected results
- Update the test status (passed/failed)
- 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
Endpoint | Method | Description |
---|---|---|
/api/v1/sows/{sowId}/tests | GET | List all tests for a SOW |
/api/v1/sows/{sowId}/items/{itemId}/tests | GET | List tests for a SOW Item |
/api/v1/tests/{id} | GET | Get test by ID |
/api/v1/sows/{sowId}/items/{itemId}/tests | POST | Create a new test |
/api/v1/tests/{id} | PUT | Update a test |
/api/v1/tests/{id} | DELETE | Delete a test |
/api/v1/tests/{id}/structure | GET | Get test with full structure |
For complete API details, refer to the API Reference.