Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/catchpoint/foresight-test-kit-action
Action for optimizing your tests by listing test runs and with history
https://github.com/catchpoint/foresight-test-kit-action
ci coverage github-actions test testing
Last synced: about 1 month ago
JSON representation
Action for optimizing your tests by listing test runs and with history
- Host: GitHub
- URL: https://github.com/catchpoint/foresight-test-kit-action
- Owner: catchpoint
- License: mit
- Created: 2022-06-10T12:29:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T14:34:50.000Z (almost 2 years ago)
- Last Synced: 2024-11-04T15:02:52.213Z (about 2 months ago)
- Topics: ci, coverage, github-actions, test, testing
- Language: TypeScript
- Homepage:
- Size: 1.38 MB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Foresight Test Kit Action
A GitHub Action to analyze test and/or coverage results. Foresight’s Test Kit action integrates with your Github Actions pipelines.
- It makes simple to see failed tests, visualize performance of your tests and see their logs. It is the fastest way to access a failed test results in your workflow runs.
- It correlates the changes to the codebase with the test coverage reports to determine how much of the changes are covered by the tests.You need to integrate Test Kit action to your CI pipeline in order to use [Test Monitoring](https://foresight.docs.thundra.io/features/test-runs) and
[Change Impact Analysis](https://foresight.docs.thundra.io/features/analyze-code-change-impact) features.> **_NOTE:_** ⚠️ You'll need to have a reasonably modern version of `node`. This won't work with versions older than 9, for instance.
## Prerequisites
Foresight analyzes your test and coverage report artifacts.### Available test framework and report pairs:
| Test framework | Report format |
|----------------|----------------|
|TESTNG|n/a*|
|JUNIT|n/a*|
|JEST|JUNIT|
|PYTEST|JUNIT|
|CYPRESS|JUNIT|
|XUNIT2|n/a*|
|XUNIT2|TRX|
|GOLANG|JSON|
|GOLANG|TEXT|> **_NOTE:_** ⚠️ You don't need to fill report format fields marked as **n/a**.
### Available coverage formats:
| Coverage formats |
|----------------|
|JACOCO/XML|
|COBERTURA/XML|
|GOLANG|
|LCOV/TXT|## Usage
To use the action, add the following step after your test execution step. Please fill the `test_format`, `test_framework` and `coverage_format` fields by checking the supported options above.
You can get your `api_key` after sign up to Foresight.
```yaml
- name: Analyze Test and/or Coverage Results
uses: runforesight/foresight-test-kit-action@v1
if: success() || failure()
with:
api_key:
test_format:
test_framework:
test_path:
coverage_format:
coverage_path:
```## Configuration
| Option | Requirement | Description
| --- | --- | ---
| `api_key` | Optional | Foresight API Key. Foresight API key is **required** for private repositories but **optional** for public open-source repositories.
| `github_token` | Optional | An alternative GitHub token, other than the default provided by GitHub Actions runner.
| `test_framework` | Optional | Runtime test framework name(jest, pytest, junit, cypress etc.)
| `test_format` | Optional | Runtime test format name(trx, junit etc.)
| `test_path` | Optional | Test results directory/file path.
| `coverage_format` | Optional | Runtime coverage format name(jacoco/xml, cobertura/xml, golang etc.)
| `coverage_path` | Optional | Coverage results directory/file path.
| `cli_version` | Optional | Installed Foresight cli version. Default is latest.
| `working_directory` | Optional | Specify it if you change default working directory for run.
| `disable_action` | Optional | Disable Foresight test kit action without removing from yml.