Download the PHP package testflowlabs/testlink without Composer
On this page you can find all versions of the php package testflowlabs/testlink. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download testflowlabs/testlink
More information about testflowlabs/testlink
Files in testflowlabs/testlink
Package testlink
Short Description Framework-agnostic test traceability for PHP. Supports Pest and PHPUnit with bidirectional code-to-test linking.
License MIT
Homepage https://link.testflowlabs.dev/
Informations about the package testlink
TestLink
Framework-Agnostic Test Traceability for PHP
TestLink creates bidirectional links between your tests and production code. Know exactly which tests cover each method, and which methods each test exercises.
Supports both Pest and PHPUnit - use whichever testing framework you prefer, or both in the same project.
Features
- Framework Agnostic - Works with Pest, PHPUnit, or both
- Bidirectional Linking - Link tests to methods AND methods to tests
- Two Link Types - Coverage links (
linksAndCovers) and traceability-only links (links) - Sync Validation - Detect missing or orphaned links
- Auto-Sync - Generate link calls from
#[TestedBy]attributes - Standalone CLI - Use
testlinkcommand independently of test runner - JSON Export - CI/CD integration
Quick Start
Installation
Why two packages?
test-attributesmust be a production dependency because#[TestedBy],#[LinksAndCovers], and#[Links]attributes are placed on production classes. PHP needs these attribute classes available when autoloading your production code.testlinkcan be a dev dependency because it only provides CLI tools (testlink report,testlink validate,testlink sync) that run during development.
Link from Production Code (Recommended)
Link from Tests
Pest
PHPUnit
CLI Commands
Sample Output
Validation
The validate command checks for:
- Missing Coverage: Production methods with
#[TestedBy]but no matching link call - Orphaned Links: Tests claiming links that don't exist
- Sync Issues: Mismatched bidirectional links
Auto-Sync
Automatically generate link calls from #[TestedBy] attributes:
How It Works
- Scans production code for
#[TestedBy]attributes - Locates corresponding test files and test cases
- Adds missing
linksAndCovers()calls (Pest) or#[LinksAndCovers]attributes (PHPUnit)
Before Sync (Pest)
After Sync (Pest)
Before Sync (PHPUnit)
After Sync (PHPUnit)
Link Types
| Type | Pest Method | PHPUnit Attribute | Purpose |
|---|---|---|---|
| Link + Coverage | ->linksAndCovers() |
#[LinksAndCovers] |
Traceability + triggers coverage tracking |
| Link Only | ->links() |
#[Links] |
Traceability only, no coverage |
Use Link + Coverage for unit tests where you want coverage tracking. Use Link Only for integration/e2e tests where unit coverage is already tracked elsewhere.
JSON Export
For CI/CD integration:
Bootstrap (Pest)
Add to tests/Pest.php to enable linksAndCovers() and links() methods:
Best Practices
1. Prefer #[TestedBy] Attributes
Placing links in production code keeps coverage visible where it matters:
2. Use Link Types Appropriately
3. Run Validation in CI
Hybrid Projects
TestLink seamlessly supports projects using both Pest and PHPUnit:
Documentation
Full documentation is available at the TestLink Documentation.
- Tutorials - Learn TestLink step-by-step with TDD and BDD workflows
- How-to Guides - Solve specific problems and tasks
- Reference - CLI commands, attributes, and configuration
- Explanation - Understand bidirectional linking concepts
Ecosystem
TestLink is part of the TestFlowLabs ecosystem:
| Package | Description |
|---|---|
| test-attributes | PHP attributes for test metadata (#[LinksAndCovers], #[Links]) |
| testlink | This package - Test traceability, #[TestedBy] attribute, CLI tools |
Contributing
- Fork the repository
- Create a feature branch
- Run
composer testto ensure all checks pass - Submit a pull request
License
MIT License. See LICENSE for details.
All versions of testlink with dependencies
nikic/php-parser Version ^5.0
phpstan/phpdoc-parser Version ^2.0
testflowlabs/test-attributes Version ^1.0