Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the singleRun parameter to group all results into a single testrail run #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
charset = utf-8

[{deps,tools,build}/**]
indent_style = ignore
indent_size = ignore
end_of_line = ignore
trim_trailing_whitespace = ignore
charset = ignore

[{test/fixtures,deps,build,tools/eslint,tools/gyp,tools/icu,tools/msvs}/**]
insert_final_newline = false
43 changes: 43 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
odule.exports = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the m here?

// line length
printWidth: 100,

// indentation type
useTabs: false,

// whether to prefer ' over "
singleQuote: false,

// whether we want to quote props (only-if-they-have-a-dash)
quoteProps: "as-needed",

// add trailing comma's everwhere as long as it's supported by es5
trailingComma: "es5",

// space brackets method ( param1, param2 ) { }
bracketSpacing: true,

// places the > sign on a newline when closing a long html tag
jsxBracketSameLine: false,

// always add parentheses on arrow functions (x) => { }
arrowParens: "always",

// ignore pragma, run prettier on all files
requirePragma: false,

// preserve markdown text as-is
proseWrap: "preserve",

// make css leading in whitespace sensitivity
htmlWhitespaceSensitivity: "css",

// always end lines with lf
endOfLine: "lf",

// tabs are 2 spaces.
tabWidth: 2,

// always end statements with a semicolon
semi: true,
};
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.4.0] (2022-08-03)

- Added the `singleRun` reporter option so that testrail results aren't split on spec files
- Added [editorconfig](https://editorconfig.org/) and [Prettier](https://prettier.io/)
- cleaned up some code
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![downloads](https://img.shields.io/npm/dt/cypress-testrail-reporter.svg)](https://www.npmjs.com/package/cypress-testrail-reporter)
[![MIT License](https://img.shields.io/github/license/Vivify-Ideas/cypress-testrail-reporter.svg)](https://github.com/Vivify-Ideas/cypress-testrail-reporter/blob/master/LICENSE.md)

Publishes [Cypress](https://www.cypress.io/) runs on TestRail.
Publishes [Cypress](https://www.cypress.io/) runs on TestRail.

Core features:

Expand All @@ -13,7 +13,7 @@ Core features:
* Test run would be closed after last spec(test) file has been finished
* Possibility to upload screenshots for failed and retried test cases - optional (**allowFailedScreenshotUpload: true**)
* Multi suite project support (set **suiteId=1** in **cypress.json** or set it as a part of runtime environment variables as **testRailSuiteId=1**)
* Reporting retest status of a test cases - handy in terms of marking tests as flaky (test is reported with retest status for the first try and after second try it passes) Note: cypress retry logic must be enabled for this feature.
* Reporting retest status of a test cases - handy in terms of marking tests as flaky (test is reported with retest status for the first try and after second try it passes) Note: cypress retry logic must be enabled for this feature.

**Important note:** Keep your tests under the one of the following folder structure:

Expand Down Expand Up @@ -70,6 +70,8 @@ environment variables, this option would be overwritten with it.

**runName**: _string_ (optional) name of the Testrail run. When you set `CYPRESS_TESTRAIL_REPORTER_RUNNAME` in runtime environment variables, this option would be overwritten with it.

**singleRun**: _string_ (optional) Causes the reporter to add all results into a single test run in Testrail

**disableDescription**: _bool_ (optional: default is false) possibility to disable description for test run in case that someone don’t have cypress dashboard feature (_disableDescription: true_)

**allowFailedScreenshotUpload**: _bool_ (optional: default is false) will upload failed screenshot to corresponding test result comment for easier debugging of failure.
Expand All @@ -89,14 +91,14 @@ This reporter can handle multiple suite project in TestRail. In order to use it,
```Javascript

e2e_test1:
script:
script:
- e2e-setup.sh
variables:
CYPRESS_SPEC: "cypress/integration/dashboard/*"
TESTRAIL_SUITEID: 1

e2e_test2:
script:
script:
- e2e-setup.sh
variables:
CYPRESS_SPEC: "cypress/integration/login/*"
Expand Down
110 changes: 66 additions & 44 deletions dist/cypress-testrail-reporter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading