All Projects → mikepenz → xray-action

mikepenz / xray-action

Licence: Apache-2.0 license
... a GitHub action to import test results into "Xray" - A complete Test Management tool for Jira.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to xray-action

action-junit-report
Reports junit test results as GitHub Pull Request Check
Stars: ✭ 103 (+543.75%)
Mutual labels:  ci, cd, test, actions, github-actions
github-act-runner
act as self-hosted runner
Stars: ✭ 68 (+325%)
Mutual labels:  continuous-integration, ci, actions, github-actions
setup-scheme
Github Actions CI / CD setup for Scheme
Stars: ✭ 13 (-18.75%)
Mutual labels:  continuous-integration, ci, cd, github-actions
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+4481.25%)
Mutual labels:  continuous-integration, ci, actions, github-actions
overview
Automate your workflows with GitHub actions for MATLAB.
Stars: ✭ 40 (+150%)
Mutual labels:  continuous-integration, ci, actions, github-actions
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+600%)
Mutual labels:  continuous-integration, ci, actions, github-actions
Android-CICD
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉
Stars: ✭ 37 (+131.25%)
Mutual labels:  continuous-integration, ci, actions, github-actions
Webhookd
A very simple webhook server launching shell scripts.
Stars: ✭ 250 (+1462.5%)
Mutual labels:  continuous-integration, ci, cd
generate-changelog
generates changelog from git based on jira tickets
Stars: ✭ 18 (+12.5%)
Mutual labels:  jira, continuous-integration, ci
CI-Report-Converter
The tool converts different error reporting standards for deep compatibility with popular CI systems (TeamCity, IntelliJ IDEA, GitHub Actions, etc).
Stars: ✭ 17 (+6.25%)
Mutual labels:  ci, test, actions
symfony-lts-docker-starter
🐳 Dockerized your Symfony project using a complete stack (Makefile, Docker-Compose, CI, bunch of quality insurance tools, tests ...) with a base according to up-to-date components and best practices.
Stars: ✭ 39 (+143.75%)
Mutual labels:  ci, cd, testing-tools
Rok8s Scripts
Opinionated scripts for managing application deployment lifecycle in Kubernetes
Stars: ✭ 248 (+1450%)
Mutual labels:  continuous-integration, ci, cd
Flagsmith Api
Feature flagging and remote config service. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 223 (+1293.75%)
Mutual labels:  continuous-integration, ci, cd
wordpress-skeleton
A base repository structure for rtCamp's WordPress sites, pre-configured to use Github Actions
Stars: ✭ 32 (+100%)
Mutual labels:  ci, cd, github-actions
Rocket
Automated software delivery as fast and easy as possible 🚀
Stars: ✭ 217 (+1256.25%)
Mutual labels:  continuous-integration, ci, cd
Jenkins Rest
Java client, built on top of jclouds, for working with Jenkins REST API
Stars: ✭ 201 (+1156.25%)
Mutual labels:  continuous-integration, ci, cd
actions
Set of actions for implementing CI/CD with werf and GitHub Actions
Stars: ✭ 67 (+318.75%)
Mutual labels:  continuous-integration, actions, github-actions
unity-test-runner
Run tests for any Unity project
Stars: ✭ 134 (+737.5%)
Mutual labels:  ci, test, actions
www.go.cd
Github pages repo
Stars: ✭ 39 (+143.75%)
Mutual labels:  continuous-integration, ci, cd
flagsmith-java-client
Java Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 16 (+0%)
Mutual labels:  continuous-integration, ci, cd
:octocat:

xray-action

... a GitHub action to import test results into "Xray" - A complete Test Management tool for Jira.



Setup 🛠️Contribute 🧬License 📓


Setup

Configure the workflow

Specify the action as part of your GitHub actions workflow, using a Xray API key (i.e. a pair of client id and client secret):

Xray Cloud

- name: "Import results to Xray"
  uses: mikepenz/xray-action@{latest-release}
  with:
    username: ${{ secrets.XRAY_CLIENT_ID }}
    password: ${{ secrets.XRAY_CLIENT_SECRET }}
    testFormat: "junit"
    testPaths: "**/test/*.xml"
    testExecKey: "TEST-1"
    projectKey: "TEST"

