Coder Social home page Coder Social logo

mocha-testrail-reporter's People

Contributors

awaragi avatar piecemaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mocha-testrail-reporter's Issues

Option to configure HTTPS protocol

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?

Could not load reporter by name: cypress-testrail-reporter

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

cypress.json

{
    ...
    "reporter": "cypress-testrail-reporter",
    "reporterOptions": {
        "host": "hostname.testrail.io",
        "username": "email",
        "password": "password",
        "projectId": 2,
        "suiteId": 9
    },
    ...
}

package.json

{
    ...
    "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"
      },
     ...
}

01_Change_Language.js

...
it('C2504 Change Language to Chinese', () => {
      cy.get('#languageZhDesktop').click()
      cy.wait(3000);
      cy.get('.mainTitleLogin').should('have.text', '控制面板')
})
...

Build error on compiling.

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

Given a success message that results pass but nothing is posted

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.

Is this package alive?

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?

Test Results Accumulator Functionality?

@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:
image

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)?

Question Regarding a test run

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)

Question about mocha-testrail-reporter

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.