Search code examples
testingautomationautomated-testse2e-testingtestcafe

How to slow down test execution in TestCafe?


I want to check UI test execution written by another developer. It is too fast for my eyes and brain to catch what is happening.

How do I slow down the execution of tests in TestCafe?


Solution

  • Another way is to use setTestSpeed in beforeEach. Here is a code snippet:

    fixture`Test`
        .page`http://www.google.com`
    
        .before(async t => {
        })
    
        .beforeEach(async t => {
            await t.setTestSpeed(0.3)
            await t.maximizeWindow()
        })
    
    test("hello", async t => {
    
    });