We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I am trying to run the cypress from C# using the node package "Jering.Javascript.NodeJS"
When I run the cypress from cmd directly, it is running fine and giving results.
but when I run from c#, I am getting the below error. {"status":"failed","failures":1,"message":"Could not find Cypress test run results"}
C# code: using Jering.Javascript.NodeJS;
string result = await StaticNodeJSService.InvokeFromFileAsync(@"E:\Samples\Cypress\E2E\e2e-run-tests.js");
JS code: E:\Samples\Cypress\E2E\e2e-run-tests.js file code:
const cypress = require('cypress') module.exports = async function(callback){ let result = "";
await cypress .run({ spec: 'Test1.cy.js', }) .then(testResults => { result = testResults; }) .catch((err) => { callback(err); }) return result; }
Test1.cy.js file code: describe('empty spec', () => { it('passes', () => { cy.visit('https://example.cypress.io/') cy.contains('type').click() }) })
Please suggest the possible solution
The text was updated successfully, but these errors were encountered:
{"status":"failed","failures":1,"message":"Could not find Cypress test run results"}
This means this library is working, you'll need to look into your Cypress setup.
Sorry, something went wrong.
No branches or pull requests
Hi,
I am trying to run the cypress from C# using the node package "Jering.Javascript.NodeJS"
When I run the cypress from cmd directly, it is running fine and giving results.
but when I run from c#, I am getting the below error.
{"status":"failed","failures":1,"message":"Could not find Cypress test run results"}
C# code:
using Jering.Javascript.NodeJS;
string result = await StaticNodeJSService.InvokeFromFileAsync(@"E:\Samples\Cypress\E2E\e2e-run-tests.js");
JS code:
E:\Samples\Cypress\E2E\e2e-run-tests.js file code:
const cypress = require('cypress')
module.exports = async function(callback){
let result = "";
await cypress
.run({
spec: 'Test1.cy.js',
})
.then(testResults => {
result = testResults;
})
.catch((err) => {
callback(err);
})
return result;
}
Test1.cy.js file code:
describe('empty spec', () => {
it('passes', () => {
cy.visit('https://example.cypress.io/')
cy.contains('type').click()
})
})
Please suggest the possible solution
The text was updated successfully, but these errors were encountered: