Skip to content

Commit

Permalink
docs: add suite folded
Browse files Browse the repository at this point in the history
  • Loading branch information
Ma11hewThomas committed Oct 31, 2024
1 parent dc60150 commit 08a2abd
Showing 1 changed file with 63 additions and 1 deletion.
64 changes: 63 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ For a failed test details table, add the `failed` command to your workflow yaml:
if: always()
```

### Generating Failed Folded Test Details Table

For a failed test table with details folded, add the `failed-folded` command to your workflow yaml:

```yaml
- name: Publish CTRF Failed Test Summary Results
run: npx github-actions-ctrf failed-folded path-to-your-ctrf-report.json
if: always()
```

### Generating Failed Rate Test Details Table

To see the failed test rate over time, add the `failed-rate` command to your workflow yaml:
Expand Down Expand Up @@ -181,6 +191,8 @@ To see which tests grouped by suite with tests folkded, add the `suite-folded` c
if: always()
```

Groups by filePath by default, add argument `--useSuite` to use suite property

### Generating Previous Tests Table

To see results from previous tests, add the `historical` command to your workflow yaml:
Expand Down Expand Up @@ -442,6 +454,48 @@ Overall Fail Rate across all tests is calculated by summing the fail counts and

Overall Fail Rate (%) = (Total Fail Counts of All Tests ÷ Total Runs of All Tests) × 100

## Alternative Installation Options

### Locking to a Specific Version with `npx`

The easiest way to run `github-actions-ctrf` is by using `npx`, which doesn't require installation. By default, it runs the latest version. However, if you'd like to lock to a specific version, you can do so by specifying the version:

```bash
npx github-actions-ctrf@1.2.3 path-to-your-ctrf-report.json
```

This command will download and run the specified version of `github-actions-ctrf`.

### Local Installation in Your Node.js Project

For users who prefer installing the package locally to their project, you can install `github-actions-ctrf` as a project dependency:

```bash
npm install github-actions-ctrf
```

This will install `github-actions-ctrf` into your `node_modules` folder, and you can run it with the following command:

```bash
./node_modules/.bin/github-actions-ctrf path-to-your-ctrf-report.json
```

Alternatively, you can add a script to your `package.json` to simplify the command:

```json
{
"scripts": {
"report": "github-actions-ctrf path-to-your-ctrf-report.json"
}
}
```

Now, you can run:

```bash
npm run report
```

## Components

[Click here](https://github.com/ctrf-io/github-actions-ctrf/actions) to see the Actions of this repository for a full example
Expand All @@ -458,9 +512,13 @@ Overall Fail Rate (%) = (Total Fail Counts of All Tests ÷ Total Runs of All Tes

![Failed](images/failed.png)

### Failed Folded details

![Failed Folded](images/failed-folded.png)

### Failed rate

![Failed](images/failed-rate.png)
![Failed Rate](images/failed-rate.png)

### AI summary

Expand All @@ -474,6 +532,10 @@ Overall Fail Rate (%) = (Total Fail Counts of All Tests ÷ Total Runs of All Tes

![Flaky](images/flaky-rate.png)

### Suite folded

![Suite folded](images/suite-folded.png)

### Historical

![Historical](images/historical.png)
Expand Down

0 comments on commit 08a2abd

Please sign in to comment.