You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @annaet we are trying to run test cases via cli with tags, but somehow all specs are ran even when does not have tagged tests.
e.g.: cypress run --browser chrome --env CYPRESS_INCLUDE_TAGS=smoke CYPRESS_EXCLUDE_TAGS=wip
test1.spec.js
describe(['wip', 'regression'], 'Test A', () => {
it('should run test A successfully', () => {
expect(1 + 1).to.be.equal(2);
});
});
test2.spec.js
describe(['regression'], 'Test A', () => {
it('should run test B successfully', () => {
expect(1 + 1).to.be.equal(2);
});
it('should run test C successfully', () => {
expect(1 + 1).to.be.equal(2);
});
it('should run test D successfully', () => {
expect(1 + 1).to.be.equal(2);
});
});
As you can see all specs should be skipped, but both of them where ran and empty result shown.
Is the any solution?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hello @annaet,
I don't think that the issue referenced in the original post was linked to the use of the --env argument.
I seem to face the same issue no matter how I set the variable.
The issue is not that cypress-tags is not working, it is how it works. I have a project with 20 spec files; when I launch a cypress execution with a tag that targets only one test in one spec file, indeed only this test will actually run, however all 20 specs will generate a report (with 0 test in it), and, if video is enabled, a 1-second video just displaying a white screen.
This behaviour, though legitimate, is time- and resource-consuming. I am using a tool that runs tests individually using tags, but has no knowledge of the spec structure, so the ideal behaviour for me would be that specs that contain no test with the included tags be entirely skipped, instead of just the tests it contains.
Do you think that such a behaviour would be achievable?
Hi @annaet we are trying to run test cases via cli with tags, but somehow all specs are ran even when does not have tagged tests.
e.g.:
cypress run --browser chrome --env CYPRESS_INCLUDE_TAGS=smoke CYPRESS_EXCLUDE_TAGS=wip
test1.spec.js
test2.spec.js
As you can see all specs should be skipped, but both of them where ran and empty result shown.
Is the any solution?
Thanks in advance.
The text was updated successfully, but these errors were encountered: