Log all failed attempts in testcafe quarantine mode?

150 Views Asked by At

I have quarantine mode enabled in my testcafe configuration.

"ci-e2e": {
    "browsers": [
        "chrome:headless"
    ],
    "debugOnFail": false,
    "src": "./tests/e2e/*.test.ts",
    "concurrency": 1,
    "quarantineMode": true,
    "reporters": [
        {
            "name": "nunit3",
            "output": "results/e2e/testResults.xml"
        },
        {
            "name": "spec"
        }
    ],
    "screenshots": {
        "takeOnFails": true,
        "path": "results/ui/screenshots",
        "pathPattern": "${DATE}_${TIME}/${FIXTURE}/${TEST}/Screenshot-${QUARANTINE_ATTEMPT}.png"
    },
    "video": {
        "path": "results/ui/video",
        "failedOnly": true,
        "pathPattern": "${DATE}_${TIME}/${FIXTURE}/${TEST}/Video-${QUARANTINE_ATTEMPT}"
    }
},

Now when some attempt fails I have entry in log (nunit xml logfile) with information about failed runs and only one stack-trace. I have screenshot for each failed run.

<failure>
    <message>
        <![CDATA[ ❌ AssertionError: ... Run 1: Failed Run 2: Failed Run 3: Failed ]]>
    </message>
    <stack-trace>
        here we have stack-trace for only one failed run
    </stack-trace>
</failure>

I want to have log entry with stack-trace for each failed run for each failed test. Is it possible to configure testcafe this way? If not what I need to do?

1

There are 1 best solutions below

0
Alexey Popov On

There is a mistake in the config file. The name of the option for reporters should be reporter, but it is reporterS. It means that Testcafe doesn't use these reporters at all and maybe now you just see an outdated file with results.