/
How to push results from a GitHub action
How to push results from a GitHub action
To setup pushing your results using GitHub actions, you first need to get your CI token on Cucumber for Jira:
Ci configuration
Then you will have to set it as repository secret on your GitHub project. You can call it C4J_TOKEN for example.
When that secret is setup you can start writing your GitHub action.
Here is an example of a GitHub action that generates Cucumber results and sends them to Cucumber for Jira:
name: CI
on:
push:
branches:
- main
jobs:
cucumber:
name: Cucumber test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Run Cucumber tests and generate results
run: |
bundle exec cucumber \
--format json \
--out cucumber-results.json
- name: Send results to Cucumber for Jira
if: always()
run: |
curl -X POST https://c4j.bdd.smartbear.com/ci/rest/api/results \
-H "authorization: Bearer ${{ secrets.C4J_TOKEN }}" \
-H 'content-type: multipart/form-data' \
-F results_file=@cucumber-results.json \
-F language=ruby
Related content
Automate test results push
Automate test results push
More like this
Create a living documentation
Create a living documentation
More like this
Activate
Activate
More like this
Quick Start
Quick Start
More like this
BDD with Cucumber and Cucumber for Jira
BDD with Cucumber and Cucumber for Jira
Read with this
How to push Cypress results
How to push Cypress results
More like this