Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# CTRF CLI

Various CTRF utilities available by command line
Various CTRF utilities available programatically and by command line

## Help us grow CTRF

⭐ **If you find this project useful, please consider following the [CTRF organisation](https://github.com/ctrf-io) and giving this repository a star** ⭐

**It means a lot to us and helps us grow this open source library.**

## Utilities
## Command Line Utilities

| Name |Details |
| ------------ | ----------------------------------------------------------------------------------- |
| `merge` | Merge multiple CTRF reports into a single report. |
| `flaky` | Output flaky test name and retries. |


## Merge

This might be useful if you need a single report, but your chosen reporter generates multiple reports through design, parallelisation or otherwise.
Expand Down Expand Up @@ -71,6 +70,22 @@ Found 1 flaky test(s) in reports/sample-report.json:
- Test Name: Test 1, Retries: 2
```

## Programmatic Methods

```sh
npm install ctrf
```

The following programmatic methods are available:

`mergeReports` - This method merges multiple CTRF reports into a single report.

`readSingleReport` - Reads and parses a single CTRF report file from a specified file path.

`readReportsFromDirectory` - Reads all CTRF report files from a given directory.

`readReportsFromGlobPattern` - Reads all CTRF report files from a given glob pattern.

## What is CTRF?

CTRF is a universal JSON test report schema that addresses the lack of a standardized format for JSON test reports.
Expand Down
Loading
Loading