testrail-integration package and preprocessor
See original GitHub issueI’m trying to determine if there is a way to use the testrail-integration package along with cypress-cucumber-preprocessor.
Test code to reproduce
const runid = 1;
const version = 'Build 1.3.4';
const options = {
username: 'username@org.com',
password: 'pwd',
url: 'https://blahblah.testrail.io/'
};
const testrail = new CucumberRailClient(options);
After(async () => {
const scenario = cy.state('ctx').currentTest;
try {
await testrail.updateTestRailResults(scenario, runid, version);
} catch (err) {
cy.log(`Error ${err}`);
}
});
As far as I can tell, the currentTest object contains just the title and nothing else, whereas the updateTestRailResults method would need a Scenario object also containing tags etc. Is there a way to obtain this inside the steps?
Thanks a lot.
Versions
- Cypress version: 8.7.0
- Preprocessor version: 4.0.1
- Node version: 16.13.0
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
cypress-testrail-reporter - npm package - Snyk
A Testrail reporter for cypress including TestRail API basic library For more information about how to use this package see README.
Read more >testrail-integration - npm
Start using testrail-integration in your project by running `npm i ... TypeScript icon, indicating that this package has built-in type ...
Read more >TestRail - Quick Guide - Tutorialspoint
TestRail tool create, centralize, organize and manage test cases very effectively and efficiently. Easily import test cases from excel and other management tool ......
Read more >Visual Studio Online Test Management with TestRail
Integrate our test case management solution TestRail with VSO · Manage test cases, plans, and runs · Start test runs and capture test...
Read more >Plugins - Cypress Documentation
Cypress preprocessor for extracting tests from Markdown files ... Uses evanw/esbuild to bundle your specs. ... #mock#recording#http#integration test ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Right, I would solve this by post-processing the JSON output in a script ran after Cypress.
That is a good shout and certainly cleaner code, but how would I get the tag of each scenario in an
after:spec
plugin, so I can associate each test with its result?Right now I’m using
window.testState.pickle
because I’m inside that test.