-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c67669e
Showing
14 changed files
with
994 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
testing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build | ||
run: npx tsc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist | ||
node_modules | ||
ctrf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Contributing | ||
|
||
First off, thank you for considering contributing to this project. | ||
|
||
## Reporting Issues | ||
|
||
Before submitting an issue, please check the issue tracker to ensure that the issue hasn't already been reported. If you find your issue already reported, you can subscribe to that issue to receive updates. If you have any additional information to add, please comment on the issue. If the issue is unnasigned and you'd like to contribute, assign the issue to yourself. | ||
|
||
## How to Contribute | ||
|
||
If you'd like to contribute, start by searching through the issues and pull requests to see whether someone else has raised a similar idea or question. | ||
|
||
If you don't see your idea listed, and you think it fits into the goals of this project, do one of the following: | ||
|
||
- If your contribution is minor, such as a typo fix, open a pull request. | ||
- If your contribution is major, or you have not yet decided how to implement your idea, open an issue to discuss it. This allows other contributors to point out any potential flaws or to help you flesh out your idea. | ||
|
||
### Pull Requests | ||
|
||
1. Fork the repository and create your branch from `main`. | ||
2. Write some code | ||
3. Make sure your code lints. | ||
4. Issue that pull request! | ||
|
||
### Commit Messages | ||
|
||
Write meaningful commit messages that provide insight into the changes made. | ||
|
||
## Finding Bugs | ||
|
||
If you find a bug, please report it in the issue tracker with a detailed description. | ||
|
||
## Feature Requests | ||
|
||
Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. Please provide as much detail and context as possible. | ||
|
||
## License | ||
|
||
By contributing to this project, you agree that your contributions will be licensed under MIT. | ||
|
||
## Acknowledgments | ||
|
||
Your contributions are sincerely appreciated. We want to make contributing to this project as easy and transparent as possible, whether it's: | ||
|
||
- Reporting a bug | ||
- Discussing the current state of the code | ||
- Submitting a fix | ||
- Proposing new features | ||
|
||
Thank you for your interest in contributing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Matthew Thomas | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Teams Test Results Notification | ||
|
||
> Send Microsoft Teams message with test result from popular testing frameworks | ||
⭐ **If you find this project useful, consider giving it a GitHub star** ⭐ | ||
|
||
It means a lot to us and helps us grow this open source library. | ||
|
||
## We need your help | ||
|
||
We believe CTRF can save **a lot** of time for engineers, a single data serialisation report, well structured, community driven and works with any framework. For over 30 years software engineers have used a de facto data serialisation report, you know the one! But we feel it’s time to modernise. | ||
|
||
The only way we can grow CTRF is with your help and the support of the software engineering community. | ||
|
||
## How can you help? | ||
|
||
- Join and build with us! We are looking for [contributors](https://github.com/ctrf-io), get involved in this early stage project. All contributions are welcome. | ||
- Give this repository a star ⭐⭐⭐⭐⭐⭐ | ||
- Follow the CTRF [GitHub organisation](https://github.com/ctrf-io) | ||
- Clap for our [Medium articles](https://medium.com/@ma11hewthomas) (30 times each) 👏 | ||
- Share, share share! Discord, Reddit, Twitter, LinkedIn, Slack, Teams, whereever! - please share our [libraries](https://github.com/orgs/ctrf-io/repositories), our [homepage](https://www.ctrf.io/), our [Medium articles](https://medium.com/@ma11hewthomas) | ||
- Maybe even write a blog about us! | ||
- Try our [tools](https://github.com/orgs/ctrf-io/repositories) | ||
|
||
**Thank you so much!!** | ||
|
||
## Features | ||
|
||
- **Send Test Results to Teams**: Automatically send test results to a Teams channel. | ||
- **Send Flaky Test Details to Teams**: Automatically send flaky test details to a Teams channel. | ||
- **Conditional Notifications**: Use the `--onFailOnly` option to send notifications only if tests fail. | ||
|
||
## Setup | ||
|
||
You'll need a CTRF report generated by your testing framework. [CTRF reporters](https://www.ctrf.io/docs/category/reporters) are available for most testing frameworks and easy to install. | ||
|
||
### Create a Teams Incoming Webhook | ||
|
||
Setup an incoming webhook by following instructions on [Teams documentation](https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=newteams%2Cdotnet) | ||
|
||
### Set the Environment Variable | ||
|
||
Set the webhook URL as an environment variable in your shell or CI environment: | ||
|
||
```sh | ||
export TEAMS_WEBHOOK_URL='https://hooks.teams.com/services/your/webhook/url' | ||
``` | ||
|
||
Make sure to replace `'https://hooks.teams.com/services/your/webhook/url'` with your actual webhook URL. | ||
|
||
You might want to store the webhook URL as a secret. | ||
|
||
## Usage | ||
|
||
To send the test results summary to Teams: | ||
|
||
```sh | ||
npx teams-ctrf results /path/to/ctrf-report.json | ||
``` | ||
|
||
To send flaky test report to Teams: | ||
|
||
```sh | ||
npx teams-ctrf flaky /path/to/ctrf-report.json | ||
``` | ||
|
||
### Send Only on Failures | ||
|
||
To send the test results summary to Teams only if there are failed tests, use the `--onFailOnly` option: | ||
|
||
```sh | ||
npx teams-ctrf results /path/to/ctrf-file.json --onFailOnly | ||
``` | ||
|
||
or using the alias: | ||
|
||
```sh | ||
npx teams-ctrf results /path/to/ctrf-file.json -f | ||
``` | ||
|
||
## Options | ||
|
||
- `--onFailOnly, -f`: Send notification only if there are failed tests. | ||
|
||
## What is CTRF? | ||
|
||
CTRF is a universal JSON test report schema that addresses the lack of a standardized format for JSON test reports. | ||
|
||
**Consistency Across Tools:** Different testing tools and frameworks often produce reports in varied formats. CTRF ensures a uniform structure, making it easier to understand and compare reports, regardless of the testing tool used. | ||
|
||
**Language and Framework Agnostic:** It provides a universal reporting schema that works seamlessly with any programming language and testing framework. | ||
|
||
**Facilitates Better Analysis:** With a standardized format, programatically analyzing test outcomes across multiple platforms becomes more straightforward. | ||
|
||
## Support Us | ||
|
||
If you find this project useful, consider giving it a GitHub star ⭐ It means a lot to us. |
Oops, something went wrong.