Skip to content
New issue

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

TestCafe does not generate screenshots or videos, and the results are not sent to Slack on Jenkins. #8126

Closed
RoxyAnd opened this issue Jan 18, 2024 · 1 comment
Labels
TYPE: bug The described behavior is considered as wrong (bug).

Comments

@RoxyAnd
Copy link

RoxyAnd commented Jan 18, 2024

What is your Scenario?

TestCafe is not generating screenshots or videos, and results are not sent to slack running on Jenkins.

What is the Current behavior?

This error started from today.
even though the pipeline runs successfully, it marks it in red instead of green.
Encountered an error during the execution of TestCafe in a Jenkins environment.
The error stack trace is as follows:

06:05:30 SyntaxError: Invalid or unexpected token
06:05:30 at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
06:05:30
06:05:30 Node.js v18.16.0
06:05:30 error Command failed with exit code 1.
06:05:30 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

06:05:30 [Pipeline] }
06:05:30 [Pipeline] // script
06:05:30 Error when executing always post condition:
06:05:30 Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: fb42e698-6705-48bd-a0de-695f06c4f5e7
06:05:30 hudson.AbortException: script returned exit code 1
06:05:30 at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:667)
06:05:30 at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:613)
06:05:30 at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:557)
06:05:30 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
06:05:30 at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
06:05:30 at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
06:05:30 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
06:05:30 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
06:05:30 at java.base/java.lang.Thread.run(Unknown Source)

What is the Expected behavior?

Every time a scenario fails have the possibility of consulting the evidence (screenshots and videos) generated during the execution.

What is the public URL of the test page? (attach your complete example)

none

What is your TestCafe test code?

none

Your complete configuration file

Node.js v18.16.0 ( tried with version 20.10.0 and experienced the same behavior)
Testcafe version 1.19.0 ( trying with the new testcafe version (3.0.0 3.4.0 & 3.5.0) but I also got the same error)
"testcafe-reporter-cucumber-json": "^6.3.0",
"testcafe-reporter-list": "^2.2.0",
"testcafe-reporter-slack-custom": "^1.3.0",
"@slack/web-api": "7.0.0"

Your complete test report


Screenshots

06:05:30 ^
06:05:30
06:05:30 SyntaxError: Invalid or unexpected token
06:05:30 at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
06:05:30
06:05:30 Node.js v18.16.0
06:05:30 error Command failed with exit code 1.
06:05:30 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
06:05:30 [Pipeline] }
06:05:30 [Pipeline] // script
06:05:30 Error when executing always post condition:
06:05:30 Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: fb42e698-6705-48bd-a0de-695f06c4f5e7
06:05:30 hudson.AbortException: script returned exit code 1
06:05:30 at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:667)
06:05:30 at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:613)
06:05:30 at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:557)
06:05:30 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
06:05:30 at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
06:05:30 at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
06:05:30 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
06:05:30 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
06:05:30 at java.base/java.lang.Thread.run(Unknown Source)

Steps to Reproduce

  1. Setup Jenkins with docker image node-18.16.0-chrome-113.0.5672.92-1-ff-113.0-edge-113.0.1774.35-1
  2. Use testcafe 1.19.0 or use a more recent version like 3.4.0
  3. yarn install
  4. use yarn tc:ci to run test on Jenkins

TestCafe version

1.19.0

Node.js version

18.16.0

Command-line arguments

yarn slack --channelId=# --replyTs= --bmxBuildNumber=#--reportPath=reports/BUILD# /result-BUILD#.json

Browser name(s) and version(s)

chrome 118.0.5

Platform(s) and version(s)

Jenkins, docker image

Other

Encountered this error in recent versions of TestCafe (from version 3.0.0 onwards). The issue persists in older versions, for example, 1.19.0.

@RoxyAnd RoxyAnd added the TYPE: bug The described behavior is considered as wrong (bug). label Jan 18, 2024
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jan 18, 2024
@RoxyAnd RoxyAnd changed the title TestCafe is not generating screenshots or videos, and results are not sent to slack running on Jenkins. TestCafe does not generate screenshots or videos, and the results are not sent to Slack in Jenkins. Jan 18, 2024
@RoxyAnd RoxyAnd changed the title TestCafe does not generate screenshots or videos, and the results are not sent to Slack in Jenkins. TestCafe does not generate screenshots or videos, and the results are not sent to Slack on Jenkins. Jan 18, 2024
@PavelMor25
Copy link
Collaborator

Hello @RoxyAnd,

Officially, we don't support testcafe-reporter-cucumber-json, testcafe-reporter-slack-custom, and @slack/web-api packages.

If the issue appeared recently, it's possible that it's related to the new version of @slack/web-api. Please reach out to the developers of these packages for assistance.

@need-response-app need-response-app bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants