awaragi / mocha-testrail-reporter Goto Github PK
View Code? Open in Web Editor NEWCustom reporter for pushing mocha results to a testrail test run
Custom reporter for pushing mocha results to a testrail test run
I've been struggling to get this working with our on-premise TestRail environment.
I've managed to track it down to the version of HTTPS we're using (It's quite old!)
I could ask the server admins to upgrade it but that's going to take a while.
Can we add an option to configure the unirest security protocol?
I'm trying to integrate cypress and testrail using cypress-testrail-reporter, but when I run
npx cypress run --spec "cypress/integration/1_General/01_Change_Language.js"
This error occured :
suryambp:cypress suryawiguna$ npx cypress run --spec "cypress/integration/1_General/01_Change_Language.js"
Could not load reporter by name: cypress-testrail-reporter
We searched for the reporter in these paths:
- /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/cypress-testrail-reporter
- /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/cypress-testrail-reporter
The error we received was:
Error: Could not locate the bindings file. Tried:
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/build/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/build/Debug/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/build/Release/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/out/Debug/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/Debug/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/out/Release/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/Release/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/build/default/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/compiled/14.15.1/darwin/x64/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/addon-build/release/install-root/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/addon-build/debug/install-root/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/addon-build/default/install-root/deasync.node
→ /Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/lib/binding/node-v87-darwin-x64/deasync.node
at bindings (/Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/bindings/bindings.js:126:9)
at Object.<anonymous> (/Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/deasync/index.js:30:31)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
at Module._load (internal/modules/cjs/loader.js:776:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12789)
at Function.Module._load (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/override_require.js:15:27)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/cypress-testrail-reporter/dist/testrail.js:52:15)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
at Module._load (internal/modules/cjs/loader.js:776:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12789)
at Function.Module._load (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/override_require.js:15:27)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/cypress-testrail-reporter/dist/cypress-testrail-reporter.js:21:18)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
at Module._load (internal/modules/cjs/loader.js:776:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12789)
at Function.Module._load (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/override_require.js:15:27)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/suryawiguna/Documents/works/igloocompany/iglooworks/cypress/node_modules/cypress-testrail-reporter/index.js:1:18)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
at Module._load (internal/modules/cjs/loader.js:776:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12789)
at Function.Module._load (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/override_require.js:15:27)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Function.loadReporter (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/reporter.js:524:14)
at ProjectE2E.watchSettingsAndStartWebsockets (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/project-base.js:270:36)
at /Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/project-base.js:142:49
at tryCatcher (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/suryawiguna/Library/Caches/Cypress/7.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:461:21)
Learn more at https://on.cypress.io/reporters
Did I miss something here? I found same issue that posted on stackoverflow but no one answer it yet https://stackoverflow.com/questions/67420594/could-not-load-reporter-by-name-cypress-testrail-reporter
{
...
"reporter": "cypress-testrail-reporter",
"reporterOptions": {
"host": "hostname.testrail.io",
"username": "email",
"password": "password",
"projectId": 2,
"suiteId": 9
},
...
}
{
...
"devDependencies": {
"cypress": "^7.3.0",
"cypress-file-upload": "^4.1.1",
"cypress-multi-reporters": "^1.4.0",
"cypress-testrail-reporter": "^1.2.8",
"mocha": "^8.2.1",
"mochawesome": "^6.2.1",
"mochawesome-merge": "^4.2.0",
"mochawesome-report-generator": "^5.1.0"
},
...
}
...
it('C2504 Change Language to Chinese', () => {
cy.get('#languageZhDesktop').click()
cy.wait(3000);
cy.get('.mainTitleLogin').should('have.text', '控制面板')
})
...
Sometimes a test run is already created and there is no need to automatically create a new one. Would be great to have an optional parameter for runId and do not create a new run if the option is provided during the test automation run.
I am trying to extend this project a bit and add slack integration .. but when I build the master on this code, I get following error
src/lib/mocha-testrail-reporter.ts:17:30 - error TS2304: Cannot find name 'TestRailOptions'.
17 let reporterOptions: TestRailOptions = <TestRailOptions>options.reporterOptions;
~~~~~~~~~~~~~~~
src/lib/mocha-testrail-reporter.ts:17:49 - error TS2304: Cannot find name 'TestRailOptions'.
17 let reporterOptions: TestRailOptions = <TestRailOptions>options.reporterOptions;
I havent worked a lot on typescript but I can learn, if anything strikes please let me know
Receive: Publishing 2 test result(s) to 'mytestrail.net'
Log into testrail and no results have been logged
I am using a user and apikey
I suspect that there is an issue with the post request you guys are submitting as I have used dummy url and bad username and no errors are logged to the console.
Does this reporter support using specify:
specify('C1234 ...
rather than it?
it('C1234 ...
After updating npm version, Mocha dependency cannot be resolved.
I'm using [email protected] and [email protected]. Version 2.0.5 references [email protected].
Error:
Note: This issue does not happen in npm version 8.1.0 but it does in latest version (8.18.0).
I am getting TypeError: Cannot read property 'testRailsOptions' of undefined error while running the test. Can you please suggest? I am using the exact same configuration mentioned on the https://www.npmjs.com/package/wdio-testrail-reporter
All code was deleted from master in 8a12765 but the commit message doesn't align with the change.
Does this imply the project is no longer being maintained?
@PieceMaker @awaragi we have been using https://www.npmjs.com/package/cypress-testrail-accumulative-reporter instead of https://www.npmjs.com/package/cypress-testrail-reporter because it aggregates the test results from different suites in a single cypress run into a single test run within TestRail. That as opposed to the results for each suite being reported as a different test run within TestRail.
Take for example these 2 suites:
With the accumulator reporter the results of each of these suites would be posted to the same test run in TestRail. With the other package they would go to TestRail as 2 separate test runs.
We would like to move away from the accumulator since doesn't seem to be maintained (and there are some security issues with some of the dependency versions). Is there an option to do what we are looking for with the new package (https://github.com/Vivify-Ideas/cypress-testrail-reporter)?
Hi @awaragi
After my test run, when the results are about to publish I'm receiving the following error. Can you please assist.
Error: undefined
D:\node_modules\mocha\lib\runner.js:910
throw err;
^
Error: Error: got 404 response
at \node_modules\mocha-testrail-reporter\dist\lib\testrail.js:28:27
at Request.handleRequestResponse [as _callback] (D:\node_modules\unirest\index.js:463:26)
at Request.self.callback (D:\node_modules\unirest\node_modules\request\request.js:187:22)
at Request.emit (events.js:315:20)
at Request.<anonymous> (D:\node_modules\unirest\node_modules\request\request.js:1044:10)
at Request.emit (events.js:315:20)
at IncomingMessage.<anonymous> (D:\node_modules\unirest\node_modules\request\request.js:965:12)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1221:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
As of right now, when I execute the tests and have the createRun boolean set to true
, the Test Run that is generated in TestRail has all of my Suite's Test Cases in it. Since not all of my tests are automatable, this messes up with the overall pass
, fail
, and untested
metrics I would like to see at a glance.
Is this something that could be added to this package?
does mocha-testrail-reporter
able to customize what testcase to be added in the testrun and also can get testcases from different test suite inside the project?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.