Download the PHP package tiden/phpunit-reporter without Composer

On this page you can find all versions of the php package tiden/phpunit-reporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpunit-reporter

tiden/phpunit-reporter

Tiden reporter for PHPUnit — a PHPUnit extension that watches a test run and reports results into Tiden's public Test Runs API. No changes to your test code. The PHP counterpart to tiden-javascript (Playwright, Vitest, Jest) and tiden-go.

Not published yet. Nothing is on Packagist; the package name tiden/phpunit-reporter is planned, not claimed.

Register it in phpunit.xml:

Then turn it on with environment variables — in CI only, if you like:

With none of those set the extension does nothing and says nothing. Local development is unaffected. If you set some of them but not all, it tells you exactly which one is missing — you meant to report, so a silent no-op would just cost you an afternoon.

What it does

Configuration

Every setting can come from an environment variable, from tiden.config.json in the working directory, or from a <parameter> in phpunit.xml. They use the same names everywhere, and environment beats file beats parameter.

Variable Meaning
TIDEN_MODE tiden to report, report to write results to disk, off (default)
TIDEN_FALLBACK mode to use if the primary one cannot run
TIDEN_BASE_URL e.g. https://api.tiden.ai
TIDEN_API_TOKEN personal API token (tfy_…)
TIDEN_PRODUCT_ID the product to report into
TIDEN_ROOT_DIR directory test paths are relative to (default: cwd)
TIDEN_ROOT_SUITE a suite to nest everything under, e.g. PHPUnit tests
TIDEN_ENVIRONMENT environment slug, e.g. ci
TIDEN_RUN_ID join an existing run instead of creating one
TIDEN_RUN_COMPLETE false to leave completion to an orchestrator
TIDEN_RUN_TITLE, TIDEN_RUN_DESCRIPTION run metadata
TIDEN_BRANCH, TIDEN_BUILD_SHA git metadata for the run
TIDEN_BATCH_SIZE results per request (default 200, max 2000)
TIDEN_STATUS_MAPPING e.g. invalid=failed
TIDEN_STATE_FILE where workers coordinate (see ParaTest below)
TIDEN_REPORT_CONNECTION_PATH output directory for report mode
TIDEN_DEBUG, TIDEN_LOGGING_CONSOLE, TIDEN_LOGGING_FILE logging

tiden.config.json uses the same nested shape as the JavaScript reporters, so a repository that already reports from JS can point PHP at the file it already has.

Attributes

All optional, all display-only — none of them changes which case a test is.

#[Suite] replaces the namespace-derived path rather than extending it. Tiden::title() and Tiden::comment() are no-ops when the extension is not bootstrapped, so tests using them run unchanged for anyone without Tiden configured.

Case identity

Each test method is one Tiden case, identified by:

Two properties are deliberate and worth knowing:

It is param-free. A #[DataProvider] with twenty rows is ONE case with twenty result attempts, not twenty cases. The row is carried in the result's params, not in its identity. This matches generateSignature in the JavaScript reporters and pkg/gotest in the Go one.

It never depends on presentation. TIDEN_ROOT_SUITE, #[Suite] and #[Title] change where a case appears and what it is called, never what case it is. Otherwise setting a root suite in CI would fork the history of every case in the product.

Changing the rule means bumping php/v3, not editing the pipeline: a signature that changes for an already-reported test forks its case and strands its history. SignatureTest holds a golden file that fails loudly if anything drifts.

Requirement linking

Tiden joins requirements to tests by source file, so every result carries fields["file_path"] relative to TIDEN_ROOT_DIR.

If a test file resolves outside that root the field is omitted rather than guessed — an unlinkable case is better than one linked to the wrong requirement — and you get a warning naming the file. If no result in the whole run resolved a path, that is a misconfiguration rather than an edge case, so the reporter says so and declines to complete the run. The usual cause is a containerised suite: PHPUnit sees /application/tests/... while TIDEN_ROOT_DIR still points at the host checkout. Set it to the mount point.

ParaTest

Each ParaTest worker bootstraps the extension in its own process, and ParaTest's parent does not run PHPUnit's event system — so the workers coordinate through a locked state file (in the temp directory, keyed by the ParaTest parent process). The run is created exactly once, and the state file is kept for the whole invocation so that no worker can ever open a second run.

If a worker dies without reporting, the run is deliberately left open. An incomplete run cannot pass a quality gate, whereas a completed run quietly missing a worker's results looks like a pass. Install ext-posix to have the reporter name the process that died; without it the run is still left open, just without the diagnostic.

One limitation, stated plainly. ParaTest tells a worker its own token but never how many workers there are, so a worker cannot know whether it is the last. It completes the run when every worker it has seen has finished. If a worker starts only after that — possible with a small suite, where a worker can finish before a sibling has booted — it joins the same run (never a second one) and logs an error saying its results cannot be recorded, because the run is closed. If you hit that, take completion out of the workers' hands:

When several suites share one CI job, set TIDEN_STATE_FILE explicitly. It is safe to reuse the same path across runs: a state file whose parent process differs from the current one is treated as a leftover and ignored.

Sharded CI

Create the run once, pass its id to every shard, and let the last one close it:

Develop

examples/ is a small suite covering every outcome the reporter can report; the integration test runs it in report mode and diffs the output against a golden file. The contract test in tests/Contract validates the request bodies against tiden-specs' openapi.yaml when that repository is checked out alongside this one.

Supports PHP ^8.2 and PHPUnit ^10.5 || ^11.0 || ^12.0.

MIT © Qase


All versions of phpunit-reporter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
ext-json Version *
phpunit/phpunit Version ^10.5 || ^11.0 || ^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tiden/phpunit-reporter contains the following files

Loading the files please wait ...