https://github.com/delta-reporter/delta-reporter-phpunit
Delta plugin for PHP Unit
https://github.com/delta-reporter/delta-reporter-phpunit
delta-reporter phpunit
Last synced: 5 months ago
JSON representation
Delta plugin for PHP Unit
- Host: GitHub
- URL: https://github.com/delta-reporter/delta-reporter-phpunit
- Owner: delta-reporter
- License: apache-2.0
- Created: 2020-03-23T11:13:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-19T18:26:39.000Z (about 3 years ago)
- Last Synced: 2025-11-27T14:50:07.541Z (7 months ago)
- Topics: delta-reporter, phpunit
- Language: PHP
- Homepage:
- Size: 1020 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Delta Reporter PHPUnit Service #
This service is intended to send information from PHPUnit tests to Delta Reporter
### Installation ###
Installing this service is simple as adding it as a dependency to composer
```json
"minimum-stability": "dev",
"require-dev": {
"delta-reporter/phpunit-client" : "*"
},
```
### Configuration ###
#### Add listener to phpunit.xml ####
```xml
HOST URL
PROJECT NAME
TEST TYPE
ENABLED
```
If the environment variable `DELTA_LAUNCH_ID` is not present, a new launch is going to be created on Delta Reporter automatically using the current date as `PHPUnit Launch {Y-m-d\TH:i:s}`
If you wish to generate a DELTA_LAUNCH_ID to pass it to several types of tests, please check this [website](https://delta-reporter.github.io/delta-reporter/jenkins/)
### Sending media to Delta Reporter ###
You can sent images and video to Delta Reporter, these will be displayed in a container into your test
```
use DeltaReporter\Service\DeltaReporterHTTPService;
abstract class DemoClass extends TestCase
{
private function demoFunction()
{
DeltaReporterHTTPService::saveFileForTest($path, 'img', 'Screenshot description');
}
}
```
The function `saveFileForTest()` requires three parameters:
- FilePath: string = Full path to upload the media file
- Type: string = Type of media, it accept two values 'img' or 'video'
- Description: string = Description of the media file, which is going to be displayed in a container