reactjstestingautomated-testse2e-testingtestcafe

TestCafe works on node 14 but fails on node 18


We have a number of working TestCafe tests for our application, and they've been working very well (95-100% success). We've been on node 14 and are upgrading to node 18 because of node EOL support.

However, when running under node18, we get many failures (43% succcess in our Azure pipeline) and running TestCafe locally doesn't even get off the ground.

I looked at the TestCafe code and see that it only claims to support node 16, so I cloned the repo and ran their three test suites:

gulp test-server fails with 796 passing, 1 pending, and 7 failing

gulp test-functional-local fails with 0 passing, 2 failing

gulp test-client-local passes Safari (Total: 30 Failed: 0)

Is it possible to use TestCafe with node18 and if so, what are some things we can do to resolve this?

We're on react 17.0.2, react-scripts 4.0.1

EDIT: I noticed that we were on TestCafe 2.1.0, switched to 2.4.0 and now getting better results in our app. I still wonder about the failures in the TestCafe repo.

Thanks...


Solution

  • We in TestCafe monitor the test-server task in the Latest node version and the Minimal maintainable node version.

    You can see that we have two tasks in our GitHub actions: https://github.com/DevExpress/testcafe/actions/runs/5221456149/jobs/9425734178 - latest https://github.com/DevExpress/testcafe/actions/runs/5221456100/jobs/9425733957 - minimal

    Therefore, we usually fix failed tests in the next TestCafe release. That's why a test can fail in one minor version and pass in another.

    The idea is that in the latest TestCafe version, all tests pass successfully. So, we recommend using the latest TestCafe version in the most cases.

    If you experience a specific issue with node version, feel free to create a ticket in the official TestCafe repository using the following link: https://github.com/DevExpress/testcafe/issues/new?assignees=&labels=TYPE%3A+bug&projects=&template=bug_report.yaml