We use testcafe for end-2-end testing on a React application. We noticed differences in runtime results not explained in the application. In summary: two consecutive test executions under the same application and test conditions, give as different results. This gives us problems in interpreting failures and and a lack of confidence in test results. Have you ever had to deal with this type of situation? Are there ways to improve the test reliability.
.testcaferc.json used is:
{
"hostname": "localhost",
"browsers": [
"chrome"
],
"debugOnFail": false,
"skipJsErrors": true,
"quarantineMode": false,
"cache": false,
"disablePageCaching": true,
"developmentMode": false,
"assertionTimeout": 60000,
"pageLoadTimeout": 60000,
"ajax-request-timeout": 60000,
"pageRequestTimeout": 60000,
"selectorTimeout": 60000,
"retryTestPages": false,
"stopOnFirstFail": false,
"concurrency": 1,
"disableNativeAutomation": "true",
"clientScripts": [
{
"module": "@testing-library/dom/dist/@testing-library/dom.umd.js"
},
"./clientscripts/webdav_testfix.js"
]
}
package.json used is:
{
"devDependencies": {
"@testing-library/testcafe": "^5.0.0",
"testcafe": "3.0.0"
},
"name": "e2e-testcafe-dev",
"description": "E2E test with TestCafe in Dev environment",
"version": "0.0.6",
"directories": {
"test": "tests"
},
"dependencies": {
"cross-env": "^7.0.3",
"date-fns": "^2.29.3",
"ffmpeg": "^0.0.4",
"fs": "0.0.1-security",
"http-parser-js": "^0.5.8",
"junit": "^0.5.1",
"node-xlsx": "^0.4.0",
"officeparser": "^3.3.0",
"path": "0.12.7",
"pdf-parse": "1.1.1",
"rimraf": "^5.0.0",
"testcafe-react-selectors": "^5.0.3",
"testcafe-reporter-html": "^1.4.6",
"testcafe-reporter-junit": "^3.0.2"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "cross-env NODE_OPTIONS= '--insecure-http-parser'"
},
"repository": {
"type": "git",
"url": "https://URL/PR/TM/_git/Tests.E2E.DEV"
},
"keywords": [],
"author": "Team",
"license": ""
}
We have tried different timeout settings and Wait but it doesn't change anything.