Xray Server/DC

If you're using Xray Server/DC, you'll need to set xrayCloud as "false", use Jira credentials for authentication, and specify additional parameters.

- name: "Import results to Xray"
 uses: mikepenz/xray-action@{latest-release}
 with:
   username: ${{ secrets.JIRA_USERNAME }}
   password: ${{ secrets.JIRA_PASSWORD }}
   xrayCloud: "false"
   xrayBaseUrl: "https://myjiraserver.example.com"
   testFormat: "junit"
   testPaths: "**/test/*.xml"
   testExecKey: "TEST-1"
   projectKey: "TEST"

⚠️ Xray Server/DC requires test plan, test env, revision to be defined via their custom field. See additional details on passing a custom test execution json.

💡 Do not specify username and password in cleartext, instead prefer to read them from GitHub action secrets.

Input Description Required
xrayCloud Defines which variant of Xray to target [cloud vs Server/DC] (default="true")
xrayBaseUrl Defines the base URL if Xray Server/DC is chosen (only required if xrayCloud="false") x*
username Xray API client id (cloud) or Jira username (Server/DC). (Required for xrayCloud) x*
password Xray API client secret (cloud) or Jira password (Server/DC). (Required for xrayCloud) x*
xrayToken Xray Personal Access Token. If provided username/password are ignored. (Xray Server/DC only)
testFormat Describes the import formats ["xray", "cucumber", "behave", "junit", "testng", "nunit", "xunit", "robot", "bundle"] x
testPaths Glob expression to report paths. The default is **/junit-reports/TEST-*.xml. x
testMerge Merges together multiple test report files into a single report. Supported for: ["junit", "cucumber"]. (Default: true)
testExecKey Key of the Test Execution x
projectKey Key of the project where the Test Execution (if the testExecKey parameter wasn't provided) and the tests (if they aren't created yet) are going to be created. x
testPlanKey Key of the Test Plan; if you specify the Test Plan, the Tests will be added automatically to the Test Plan if they're not part of it.
testEnvironments A string containing a list of test environments separated by ";"
revision Source code and documentation version used in the test execution.
fixVersion The Fix Version associated with the test execution (it supports only one value).
combineInSingleTestExec If no testExecKey is provided, it will generate a testExec with the first import, and reuse the same for all other imports. (Default: false)
failOnImportError Defines if the action should fail if an import error occurred. (Default: false)
continueOnImportError Defines if the action should continue after a single import error occurred. (Default: true)
importParallelism Specifies the level of parallelism to import to Xray. (Default: 2)
testExecutionJson File path to a json file, containing the meta information to create the xray test execution ticket.
testJson File path to a json file, containing the meta information to create the xray test ticket.

Test execution json

The test execution json should the meta information in the following format:

Xray Cloud

{
    "fields": {
        "summary": "Brand new Test execution",
        "issuetype": { "id": "10007" },
        "components": [
            { "name": "Interface" },
            { "name": "Core" }
        ]
    }
}

Xray Server/DC

⚠️ For Xray Server/DC environments test plan, test env, revision fields are required to be provided via their custom field. See the official API documentation for more details.

{
    "fields": {
        "summary": "Brand new Test execution",
        "issuetype": { "id": "10007" },
        "components" : [
            { "name":"Interface" },
            { "name":"Core" }
        ],
        "customfield_10032" : [
            "TES-38"
        ]
    }
}

💡 The import will fail if the provided issueType for example does not exist. Please ensure correct information is provided.

Action outputs

After action execution it will return helpful information.

# ${{steps.{XRAY_STEP_ID}.outputs.count}}
${{steps.xray.outputs.count}}

A full set list of possible output values for this action.

Output Description
count The count of imported files.
completed The count of completed imports.
failed The count of failed imports.
testExecKey The key of the created test execution.

Contribute 🧬

# Install the dependencies  
$ npm install

# Build the typescript and package it for distribution
$ npm run build && npm run package

# Run the tests, use to debug, and test it out
# Please note you have to uncomment the test
# Provide your xray instance username and password
# And then execute the test:
$ npm test

# Verify lint is happy
$ npm run lint -- --fix

Xray

Developed By

Other actions

License

Copyright 2021 Mike Penz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].