https://github.com/putyourlightson/craft-generate-test-spec
Generates a test spec from PEST PHP tests.
https://github.com/putyourlightson/craft-generate-test-spec
Last synced: 3 months ago
JSON representation
Generates a test spec from PEST PHP tests.
- Host: GitHub
- URL: https://github.com/putyourlightson/craft-generate-test-spec
- Owner: putyourlightson
- License: mit
- Created: 2023-07-21T19:42:33.000Z (almost 3 years ago)
- Default Branch: v2
- Last Pushed: 2024-11-05T21:54:25.000Z (over 1 year ago)
- Last Synced: 2025-11-05T02:24:33.754Z (7 months ago)
- Language: PHP
- Size: 43.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Generate Test Spec for Craft CMS
A Craft module that generates a test specification from PEST PHP test results.

See an [example](https://github.com/putyourlightson/craft-blitz/blob/develop/tests/TESTS.md).
## Installation
Install this package via composer.
```shell
composer require putyourlightson/craft-generate-test-spec --dev
```
## Usage
This module looks for a `test-results.xml` file (JUnit XML format) in the test path and generates a test spec at `./TESTS.md`.
```shell
php craft generate-test-spec/markdown path/to/tests
```
The following command can be used to have Pest produce the `test-results.xml` file in the required JUnit XML format.
```shell
php craft pest/test --test-directory=path/to/tests --log-junit=path/to/tests/test-results.xml
```
## License
This module is licensed for free under the MIT License.
---
Created by [PutYourLightsOn](https://putyourlightson.com/).