Download the PHP package phpunit/otr-report without Composer

On this page you can find all versions of the php package phpunit/otr-report. 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 otr-report

CI Status codecov Latest Stable Version Total Downloads Monthly Downloads Daily Downloads

otr-report

This tool generates reports from test result data in the Open Test Reporting (OTR) format produced by PHPUnit >= 13.2.

Note: Open Test Reporting is language-agnostic and tool-agnostic. This tool, however, is specialised for the OTR XML produced by PHPUnit 13.2 and newer, which contains additional information specific to PHP and PHPUnit.

Installation

This tool is distributed as a PHP Archive (PHAR):

Please replace X.Y with the version of otr-report you are interested in.

Using Phive is the recommended way for managing the tool dependencies of your project:

It is not recommended to use Composer to download and install this tool.

Generating OTR data

This tool operates on test result data that PHPUnit writes in the Open Test Reporting (OTR) XML format.

Use PHPUnit's --log-otr option to write an OTR XML logfile for a test-suite run:

The logfile records, among other things, how long each test took to run.

Usage

Listing the slowest tests

The otr-report slowest command reads the OTR XML logfile of a single test-suite run and prints the ten slowest tests, ordered from slowest to fastest.

This is useful for finding the tests that dominate the runtime of your test suite.

Use the --limit option to list a different number of tests; it defaults to 10.

Example

The --above-mean option

With the --above-mean option, the report first calculates the mean runtime across all tests and then lists only the tests that are slower than the mean. Each listed test is annotated with a factor that shows how many times slower than the mean it is.

The --limit option

By default, the ten slowest tests are listed. Use the --limit option to list a different number of tests:

The option also applies to --above-mean. The value must be a positive integer.

The --sort option

By default, tests are sorted by their wall-clock runtime. Use the --sort option to sort by a different metric:

The option combines with --above-mean, which then lists the tests beyond the mean of the chosen metric.

Generating a trend report

The otr-report trends command reads all OTR XML logfiles in a directory and generates a single HTML report that visualizes how your test suite evolves across runs.

This is useful for tracking the runtime and the number of tests of your test suite over time, for example by archiving one OTR XML logfile per CI run into a shared directory.

The generated HTML report includes:

The runs are ordered by their start time, which is read from the OTR XML logfiles.

Example

Collect one OTR XML logfile per run into a directory:

Then generate the trend report:

The first argument is the directory containing the OTR XML logfiles, the second argument is the HTML file the trend report is written to.

Generating a test results report

The otr-report results command reads the OTR XML logfile of a single test-suite run and generates a self-contained HTML report that visualises the outcome of every test.

The generated HTML report includes:

Tests that did not pass are expanded by default; successful tests are collapsed. Clicking a class or method in the sidebar scrolls to its entry in the main pane.

Example

The first argument is the OTR XML logfile, the second argument is the HTML file the report is written to.

The --testdox option

By default, the report identifies each test class and each test method by its PHP name. With the --testdox option, the report uses the TestDox information (the prettified class and method names that PHPUnit records in the OTR XML logfile) instead. When a test does not have TestDox information, the original class or method name is used as a fallback.


All versions of otr-report with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-ctype Version *
ext-dom Version *
ext-libxml Version *
phpunit/php-text-template Version ^6.0
sebastian/cli-parser Version ^5.0
sebastian/version Version ^7.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 phpunit/otr-report contains the following files

Loading the files please wait ...