Cypress logs a results table for each test files and another one at the end of the test run.
The output from the selected runner is often enough. An option to either completely disable cypress reports or to disable file reports and run reports selectively would be very appreciated.
Cypress 3.0.3
OS: Ubuntu 18.04
This is an important issue I believe. I'm trying to put the output of running cypress run
into a CI test result email, and the verbose results are way too verbose and fancy and are not suitable for sending in an email; and apparently I can't disable them to only show the result of the reporter I have chosen.
This would also be very helpful to have in place when running Cypress through build tools like TeamCity & Jenkins, otherwise you see this:
[15:47:51][Step 2/3] รขโลรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโ๏ฟฝ
[15:47:51][Step 2/3] รขโโ Tests: 1 รขโโ
[15:47:51][Step 2/3] รขโโ Passing: 1 รขโโ
[15:47:51][Step 2/3] รขโโ Failing: 0 รขโโ
[15:47:51][Step 2/3] รขโโ Pending: 0 รขโโ
[15:47:51][Step 2/3] รขโโ Skipped: 0 รขโโ
[15:47:51][Step 2/3] รขโโ Screenshots: 0 รขโโ
[15:47:51][Step 2/3] รขโโ Video: false รขโโ
[15:47:51][Step 2/3] รขโโ Duration: 3 seconds รขโโ
[15:47:51][Step 2/3] รขโโรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโโฌรขโห
Is there any current workaround to prevent these weird symbols (seen from running docker on Jenkins for instance)?
[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m
15:35:41 [33mcypress |[0m
15:35:41 [33mcypress |[0m Running: [90mapplication_spec.js[39m [90m(1 of 1)[39m
15:35:44 [33mcypress |[0m
15:35:44 [33mcypress |[0m [0m[0m
15:35:44 [33mcypress |[0m [0m Applications[0m
15:36:02 [33mcypress |[0m [32m ?[0m[90m Creates a client app as new user[0m[31m (17735ms)[0m
15:36:14 [33mcypress |[0m [32m ?[0m[90m Creates an client app as an existing user[0m[31m (11676ms)[0m
15:36:14 [33mcypress |[0m
15:36:14 [33mcypress |[0m
15:36:14 [33mcypress |[0m [92m [0m[32m 2 passing[0m[90m (30s)[0m
15:36:14 [33mcypress |[0m
15:36:14 [33mcypress |[0m
15:36:14 [33mcypress |[0m [32m ([4m[1mResults[22m[24m)[39m
15:36:14 [33mcypress |[0m
15:36:14 [33mcypress |[0m [90m ?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m[90m?[39m
Is there any way we can help tackle this feature? Currently cypress is really too verbose for CI.
I have just running started running cypress tests on AWS Codebuild, with the verbose logout output logging costs in AWS can be very high (I have many thousands of tests running) The ability to only post verbose logs for test failures would be perfect.
I would appreciate this as well.
So far I came to workaround, while running cypress as CLI/SSH command, I am grepping the output as follows:
npx cypress run \
|grep -Pzo --line-buffered ".*(Running.*spec.js.*\n|^[\r\n].*\s*โ\s.*\n| [[:digit:]]*.*:\n.*\n|Run Finished.*(\n.*)*)"
exit ${PIPESTATUS[0]}
Failing tests return only the first line of the error (that is sufficient for us, we can look later to screenshots).
At the end the full overview table is shown.
Disadvantage is, the we no longer see progress of currently running test, and the output is shown after it finishes (that is in my case 30+ minutes).
The result looks similar to this:
[17:03:59] : [Step 3/3] Running: test/00-login.spec.js (1 of 84)
[17:03:59] : [Step 3/3] Running: test/01-menu.spec.js (2 of 84)
...
[17:03:59] : [Step 3/3] Running: test/02-test.spec.js (83 of 84)
[17:03:59] : [Step 3/3] Running: test/03-test.spec.js (84 of 84)
[17:03:59] : [Step 3/3] 1) SOME TEST despcription:
[17:03:59] : [Step 3/3] AssertionError: expected 'some text' to include 'another text'
[17:03:59] : [Step 3/3] (Run Finished)
[17:03:59] : [Step 3/3]
[17:03:59] : [Step 3/3]
[17:03:59] : [Step 3/3] Spec Tests Passing Failing Pending Skipped
[17:03:59] : [Step 3/3] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[17:03:59] : [Step 3/3] โ โ 00-obecne/00-login.spec.js 00:09 3 3 - - - โ
[17:03:59] : [Step 3/3] |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
[17:03:59] : [Step 3/3] โ โ 00-obecne/01-menu.spec.js 00:10 11 11 - - - โ
[17:03:59] : [Step 3/3] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
... more results
[17:03:59] : [Step 3/3] โ โ test.spec.js 00:27 5 4 1 - - โ
[17:03:59] : [Step 3/3] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
[17:03:59] : [Step 3/3] โ 12 of 85 failed (14%) 49:32 222 201 20 - 1
@icropper @mikepsinn Yes, you can pass NO_COLOR=1
as an environment variable to disable the colors (aka all the ansi characters that are not correctly parsed by your CI). https://on.cypress.io/continuous-integration#Colors
@jennifer-shehane You told about the colors but how can I disable the results table at the end of every suite as @djhi described. This is indeed very annoying on the CI.
+1 for this, causes some headache when running on gitlab runners/custom docker image without an ability to disable it
+1 for this from me too. When a test fails during CI it's really bad that I have to scroll up and down a lot to find what actually went wrong.
+1 From me too, in the original screenshot, everything below L972 is redundant and just muddies up the output. Maybe once at the end of all the files would be ok, but I have a project with >80 spec files and we always joke that when you have a cypress test fail in CI welcome to hell.
When I saw how noisy our CI was with cypress tests, I assumed by changing the reporter I could make it a little less verbose, but this output comes no matter what reporter is configured.
I've created a pull request that adds --quiet as a option which disables the output for:
This should just leave you with whatever the configured reporter outputs
+1
Hi, I'd really appreciate this feature as well.
I wrote my own test runner to run cypress locally but these lengthy console outputs are annoying and can't find a way to disable them
Thank you
The code for this is done in cypress-io/cypress#7714, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Released in 4.9.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.9.0, please open a new issue.
Most helpful comment
Is there any way we can help tackle this feature? Currently cypress is really too verbose for CI.