Closed xgp closed 2 years ago
Did some logging in CypressEndToEndTests
to determine it never runs the tests (or the container hangs on returning test results).
try (CypressContainer container = new CypressContainer().withLocalServerPort(port)) {
container.start();
//gets here
CypressTestResults testResults = container.getTestResults();
//never gets here
return convertToJUnitDynamicTests(testResults); // (2)
}
Did you wait long enough? The container.getTestResults()
call hangs until all tests have run.
Yes. I let it run for a long time. And I only had a single no-op test that returns immediately. spec.cy.js
:
describe('My First Test', () => {
it('Does not do much!', () => {
expect(true).to.equal(true)
})
})
And is your test running from cypress itself? Go to src/test/e2e
directory and run npx cypress open
to check.
my mistake. It was an incorrect specPattern
in the cypress.config.js
file. It assumes by default your tests will be in cypress/e2e/**/*.cy.{js,jsx,ts,tsx}
, but the project structure had them in cypress/**/*.cy.{js,jsx,ts,tsx}
Hi! I think this is a great idea, but I'm having trouble getting an example working. I'm trying to run your example JUnit 5 DynamicTests.
Here's how I've built the layout, following the README:
In the
build
portion of mypom.xml
I have:However, the test phase starts and just hangs here:
Any ideas what I'm missing? Thank you!