A Node.js tool to automate end-to-end web testing.

Overview

Try TestCafe Studio IDE

testcafe

Functional Windows desktop All Travis tasks (server, client, functional: mobile, macOS, Edge) NPM Version

A Node.js tool to automate end-to-end web testing.
Write tests in JS or TypeScript, run them and view results.

Homepage   •   Documentation   •   FAQ   •   Support

  • Works on all popular environments: TestCafe runs on Windows, MacOS, and Linux. It supports desktop, mobile, remote and cloud browsers (UI or headless).
  • 1 minute to set up: You do not need WebDriver or any other testing software. Install TestCafe with one command, and you are ready to test: npm install -g testcafe
  • Free and open source: TestCafe is free to use under the MIT license. Plugins provide custom reports, integration with other tools, launching tests from IDE, etc. You can use the plugins made by the GitHub community or make your own.

Install TestCafe and Run a Test

Running a sample test in Safari

Table of contents

Features

Stable tests and no manual timeouts
TestCafe automatically waits for page loads and XHRs before the test starts and after each action. It also features smart test actions and assertions that wait for page elements to appear. You can change the maximum wait time. If elements load faster, tests skip the timeout and continue.

Rapid test development tool
Changes in test code immediately restart the test, and you see the results instantly.
See how it works in the TestCafe Live repository.

Latest JS and TypeScript support
TestCafe supports the latest JavaScript features, including ES2017 (for example, async/await). You can also use TypeScript if you prefer a strongly typed language.

Detects JS errors in your code
TestCafe reports JS errors that it finds on the webpage. Tests automatically fail because of that. However, you can disable this.

Concurrent test launch
TestCafe can open multiple instances of the same browser to run parallel tests which decreases test execution time.

PageObject pattern support
The TestCafe's Test API includes a high-level selector library, assertions, etc. You can combine them to implement readable tests with the PageObject pattern.

const macOSInput = Selector('.column').find('label').withText('MacOS').child('input');

Easy to include in a continuous integration system
You can run TestCafe from a console, and its reports can be viewed in a CI system's interface (TeamCity, Jenkins, Travis & etc.)

TestCafe Studio: IDE for End-to-End Web Testing

TestCafe works great for JavaScript developers, but at some point you will need to delegate testing tasks to your Q&A department. If that's the case and you are looking for a codeless way to record and maintain tests compatible with your existing infrastructure, check out TestCafe Studio - a testing IDE built on top of the open-source TestCafe.

Read the following article to learn how TestCafe Studio could fit into your workflow: What's Better than TestCafe? TestCafe Studio.

Get Started with TestCafe Studio

Record and Run a Test in TestCafe Studio

Getting Started

Installation

Ensure that Node.js (Current or Active LTS is recommended, version 10 at minimum) and npm are installed on your computer before running it:

npm install -g testcafe

Creating the Test

As an example, we are going to test the https://devexpress.github.io/testcafe/example page.

Create a .js or .ts file on your computer. Note that it needs to have a specific structure: tests must be organized into fixtures. You can paste the following code to see the test in action:

import { Selector } from 'testcafe'; // first import testcafe selectors

fixture `Getting Started`// declare the fixture
    .page `https://devexpress.github.io/testcafe/example`;  // specify the start page


//then create a test and place your code there
test('My first test', async t => {
    await t
        .typeText('#developer-name', 'John Smith')
        .click('#submit-button')

        // Use the assertion to check if the actual header text is equal to the expected one
        .expect(Selector('#article-header').innerText).eql('Thank you, John Smith!');
});

Running the Test

Call the following command in a command shell. Specify the target browser and file path.

testcafe chrome test1.js

TestCafe opens the browser and starts executing the test.

Important! Make sure the browser tab that runs tests stays active. Do not minimize the browser window. Inactive tabs and minimized browser windows switch to a lower resource consumption mode where tests are not guaranteed to execute correctly.

Viewing the Results

TestCafe outputs the results into a command shell by default. See Reporters for more information. You can also use plugins to customize the reports.

Test Report

Read the Getting Started page for a more detailed guide.

Documentation

Go to our website for full documentation on TestCafe.

Get Help

Join the TestCafe community on Stack Overflow to get help. Ask and answer questions with the TestCafe tag.

Issue Tracker

Use our GitHub issues page to report bugs and suggest improvements.

Stay in Touch

Follow us on Twitter. We post TestCafe news and updates, several times a week.

Contributing

Read our Contributing Guide to learn how to contribute to the project.

To create your own plugin for TestCafe, you can use these plugin generators:

If you want your plugin to be listed below, send us a note in a Github issue.

Thank you to all the people who already contributed to TestCafe!

aha-oretama ai aleks-pro AlexanderMoiseev AlexanderMoskovkin alexey-lin
aha-oretama ai aleks-pro AlexanderMoiseev AlexanderMoskovkin alexey-lin
AlexKamaev AlexSkorkin alexwybraniec andrewbranch AndreyBelym AndyWendt
AlexKamaev AlexSkorkin alexwybraniec andrewbranch AndreyBelym AndyWendt
anthophobiac arubtsov augustomezencio-hotmart bdwain benmonro beyondcompute
anthophobiac arubtsov augustomezencio-hotmart bdwain benmonro beyondcompute
bill-looby-i bsmithb2 caseyWebb cdrini cgfarmer4 churkin
bill-looby-i bsmithb2 caseyWebb cdrini cgfarmer4 churkin
dej611 DIRECTcut Dmitry-Ostashev ericyd Farfurix GeoffreyBooth
dej611 DIRECTcut Dmitry-Ostashev ericyd Farfurix GeoffreyBooth
helen-dikareva honsq90 infctr inikulin Ivan-Katovich jamesgeorge007
helen-dikareva honsq90 infctr inikulin Ivan-Katovich jamesgeorge007
jaypea kanhaiya15 kirovboris kubejm LavrovArtem link89
jaypea kanhaiya15 kirovboris kubejm LavrovArtem link89
lzxb macdonaldr93 MargaritaLoseva Marketionist MatthewNielsen27 mattmanske
lzxb macdonaldr93 MargaritaLoseva Marketionist MatthewNielsen27 mattmanske
mcjim miherlosev morfey13 mostlyfabulous murajun1978 NickCis
mcjim miherlosev morfey13 mostlyfabulous murajun1978 NickCis
danielroe Ogurecher pietrovich radarhere raspo rbardini
danielroe Ogurecher pietrovich radarhere raspo rbardini
renancouto sgrillon14 smockle stefanschenk superroma theghostbel
renancouto sgrillon14 smockle stefanschenk superroma theghostbel
timnederhoff titerman tobiasbueschel varunkumar VasilyStrelyaev vitalics
timnederhoff titerman tobiasbueschel varunkumar VasilyStrelyaev vitalics
Vla8islav wentwrong intermike DevSide b12031106 tomashanacek
Vla8islav wentwrong intermike DevSide b12031106 tomashanacek

Plugins

TestCafe developers and community members made these plugins:

Different Versions of TestCafe

  TestCafe TestCafe Studio
No need for WebDriver, browser plugins or other tools
Cross-platform and cross-browser out of the box
Write tests in the latest JavaScript or TypeScript
Clear and flexible API supports ES6 and PageModel pattern
Stable tests due to the Smart Assertion Query Mechanism
Tests run fast due to intelligent Automatic Waiting Mechanism and Concurrent Test Execution
Custom reporter plugins
Use third-party Node.js modules in test scripts
Integration with popular CI systems  ✓*
Free and open-source  
Visual Test Recorder  
Interactive Test Editor  
Automatic Selector Generation  
Run Configuration Manager  
IDE-like GUI  

* You can use open-source TestCafe to run TestCafe Studio tests in CI systems.

Badge

Show everyone you are using TestCafe: Tested with TestCafe

To display this badge, add the following code to your repository readme:

<a href="https://github.com/DevExpress/testcafe">
    <img alt="Tested with TestCafe" src="https://img.shields.io/badge/tested%20with-TestCafe-2fa4cf.svg">
</a>

Thanks to BrowserStack

We are grateful to BrowserStack for providing the infrastructure that we use to test code in this repository.

BrowserStack Logo

License

Code released under the MIT license.

Creators

Developer Express Inc. (https://devexpress.com)

Comments
  • Add the capability to perform testing in multiple browser windows

    Add the capability to perform testing in multiple browser windows

    Are you requesting a feature or reporting a bug?

    Feature

    What is the current behavior?

    You can run test only in single window of the browser

    What is the expected behavior?

    It's useful to run test in multiple windows to simultaneously observe results from different users perspective. E.g. we test online chat or online game. The idea is to spawn new windows in test and switch test context to that window (It also we'll play well with Roles feature):

    test('Multi-window', async t => {
         await t
               .switchRole(user1)
               .click('#start-game')
    
               .switchToWindow(1)   // Spawns new browser window if it wasn't used before
               .switchRole(user2)
               .click('#start-game')
               .click('#shoot')
    
               .switchToWindow(0); // Return to default window
    
        expect(await healthbar.value).eql(0);   
    });
    

    The syntax is still a subject for bikeshedding. \cc @DevExpress/testcafe

    TYPE: enhancement AREA: client SYSTEM: API AREA: server TYPE: Web API support FREQUENCY: level 2 SYSTEM: window management 
    opened by inikulin 94
  • [docs] Describe Test API

    [docs] Describe Test API

    \cc @DevExpress/testcafe-docs This thing is quite big. Overall, it's finished but not quite polished in each and every corner. That's because I expect you to find some major drawbacks that will require rewriting or rearranging some parts.

    I understand you'll want to read it bit by bit, during the next couple of days.

    closes #285

    opened by VasilyStrelyaev 73
  • APIv2 discussion

    APIv2 discussion

    This is a general place for the APIv2 discussion. I'll move proposals from wiki to here. Any suggestions/ideas/proposals are welcome. \cc @DevExpress/testcafe

    TYPE: enhancement AREA: client SYSTEM: API STATE: Auto-locked 
    opened by inikulin 73
  • Add support for 'clientScripts' (close #1739)

    Add support for 'clientScripts' (close #1739)

    This PR will add a new section to the config file: "clientScripts"

    example:

     {
        "src": "test.js",
        "browsers": [
            "chrome",
        ],
        "clientScripts": [
            "./node_modules/@testing-library/dom/dist/@testing-library/dom.umd.js"
        ]
    }
    

    adding this to your config will cause testcafe to inject the above scripts into the browser as a script tag.

    This will be very useful for testcafe-testing-library which needs to inject DomTestingLibrary into the dom, on each page-load, and will thus now only need to be configured once, and will then work on each page.

    resolves https://github.com/DevExpress/testcafe/issues/1739

    opened by benmonro 64
  • Fix 'Provide the capability to access browser information from test code' (closes #481)

    Fix 'Provide the capability to access browser information from test code' (closes #481)

    https://github.com/DevExpress/testcafe/issues/481

    Changes

    1. Add t.browser.

    t.browser examples

    testcafe "saucelabs:Internet [email protected]:Windows 7" test.js (Internet Explorer 11.0 / Windows 7)
    {
      alias: 'saucelabs:Internet [email protected]:Windows 7',
      headless: false,
      name: 'Internet Explorer',
      version: '11.0',
      platform: 'desktop',
      os: { name: 'Windows', version: '7' },
      engine: { name: 'Trident', version: '7.0' },
      prettyUserAgent: 'Internet Explorer 11.0 / Windows 7',
      userAgent: 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko'
    }
    
    
    testcafe chrome test.js (Chrome 77.0.3865.120 / Windows 10)
    {
      alias: 'chrome',
      headless: false,
      name: 'Chrome',
      version: '77.0.3865.120',
      platform: 'desktop',
      os: { name: 'Windows', version: '10' },
      engine: { name: 'Blink' },
      prettyUserAgent: 'Chrome 77.0.3865.120 / Windows 10',
      userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36'
    }
    
    testcafe "chrome:headless --no-sandbox" test.js (Chrome 77.0.3865.120 / Windows 10)
    {
      alias: 'chrome:headless --no-sandbox',
      headless: true,
      name: 'Chrome',
      version: '77.0.3865.120',
      platform: 'desktop',
      os: { name: 'Windows', version: '10' },
      engine: { name: 'Blink' },
      prettyUserAgent: 'Chrome 77.0.3865.120 / Windows 10',
      userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/77.0.3865.120 Safari/537.36'
    }
    
    testcafe firefox:headless:disableMultiprocessing=true test.js (Firefox 69.0 / Windows 10)
    {
      alias: 'firefox:headless:disableMultiprocessing=true',
      headless: true,
      name: 'Firefox',
      version: '69.0',
      platform: 'desktop',
      os: { name: 'Windows', version: '10' },
      engine: { name: 'Gecko', version: '20100101' },
      prettyUserAgent: 'Firefox 69.0 / Windows 10',
      userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0'
    }
    
    testcafe "saucelabs:iPad Air [email protected]" test.js (Safari 12.1 / iOS 12.2)
    {
      alias: 'saucelabs:iPad Air [email protected]',
      headless: false,
      name: 'Safari',
      version: '12.1',
      platform: 'tablet',
      os: { name: 'iOS', version: '12.2' },
      engine: { name: 'WebKit', version: '605.1.15' },
      prettyUserAgent: 'Safari 12.1 / iOS 12.2',
      userAgent: 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1'
    }
    
    testcafe "saucelabs:[email protected]:macOS 10.14" test.js (Chrome 77.0.3865.75 / macOS 10.14.0)
    {
      alias: 'saucelabs:[email protected]:macOS 10.14',
      headless: false,
      name: 'Chrome',
      version: '77.0.3865.75',
      platform: 'desktop',
      os: { name: 'macOS', version: '10.14.0' },
      engine: { name: 'Blink' },
      prettyUserAgent: 'Chrome 77.0.3865.75 / macOS 10.14.0',
      userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36'
    }
    
    testcafe "saucelabs:Samsung Galaxy S9 Plus WQHD GoogleAPI [email protected]" test.js (Chrome 67.0.3396.87 / Android 8.1.0)
    {
      alias: 'saucelabs:Samsung Galaxy S9 Plus WQHD GoogleAPI [email protected]',
      headless: false,
      name: 'Chrome',
      version: '67.0.3396.87',
      platform: 'mobile',
      os: { name: 'Android', version: '8.1.0' },
      engine: { name: 'Blink' },
      prettyUserAgent: 'Chrome 67.0.3396.87 / Android 8.1.0',
      userAgent: 'Mozilla/5.0 (Linux; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.026) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Mobile Safari/537.36'
    }
    
    
    opened by Farfurix 57
  • Server responses with status 222 unexpectedly when window.fetch() is called in Chrome

    Server responses with status 222 unexpectedly when window.fetch() is called in Chrome

    Are you requesting a feature or reporting a bug?

    Reporting a possible bug

    What is the current behavior?

    Some requests in chrome seem to return 222 from the proxy and no json content, however the same tests work correctly in firefox and safari. There don't seem to be major differences investigating curl differences which sort of leads me to believe it's a chrome fetch related issue

    What is the expected behavior?

    That a page with a third party xhr request works consistently in browser.

    How would you reproduce the current behavior (if this is a bug)?

    Do not have a repro currently, it seems that xhr requests in chrome are not currently working

    Specify your

    • operating system: macOS Sierra 10.12.1
    • testcafe version: 0.11 and 0.12-alpha5
    • node.js version: 7.1
    TYPE: bug SYSTEM: hammerhead BROWSER: Chrome STATE: Auto-locked 
    opened by dzannotti 56
  • RClick automation refactoring (#239)

    RClick automation refactoring (#239)

    /cc @AlexanderMoskovkin @AndreyBelym @MargaritaLoseva please help with comment: https://github.com/helen-dikareva/testcafe-phoenix/commit/3526257d02f8d3cbb520413fcfb9863570eaecb5#diff-5b7bb7364f1a533c7d2d73407a451457R352

    opened by helen-dikareva 56
  • Content of the iframe did not load

    Content of the iframe did not load

    I see that there are some bug reports, that describe similar (or the same) issue, e.g. # 2406, however they have been closed for inactivity or other reasons, and I still don't see a solution. Hopefully, my feedback could help identify the issue.

    What is your Test Scenario?

    I am trying a very simple test - verifying that some text, for example "Host Status", exists on a page.

    What is the Current behavior?

    I see the following error:

    1) Content of the iframe in which the test is currently operating did not load.

    when using testcafe ver. 1.2.1. In addition to this, I see:

    (node:1842) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

    None of these errors were present in testcafe ver. 0.20.0.

    Here's the entire output:

     Running tests in:
     - Firefox 67.0.0 / Ubuntu 0.0.0
    
     Nagios XI Tests
    (node:1842) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
     ✖ Host Status
    
       1) Content of the iframe in which the test is currently operating did not load.
    
          Browser: Firefox 67.0.0 / Ubuntu 0.0.0
    
             30 |  await t
             31 |    .useRole(admin)
             32 |    .click( Selector('a').withText('Home') )
             33 |    .click( Selector('a').withText('Host Status') )
             34 |    .switchToIframe( '#maincontentframe' )
           > 35 |    .expect( Selector('h1').withText('Host Status').exists ).ok()
             36 |    .expect( Selector('.hoststatustar_').withText('All hosts').exists ).ok()
             37 |    .expect( Selector('.xi-table-recordcount').withText('Showing').exists ).ok()
             38 |});
             39 |
    
             at ok (/home/ludmil/testcafe/XI/Home/Left Menu/Details/host_status.js:35:62)
             at <anonymous> (/home/ludmil/testcafe/XI/Home/Left Menu/Details/host_status.js:29:1)
             at <anonymous> (/usr/lib/node_modules/testcafe/src/api/wrap-test-function.js:17:28)
             at TestRun._executeTestFn (/usr/lib/node_modules/testcafe/src/test-run/index.js:243:19)
             at TestRun.start (/usr/lib/node_modules/testcafe/src/test-run/index.js:292:24)
    
    
    
     1/1 failed (38s)
    

    What is the Expected behavior?

    I expect my test to succeed as it used to in testcafe ver. 0.20.0.

    Example:

     Running tests in:
     - Firefox 61.0.0 / Ubuntu 0.0.0
    
     Nagios XI Tests
     ✓ Host Status
    
    
     1 passed (29s)
    

    What is your web application and your TestCafe test code?

    Public link: http://nagiosxi.demos.nagios.com/nagiosxi

    host_status.js

    import { Role } from 'testcafe';
    import minimist from 'minimist';
    
    const args = minimist(process.argv.slice(2));
    const baseurl = args.baseurl;
    
    fixture ('Nagios XI Tests')
      .page( baseurl )
    
    // Roles
    
    const admin = Role(baseurl, async t => {
      await t
        .typeText('#usernameBox', 'nagiosadmin')
        .typeText('#passwordBox', 'nagiosadmin')
        .click('#loginButton')
    });
    
    // Tests
    
    /* Template
    test('Test Name', async t => {
      await t
        .useRole(admin)
    });
    */
    
    test('Host Status', async t => {
      await t
        .useRole(admin)
        .click( Selector('a').withText('Home') )
        .click( Selector('a').withText('Host Status') )
        .switchToIframe( '#maincontentframe' )
        .expect( Selector('h1').withText('Host Status').exists ).ok()
        .expect( Selector('.hoststatustar_').withText('All hosts').exists ).ok()
        .expect( Selector('.xi-table-recordcount').withText('Showing').exists ).ok()
    });
    

    Your Environment details:

    testcafe version: 1.2.1

    node.js version: v12.4.0

    command-line arguments: testcafe -c 1 firefox:headless host_status.js --baseurl='http://nagiosxi.demos.nagios.com/nagiosxi' -e

    browser name and version: Firefox Quantum 67.0.2 (64-bit)

    platform and version: Ubuntu 18.04.2 LTS

    TYPE: bug AREA: client STATE: Auto-locked FREQUENCY: level 2 
    opened by ludmilmm 54
  • Request hooks

    Request hooks

    Typedefs will be updated in a separate PR.

    Feature has 2 parts: in testcafe and in hammerhead. Firstly, the testcafe part will be reviewed. After that - the hammerhead (https://github.com/DevExpress/testcafe-hammerhead/pull/1527).

    For convenience,in this PR the hammerhead part used as module - see https://github.com/DevExpress/testcafe/compare/master...miherlosev:request_hooks?expand=1#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R106.

    Changes:

    • add RequestMock, RequestLogger and RequestHook classes
    • rename ClientFunctionResultPromise to ReExecutablePromise.
    • add API for add/removing request hooks on fixture, page and testcontroller levels
    • add RequestHookConfigureAPIError class
    • move assertThrow to testing helpers
    opened by miherlosev 52
  • Allow to customize conditions in the page automatic waiting

    Allow to customize conditions in the page automatic waiting

    Are you requesting a feature or reporting a bug?

    Feature

    It's hard for browser test frameworks to know when a page has fully loaded. Therefore developers of the tests should define this case.

    If I have a test like this:

    test('example', async t => {
        await t.navigateTo('http://example.com');
       // Page should be ready here
    });
    

    I would like to let TestCafe know when my page is ready. So far, as a hack, I was thinking of hooking into the beforeEach callback, overwriting the test.navigateTo method, and ensuring the page is ready before test execution continues.

    Instead, do you have any better ideas? I'm trying to avoid doing this:

    test('example', async t => {
       await t.navigateTo('http://example.com');
       await pageToBeReady();
    });
    

    Because I'd have to repeat that in each test. Ideally, I'd only have to define a page load strategy once.

    TYPE: enhancement SYSTEM: API STATE: Stale 
    opened by umaar 52
  • testcafe failing to connect when using --proxy option

    testcafe failing to connect when using --proxy option

    What is your Test Scenario?

    I'm trying to run testcafe in our pipeline (Semaphore) using a docker image based on the official one, where the only additions are copying our tests inside it and install some other additional npm packages used by them. Those tests run against a test environment, that for security reasons can only be accessed either via VPN or a proxy. I'm using the --proxy flag but the test run fails.

    From that same container, if I run curl https://mytestserver.dev --proxy $HTTP_PROXY it connects without problems, so does a Cypress container running in the same pipeline.

    What is the Current behavior?

    Tests fail to run, with the message

    ERROR Unable to establish one or more of the specified browser connections.
    1 of 1 browser connections have not been established:
    - chromium:headless
    
    Hints:
    - Use the "browserInitTimeout" option to allow more time for the browser to start. The timeout is set to 2 minutes for local browsers and 6 minutes for remote browsers.
    - The error can also be caused by network issues or remote device failure. Make sure that the connection is stable and the remote device can be reached.
    

    As per suggestion here I set

    DEBUG=hammerhead:*,testcafe:*
    

    And the log is:

    021-07-07T15:23:44.572Z testcafe:utils:temp-directory Found temp directories: []
    2021-07-07T15:23:44.574Z testcafe:utils:temp-directory Temp directory path:  /tmp/testcafe/chrome-profile-128Nvnnsbk1AEpG
    2021-07-07T15:23:44.587Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:46.423Z testcafe:compiler:typescript version: 3.9.10
    2021-07-07T15:23:46.425Z testcafe:compiler:typescript options: [Object: null prototype] {
      experimentalDecorators: true,
      emitDecoratorMetadata: true,
      allowJs: true,
      pretty: true,
      inlineSourceMap: true,
      noImplicitAny: false,
      module: 1,
      moduleResolution: 2,
      target: 3,
      jsx: 2,
      suppressOutputPathCheck: true,
      skipLibCheck: true
    }
    2021-07-07T15:23:48.119Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.120Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.121Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.122Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.124Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.221Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.222Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.223Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.224Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.225Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.226Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.227Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.228Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.230Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.232Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.232Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.234Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.235Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.236Z testcafe:compiler:typescript path: "typescript"
    2021-07-07T15:23:48.245Z testcafe:bootstrapper tests compilation took 3.67 s
    2021-07-07T15:25:44.563Z testcafe:browser:connection:469Ca~Y status changed to 'closing'
    2021-07-07T15:25:44.585Z testcafe:browser:connection:469Ca~Y TypeError: Cannot read property 'config' of undefined
        at BrowserProviderPluginHost.isHeadlessBrowser (/app/node_modules/testcafe/src/browser/provider/built-in/dedicated/base.js:65:51)
        at BrowserProvider.canUseDefaultWindowActions (/app/node_modules/testcafe/src/browser/provider/index.ts:260:53)
        at BrowserProvider.closeBrowser (/app/node_modules/testcafe/src/browser/provider/index.ts:323:44)
        at BrowserConnection._closeBrowser (/app/node_modules/testcafe/src/browser/connection/index.ts:208:13)
        at BrowserConnection.close (/app/node_modules/testcafe/src/browser/connection/index.ts:410:9)
        at Function._closeConnection (/app/node_modules/testcafe/src/runner/browser-set.ts:55:9)
        at async Promise.all (index 0)
        at BrowserSet.dispose (/app/node_modules/testcafe/src/runner/browser-set.ts:163:9)
        at Function.from (/app/node_modules/testcafe/src/runner/browser-set.ts:108:13)
        at async Promise.all (index 0)
    2021-07-07T15:25:44.586Z testcafe:browser:connection:469Ca~Y status changed to 'closed'
    

    I had the chance to get the logs in our proxy server, and found out this entry coming from the ip in semaphore where the container is running:

    TCP_DENIED/403 4464 GET http://172.17.0.2:1337/browser/connect/sYNp3vU - HIER_NONE/- text/html
    

    Denying access to that request is logical as it points to a local network address.

    Incidentally I tried using firefox:headless just in case but found out that the --proxy option is completely ignored.

    What is the Expected behavior?

    I would expect the hammerhead proxy to issue requests to our proxy with the urls that our tests are visiting, not a local ip address.

    Your Environment details:

    • testcafe version: 1.14.2
    • node.js version: 14.16.1
    • command-line arguments: docker run --rm -v ~/results:/app/results --env HTTP_PROXY=$HTTP_PROXY $ECR_REPO:$TESTCAFE_IMAGE chromium:headless --proxy $HTTP_PROXY
    • platform and version: Linux Ubuntu 18.04.1 VM in Semaphore
    • other:
    STATE: Need clarification 
    opened by ejosafat 51
  • Unable to run tests due to a TypeError when using nodejs 14.15.0 with the latest TestCafe version (2.2.0)

    Unable to run tests due to a TypeError when using nodejs 14.15.0 with the latest TestCafe version (2.2.0)

    What is your Scenario?

    Run tests using the latest TestCafe version (2.2.0)

    What is the Current behavior?

    There is an error that prevents to run tests for all browsers when using the latest TestCafe version (2.2.0).

    The error is:

    ERROR TypeError: dns_1.default.setDefaultResultOrder is not a function at new Proxy (/Users/ayemelyanenko/testcafe-examples/node_modules/testcafe-hammerhead/lib/proxy/index.js:75:23) at new TestCafe (/Users/ayemelyanenko/testcafe-examples/node_modules/testcafe/src/testcafe.js:30:30) at Object.construct (/Users/ayemelyanenko/testcafe-examples/node_modules/import-lazy/index.js:19:20) at createTestCafe (/Users/ayemelyanenko/testcafe-examples/node_modules/testcafe/src/index.js:93:22) at processTicksAndRejections (internal/process/task_queues.js:93:5) at runTests (/Users/ayemelyanenko/testcafe-examples/node_modules/testcafe/src/cli/cli.js:92:22) at cli (/Users/ayemelyanenko/testcafe-examples/node_modules/testcafe/src/cli/cli.js:196:13)

    What is the Expected behavior?

    User should be able to run tests on all browsers when using the latest TestCafe version (2.2) and when using either npm or yarn.

    What is your public website URL? (or attach your complete example)

    https://github.com/DevExpress/testcafe-examples

    What is your TestCafe test code?

    The test examples are present in the attached repo from DevExpress

    Your complete configuration file

    No response

    Your complete test report

    No response

    Screenshots

    No response

    Steps to Reproduce

    1. Clone https://github.com/DevExpress/testcafe-examples
    2. npm uninstall existing testcafe version (2.1)
    3. npm install testcafe to get the latest TestCafe version (2.2)
    4. Attempt to run tests by using npm test

    TestCafe version

    2.2.0

    Node.js version

    14.15.0

    Command-line arguments

    npm test

    Browser name(s) and version(s)

    No response

    Platform(s) and version(s)

    No response

    Other

    No response

    TYPE: bug STATE: Need response 
    opened by ayemelyanenko-chegg 3
  • Add ability to repeat the test specified number of times

    Add ability to repeat the test specified number of times

    What is your Scenario?

    Unstable tests are an unfortunate truth about E2E testing. During my experience with TestCafe, I discovered a technique to reliably check the test stability and reproduce a decent amount of rare failures: wrap the test in a for-loop, only the test, run the parent fixture with medium to high concurrency.

    What this helps to uncover:

    1. Application race conditions. Actual bugs to fix, the tests did their job.
    2. Rate limiting issues (for example, Stripe).
    3. Suboptimal lazy content loading assertions in tests.

    What are you suggesting?

    The ability to run a specific test an arbitrary number of times in order to sample the test stability seems like a good fit for any test runner. Add a new runner option repeat (or something like that). Since TestCafe comes with its own test runner, it would be really handy to have such a feature.

    What alternatives have you considered?

    • Manually modify the test suite. Pros: can be done with the current TestCafe. Cons: not suitable for CI; limited discoverability by other developers, resulting in an overall more unstable suite.
    • Modify the test suite at the AST level. Pros: can be automated; can be done with the current TestCafe. Cons: requires custom instrumentation.
    • Run the test suite multiple times with shell scripting. Pros: can be automated; can be done with the current TestCafe. Cons: significant overhead, increasing overall run time; reduced CPU utilization.

    Additional context

    No response

    TYPE: enhancement STATE: Need response 
    opened by Klaster1 4
  • Hammerhead failed to setAttribute on Element

    Hammerhead failed to setAttribute on Element

    What is your Scenario?

    I am trying to click a button that opens up an Integry modal but during automation I keep receiving this error:

    Screenshot 2022-12-27 at 10 42 43 AM

    It also doesn't work when unlocking the window and clicking it manually, but it does work fine when clicking it manually outside of automation.

    What is the Current behavior?

    An error gets thrown at t.setAttributeCore (http://localhost:65062/hammerhead.js:10:28517) when clicking the button.

    What is the Expected behavior?

    Clicking the button opens the Integry modal without any issues.

    What is your public website URL? (or attach your complete example)

    DevExpress has access to our repo. Please email me if re-authentication is necessary.

    What is your TestCafe test code?

    integrations_page_tests.js

    test
        .meta({ created_on: '12/27/22', created_by: 'Justin Grabenbauer', updated_on: '', updated_by: '' })
        .meta({ scope: 'sanity', priority: 'low', showstopper: 'no', github_ID: '1585' })
        ('user_can_add_an_integration', async t => {
            
            // Purpose: To verify that a user can add an integration
    
            const integration_name = 'ClickFunnels Classic'
    
            await WorkspaceMainNavPageObjects.navigate_to_workspace_settings()
            await SettingsPageObjects.navigate_to_integrations_page()
            await t.debug()
            await IntegrationsPageObjects.connect_integration(integration_name)
    })
    

    integrations_page_repo.js

    import { Selector, t } from 'testcafe'
    
    
    class IntegrationsPageObjects {
        constructor() {
            this.btn_connect_integration = Selector('button').withText('Connect integration')
        }
    
        async connect_integration(integration_name) {
    
            // Purpose: To connect an integration
    
            await t
                .click(this.btn_connect_integration)
                .click(Selector('div').withText(integration_name))
        }
    }
    
    export default new IntegrationsPageObjects()
    

    Your complete configuration file

    require('dotenv').config()
    const data = require('./data/data.json')
    const { RequestLogger } = require('testcafe')
    
    // TODO: See if we can make this part local to a function instead of out in the open, globally.
    // Set the URL for where we want to start logging
    let logger_url = data.api_endpoints.notifications_dropdown
    
    switch(process.env.ENV) {
        case 'staging':
            logger_url = data.authenticated_urls.staging.concat(logger_url)
            break
    
        case 'production':
            logger_url = data.authenticated_urls.production.concat(logger_url)
            break
        }
        
    const notifications_dropdown_logger = RequestLogger(logger_url)
    
    // Agnostic for all environments
    let skipped_tests = [
    
        // Located in all_contacts_page_tests.js
        'user_can_modify_contacts_table_columns', // 12-19-22
        
        // Located in all_products_page_tests.js
        'user_can_create_a_subscription_product', // 09-27-22
        'user_can_set_a_price_for_physical_products', // 09-27-22
    
        // Located in apps_page_tests.js
        'user_cannot_access_sites_when_feature_is_disabled', // 07-28-22
        'user_cannot_access_settings_when_feature_is_disabled', // 07-28-22
        'user_cannot_access_analytics_when_feature_is_disabled', // 09-16-22
        'user_cannot_access_marketing_when_feature_is_disabled', // 09-16-22
        'user_cannot_access_products_when_feature_is_disabled', // 09-16-22
        'user_cannot_access_contacts_when_feature_is_disabled', // 09-16-22
        'user_cannot_access_orders_when_feature_is_disabled', // 09-16-22
        'user_cannot_access_sales_when_feature_is_disabled', // 09-16-22
    
        // Located in billing_page_tests.js
        'user_can_navigate_to_billing_page', // 08-22-22
    
        // Located in blog_page_tests.js
        'user_is_able_to_change_blog_template', // 12-06-22
        'user_can_add_a_gif_to_blog', // 11-30-22
        'user_can_change_blog_post_style', // 12-06-22
        'user_can_clone_a_blog_post', // 11-30-22
        'user_can_create_a_blog_post', // 11-30-22
        'user_can_edit_blog_settings', // 07-06-22
        'user_can_edit_existing_blog_post_information', // 11-30-22
        
        // Located in courses_page_tests.js
        'courses_back_button_navigates_to_previous_page',
        'optin_user_can_navigate_through_course', // 12-06-22
        'user_can_log_into_customer_center_with_magic_link',
    
        // Located in dashboard_page_tests.js
        'user_can_navigate_to_forms_page_from_dashboard', // 11-22-22
        'user_can_navigate_to_payouts_page_from_dashboard', // 11-22-22
    
        // Located in funnels_page_tests.js
        'user_can_clone_a_funnel',
        'user_can_navigate_through_funnel',
        
        // Located in marketing/broadcasts_page_tests.js
        'user_can_create_new_broadcast', // 06-20-22
    
        // Located in marketing/templates_page_tests.js
        'user_can_create_broadcast_template', // 06-13-22
    
        // Located in orders/all_orders_page_tests.js
        'user_can_refund_order', // 10/18/22
    
        // Located in orders/order_page_tests.js
        'user_is_able_to_create_new_order', // 09-27-22
        'user_is_able_to_complete_payment_on_order', // 09-27-22
        'user_is_able_to_partially_pay_order', // 09-27-22
        'user_is_able_to_refund_order', // 09-27-22
        'user_is_able_to_set_delayed_status_on_order', // 09-27-22
        'user_is_able_to_set_processing_status_on_order', // 09-27-22
        'user_is_able_to_set_packed_status_on_order', // 09-27-22
        'user_is_able_to_set_ready_status_on_order', // 09-27-22
        'user_is_able_to_set_delivered_status_on_order', // 09-27-22
        'user_is_able_to_set_shipped_status_on_order', // 09-27-22
        'user_is_able_to_set_backorder_status_on_order', // 09-27-22
        'user_is_able_to_set_pending_status_on_order', // 09-27-22
        'user_is_able_to_set_lost_status_on_order', // 09-27-22
        'user_can_add_multiple_fulfillments_to_order', // 09-27-22
        'user_can_partially_fulfill_order', // 08-11-22
    
        // Located in pages_page_tests.js
        'user_can_pin_a_page_from_edit_page', //07-29-22
    
        // Located in pipelines_page_tests.js
        'user_can_navigate_to_pipelines_page', // 09/14/22
    
        // Located in reporting_page_tests.js
        'opt-ins_by_landing_page_report_displays', // 06/21/22
    
        // Located in sites_overview_page_tests.js
        'user_can_add_header_to_site', // 07-06-22
        'user_can_change_site_style', // 10-31-22
        'user_can_edit_site_name', // 10-04-22
        'user_can_make_site_password_protected', // 10-03-22
    
        // Located in themes_page_tests.js
        'user_can_edit_theme_name', // 08-08-22
    
        // Located in url_redirects_page_tests.js
        'user_can_delete_a_url_redirect', // 11-30-22
        'user_is_able_to_edit_url_redirect' // 11-30-22
    ]
    
    // Cleanup scripts that need to be skipped, but can't be in the skipped tests
    let clean_up_tests = [
        // Located in clean_up_scripts.js
        'clean_up_copies_of_funnels',
        'clean_up_copies_of_funnel_pages',
        'clean_up_copies_of_pages', 
        'clean_up_products',
        'clean_up_site_pages',
        'clean_up_workflows',
        'dismiss_notifications',
        'clean_up_collaborators',
    ]
    
    // Production specific scripts needing to be skipped for various reasons
    let production_skipped_tests = [
        'user_can_navigate_to_affiliate_center_page', // Disabling because the link is disabled in production as of 12/07/22
        'user_can_navigate_to_order_tags_page', // Link disabled through Launch Darkly as of 08/29/22
        'user_can_navigate_to_payments_ai_dashboard', // Production PAI account not set up as of 08/29/22
        'user_is_able_to_navigate_to_the_inbox_page', // Inbox link is not activated in production as of 08/31/22
        'customer_can_place_order_through_funnel', // Disabling until we have PAI set up in production as of 10/04/22
        'user_can_navigate_to_sequences_page', // Disabling because it's behind a feature gate in produciton as of 10/17/22
        'user_can_navigate_to_events_and_deadlines_page', // Disabling because the link is disabled in production as of 11/28/22
        'user_can_navigate_to_community_page' // Disabling because the link doesn't display in production as of 12/21/22
    ]
    
    // Scripts that need to run with a single concurrency
    let isolated_tests = [
        // Located in sites_overview_page_tests.js
        'user_can_make_site_public',
        'user_can_edit_site_name',
        'user_can_make_site_password_protected',
        'user_can_make_site_private',
        'user_can_edit_site_domain',
        'changing_site_domain_updates_funnel_urls',
        'changing_site_domain_updates_blog_urls',
        'changing_site_domain_updates_course_urls',
        'user_can_add_header_to_site',
    
        // Located in account_details_page_tests.js
        'user_can_edit_account_name',
        'user_can_edit_account_password',
        'user_can_change_account_language',
    
        // Located in general_page_tests.js
        'user_can_edit_workspace_details',
    
        // Located in blog_page_tests.js
        'user_can_edit_blog_settings',
    
        // Located in themes_page_tests.js
        'user_can_promote_theme_to_live_from_index_page',
        'user_can_promote_theme_to_live_from_overview_page',
    
        // Located in the workflow_builder_page_tests.js
        'broadcast_room_category_pulls_back_expected_pages',
        'downsell_category_pulls_back_expected_pages',
        'landers_category_pulls_back_expected_pages',
        'my_funnel_pages_category_pulls_back_expected_pages',
        'opt_in_category_pulls_back_expected_pages',
        'order_category_pulls_back_expected_pages',
        'order_confirmation_category_pulls_back_expected_pages',
        'sales_category_pulls_back_expected_pages',
        'terms_of_service_category_pulls_back_expected_pages',
        'thank_you_category_pulls_back_expected_pages',
        'upsell_category_pulls_back_expected_pages',
        'webinar_confirmation_category_pulls_back_expected_pages',
        'webinar_registration_category_pulls_back_expected_pages'
    ]
    
    // Filter that joins the skipped scripts with the production skipped tests
    let production_filter = skipped_tests.concat(production_skipped_tests).concat(clean_up_tests)
    
    // Filter that joins ALL filtered scripts so that they are not run for a full suite
    let full_filter = skipped_tests.concat(isolated_tests).concat(clean_up_tests)
    
    let build_filter = () => {
    
        // Purpose: To set the suite that we want to run. (isolated, regression, sanity)
    
        var filter = {}
        
        switch(process.env.ENV) {
            case 'production':
                if(process.env.SCOPE) {
                    filter = {
                        testGrep: `^(?!.*(${production_filter.join('|')})).*$`,
                        testMeta: {
                            scope: process.env.SCOPE
                        }
                    }
                }
                break
            case 'staging':
                if(process.env.SCOPE) {
                    filter = {
                        testGrep: `^(?!.*(${skipped_tests.join('|')})).*$`, 
                        testMeta: {
                            scope: process.env.SCOPE
                        }
                    }
                } else {
                    filter = {
                        testGrep: `^(?!.*(${full_filter.join('|')})).*$`
                    }
                }
                break
        }
    
        return filter
    }
    
    let determine_concurrency = () => {
    
        // Purpose: To set concurrency dependant on the scope that is passed
        
        let concurrency = 5
        if (process.env.SCOPE == 'isolated') {
            concurrency = 1
        } 
        return concurrency
    }
    
    module.exports = {
        assertionTimeout: 5000,
        browsers: [
            "chrome:headless --window-size=1920,1159"
        ],
        concurrency: determine_concurrency(),
        cache: true,
        clientScripts: [
            "scripts/click_expand_all_for_courses_details_page.js"
        ],
        disableMultipleWindows: true,
        filter: build_filter(),
        hooks: {
            fixture: {
                before: async ctx => {
                    // Set the notifications dropdown logger globally
                    ctx.notifications_dropdown_logger = notifications_dropdown_logger
                }
            },
            // Set the request hook for the notifications dropdown logger
            request: notifications_dropdown_logger
        },
        hostname: "localhost",
        pageLoadTimeout: 30000,
        quarantineMode: {
            successThreshold: 1,
            attemptLimit: 2
        },
        reporter: [
            {
                name: "spec",
                output: "artifacts/reports/spec_results"
            },
            {
                name: "xunit",
                output: "artifacts/reports/xunit_results.xml"
            }, 
            {
                name: "testrail"
            }
        ],
        runExecutionTimeout: 1800000,
        screenshots: {
            path: "artifacts/screenshots",
            pathPattern: "${TEST}_${DATE}_${TIME}.png",
            takeOnFails: true,
            thumbnails: false
        },
        selectorTimeout: 5000,
        skipJsErrors: true,
        skipUncaughtErrors: true,
        src: "tests/**",
        testExecutionTimeout: 240000
    }
    

    Your complete test report

    Running tests in:

    • Chrome 108.0.0.0 / Ventura 13

    settings - integrations ✖ user_can_add_an_integration (screenshots: /Users/justingrabenbauer/cf2-test-cafe-poc/artifacts/screenshots/user_can_add_an_integration_2022-12-27_10-49-53.png)

    1. The specified selector does not match any element in the DOM tree.

        | Selector('div')  > | .withText('ClickFunnels Classic')

      Browser: Chrome 108.0.0.0 / macOS 10.15.7 Screenshot: /Users/justingrabenbauer/cf2-test-cafe-poc/artifacts/screenshots/user_can_add_an_integration_2022-12-27_10-49-53.png

      11 | 12 | // Purpose: To click the Connect integration button 13 | 14 | await t 15 | .click(this.btn_connect_integration)

      16 | .click(Selector('div').withText(integration_name)) 17 | } 18 |} 19 | 20 |export default new IntegrationsPageObjects() 21 |

      at (/Users/justingrabenbauer/cf2-test-cafe-poc/pom/settings/integrations/integrations_page_repo.js:16:14) at asyncGeneratorStep (/Users/justingrabenbauer/cf2-test-cafe-poc/pom/settings/integrations/integrations_page_repo.js:2:258) at _next (/Users/justingrabenbauer/cf2-test-cafe-poc/pom/settings/integrations/integrations_page_repo.js:2:596) at (/Users/justingrabenbauer/cf2-test-cafe-poc/pom/settings/integrations/integrations_page_repo.js:2:761) at (/Users/justingrabenbauer/cf2-test-cafe-poc/pom/settings/integrations/integrations_page_repo.js:2:502) at IntegrationsPageObjects.connect_integration (/Users/justingrabenbauer/cf2-test-cafe-poc/pom/settings/integrations/integrations_page_repo.js:10:49) at (/Users/justingrabenbauer/cf2-test-cafe-poc/tests/settings/integrations_page_tests.js:45:39) at asyncGeneratorStep (/Users/justingrabenbauer/cf2-test-cafe-poc/tests/settings/integrations_page_tests.js:7:315) at _next (/Users/justingrabenbauer/cf2-test-cafe-poc/tests/settings/integrations_page_tests.js:7:653)

    1/1 failed (1m 17s)

    Warnings (2):

    The "browsers", "concurrency", and "filter" options from the configuration file will be ignored.

    The file at "/Users/justingrabenbauer/cf2-test-cafe-poc/artifacts/screenshots/user_can_add_an_integration_2022-12-27_10-49-53.png" already exists. It has just been rewritten with a recent screenshot. This situation can possibly cause issues. To avoid them, make sure that each screenshot has a unique path. If a test runs in multiple browsers, consider including the user agent in the screenshot path or generate a unique identifier in another way.

    Screenshots

    No response

    Steps to Reproduce

    1. Run script
    2. Check console

    TestCafe version

    2.0.0

    Node.js version

    18.12.0

    Command-line arguments

    ENV=staging testcafe "chrome '--window-size=1920,1159'" -t 'user_can_add_an_integration' -c1

    Browser name(s) and version(s)

    Chrome 108

    Platform(s) and version(s)

    macOS Ventura 13

    Other

    No response

    TYPE: bug SYSTEM: hammerhead FREQUENCY: level 1 
    opened by Jgrabenbauer 1
  • `experimentalProxyless` option breaks the selectors from the `@testing-library/testcafe`

    `experimentalProxyless` option breaks the selectors from the `@testing-library/testcafe`

    What is your Scenario?

    Enabling the experimentalProxyless option breaks any selectors from the @testing-library/testcafe.

    What is the Current behavior?

    Just created a simple project based on the NextJS and passed experimentalProxyless: true to the testcafe options. And I get the following error from the simple test. Error: Cannot call method 'queryByRole' of undefined

    What is the Expected behavior?

    Selectors from @testing-library/testcafe should work experimentalProxyless option.

    What is your public website URL? (or attach your complete example)

    https://github.com/Roy412/msw-testcafe-error/tree/testing_library_compatibility

    What is your TestCafe test code?

    import { screen } from "@testing-library/testcafe";
    
    fixture("Rest").page`http://localhost:3000/`;
    
    test("should render the page correctly", async (t) => {
      await t
        .expect(screen.findByRole('heading',{ name: 'Loading...' }).exists).ok('Page loaded')
    });
    

    Your complete configuration file

    No response

    Your complete test report

    No response

    Screenshots

    Screenshot 2022-12-23 at 6 14 57 AM

    Steps to Reproduce

    1. Clone the repo: https://github.com/Roy412/msw-testcafe-error/tree/testing_library_compatibility
    2. Yarn install: yarn
    3. Run testcafe test: yarn testcafe

    TestCafe version

    2.2.0-rc.1

    Node.js version

    v16.16.0

    Command-line arguments

    NEXT_PUBLIC_IS_TESTCAFE=1 node runtestCafe.js

    Browser name(s) and version(s)

    No response

    Platform(s) and version(s)

    No response

    Other

    No response

    TYPE: bug SYSTEM: proxyless 
    opened by Roy412 3
  • The pageLoadTimeout option doesn't work

    The pageLoadTimeout option doesn't work

    What is your Scenario?

    I'm running tests on a page that takes a long time to load. I use the pageLoadTimeout option to delay running tests until the page is loaded.

    What is the Current behavior?

    Tests are run without waiting for either the timeout specified by the pageLoadTimeout option or the window.onload event.

    What is the Expected behavior?

    Tests should be run within the specified timeout, according to the documentation.

    What is your TestCafe test code?

    import { ClientFunction } from 'testcafe';
    
    fixture `New Fixture`
        .page `localhost:3000`;
    
    test(`New Test`, async t => {
        await ClientFunction(() => console.log('TestCafe test started:', Date.now()))();
    
        await t.debug();
    });
    

    Your complete test report

    изображение

    Steps to Reproduce

    git clone https://github.com/felis2803/testcafe-temp-9 cd testcafe-temp-9 npm i npm test

    Once the browser is launched, open the DevTools console. Watch for messages in the console. There should be 4 of them. If pageLoadTimeout is working properly, the test launch message should be the last one. However, you may notice that it comes second.

    TestCafe version

    2.1.0

    Node.js version

    16.18.0

    TYPE: bug SYSTEM: runner 
    opened by felis2803 0
Releases(v2.2.0)
  • v2.2.0(Dec 29, 2022)

    v2.2.0 (2022-12-29)

    TestCafe v2.2.0 introduces user-defined custom actions and an important experimental capability. Google Chrome users can now enable "proxyless mode" to speed up their test suite.

    Custom Action Support

    TestCafe users can now define custom test actions. Place the definition function in a JavaScript configuration file:

    module.exports = {
      customActions: {
       async makeCoffee (args) {
            await this.click(args);
        }, 
      }
    };
    

    Include custom methods in your tests alongside other TestController methods. Add the customActions prefix when you call the action:

    test('Test with a custom action', async t => {
        await t.click()
            .customActions.makeCoffee()
            .click();
    })
    

    Experimental: Proxyless mode

    TestCafe runs an under-the-hood reverse proxy to automate tests across different browsers. But this technique complicates the framework. Native automation protocols offer superior automation speeds and greater stability. That's why the TestCafe team decided to gradually phase the reverse proxy out in favor of native support for these automation protocols.

    TestCafe v2.2.0 includes an experimental option that disables the proxy for Google Chrome.

    testcafe chrome tests --experimental-proxyless
    

    You can enable this option in the command line interface, the Test Runner API, and the configuration file. Read the Proxyless mode guide for more information.

    Bug Fixes

    • TestCafe doesn't hide the live mode status bar when the bar obstructs the action target (#7384)
    • The 'Target element is overlapped' message does not reference the Selector that caused the warning (#7386)
    • The TestCafe Dashboard reporter includes an outdated uuid dependency (testcafe-reporter-dashboard#111)
    • TestCafe doesn't display the correct error message when the framework throws an exception (#6936)
    • TestCafe retains some cookies after the user requests their deletion (PR testcafe-hammerhead#2818)
    • TestCafe cannot load test pages with the localhost URL on Node.js v17 and up (#7396)
    • TestCafe cannot take screenshots in headless Chrome on Node.js v17 and up (#7408)
    • Web workers that originate from Blob URLs throw an error when they call the importScript function (#7378)
    • TestCafe doesn't set the correct Request header when an iframe points the user to a new URL (#7376, PR testcafe-hammerhead#2813 by @naggingant)
    • TestCafe cannot interact with options that belong to a <select> element with the multiple attribute (PR testcafe-hammerhead#2815)
    Source code(tar.gz)
    Source code(zip)
  • v2.2.0-rc.2(Dec 23, 2022)

  • v2.2.0-rc.1(Dec 19, 2022)

    2.2.0 (2022-12-22)

    Improvement: Custom Test Actions support

    Improvement: Experimental "No Proxy" mode

    Bug Fixes

    • The status bar does not disappear (#7384)
    • Add callsite and selector expression to the overlapped warning message (#7386)
    • Update uuid dependency (testcafe-reporter-dashboard#111)
    • Render correct error text for internal uncaught errors (#6936)
    • fix: fixed cookie synchronization (PR testcafe-hammerhead#2818)
    • TestCafe crashes on Node 18 (#7396)
    • Screenshots fail in Headless Chrome in Node >= 17 (at least on a Mac) (#7408)
    • A JavaScript error occurs on testing a Blazor app page containing Monaco Editor (#7378)
    • Ajax request referrer header altered after iframe loads (#7376)
    • fix: fixed getSelectElementSize (PR testcafe-hammerhead#2815)
    Source code(tar.gz)
    Source code(zip)
    testcafe-2.2.0-rc.1.tar.gz(1.36 MB)
  • v2.1.1-alpha.3(Dec 15, 2022)

    What’s Changed

    • release: publish 2.1.1-alpha.3 (#7420) @miherlosev
    • Introduce CustomActions feature (closes #1535) (#7393) @Artem-Babich
    • proxyless: fix 'window.postMessage' function (#7414) @miherlosev
    • fix: calculate the status bar reactively (closes #7384) (#7407) @AndreyBelym
    Source code(tar.gz)
    Source code(zip)
  • v2.1.1-alpha.2(Dec 6, 2022)

    What’s Changed

    • release: publish 2.1.1-alpha.2 (#7406) @miherlosev
    • proxyless: updated script header processing stuff (#7403) @miherlosev
    • proxyless: fixed hang (#7405) @miherlosev
    • feat: added callsite to the warning with the overlapping element (#7399) @Aleksey28
    • proxyless: add custom status text (#7404) @miherlosev
    • Configuration: proxyless + hostname (#7400) @AlexKamaev
    • deps: update testcafe-reporter-dashboard v0.2.7 (#7392) @aleks-pro
    • proxyless: refactor redirects and csp (#7398) @miherlosev
    Source code(tar.gz)
    Source code(zip)
  • v2.1.1-alpha.1(Nov 29, 2022)

    What’s Changed

    • release: publish 2.1.1-alpha.1 (#7397) @miherlosev
    • rename '--proxyless' to '--experimental-proxyless' (#7394) @AlexKamaev
    • proxyless: more fixes (#7366) @miherlosev
    • proxyless roles (#7368) @AlexKamaev
    • feat: rendered correct error text for internal uncaught errors (#7364) @Aleksey28
    • fix for HH tests (#7369) @AlexKamaev
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0(Nov 10, 2022)

    v2.1.0 (2022-11-10)

    Improvements

    Improved handling of invisible elements

    • Visibility criteria update: TestCafe no longer interacts with elements that have the visibility: collapse attribute.
    • If the action target does not fit the visibility criteria, TestCafe outputs an error message that references the exact reason. (#7310).

    Improved handling of overlapped elements

    • When another element overlaps the center of the action target, TestCafe scans the target element for available points of contact. If the selector timeout ends before TestCafe finds an unobstructed point, TestCafe outputs a warning message and interacts with the topmost element at the center of the original target (#7309).
    • TestCafe v2.1.0 contains an improved algorithm that detects whether extra scrolling can resolve an element obstruction issue. (#6208)

    Bug Fixes

    • In some environments, TestCafe cannot take screenshots when the test runs in a headless Chromium-based browser (#7224).
    • Full-page screenshots in headless Chrome do not include the edges of the page (#5961).
    • TestCafe throws the "TypeError: Illegal invocation" error when the front-end code passes a number value to the Element.insertAdjacentText method (#7352).
    Source code(tar.gz)
    Source code(zip)
  • v2.1.0-rc.1(Nov 3, 2022)

    What’s Changed

    • deps: update testcafe-reporter-dashboard v0.2.7 (#7346) @aleks-pro
    • proxyless: fix sporadic 'Invalid InterceptionId' error. (#7359) @miherlosev
    • feat: added the possibility to disable a cross-domain emulation (#7350) @Aleksey28
    • Fix: Incorrect page size on screenshot in full-page mode in Chrome headless(closes #5961) (#7054) @Artem-Babich
    • feat: upgraded click mechanism on element if offset options isn't set and center isn't available (#7330) @Aleksey28
    • feat: upgraded visibility errors (#7319) @Aleksey28
    • proxyless: small fixes (#7357) @miherlosev
    • proxyless: initial same-domain iframe support (#7349) @miherlosev
    Source code(tar.gz)
    Source code(zip)
  • v2.0.2(Oct 31, 2022)

    v2.0.2 (2022-10-31)

    Bug Fixes

    • TestCafe doesn't include the flags necessary to launch Chrome in a Podman container (PR #7307 by @timnederhoff)
    • TestCafe doesn't warn users when it interacts with an element that obstructs the original action target (#2930)
    • TestCafe incorrectly parses regular expressions passed to the --skip-js-errors CLI flag (#7301)
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Sep 26, 2022)

    v2.0.1 (2022-09-26)

    Bug Fixes

    • TestCafe yields incomplete video recordings in concurrency mode (#7218).
    • Video recordings in concurrency mode yield EPIPE errors that cause crashes (#7216).
    • Running TestCafe 1.20.1 and up with a high concurrency factor may nonetheless result in a MaxListenersExceededWarning warning (#7188).
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1-rc.1(Sep 20, 2022)

    What’s Changed

    • release: get rid of pregenerated token (#7297) @AndreyBelym
    • fix: getReportUrl method doesn't exist for testcafe-reporter-dashboard alpha version (#7290) @aleks-pro
    • build: updated testcafe-browser-provider-browserstack (#7292) @Aleksey28
    • fix: create correct raw-callsite for hooks (#7282) @Aleksey28
    Source code(tar.gz)
    Source code(zip)
    testcafe-2.0.1-rc.1.tgz(1.33 MB)
  • v2.0.1-alpha.2(Sep 9, 2022)

    What’s Changed

    • fix: added creating screenshots even crop fails (#7267) @Aleksey28
    • fix: downgrade testcafe reporter dashboard version (#7273) @aleks-pro
    • proxyless: request error handling (part #1) (#7276) @miherlosev
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1-alpha.1(Sep 6, 2022)

    What’s Changed

    • release: publish 2.0.1-alpha.1 (#7274) @miherlosev
    • fix: forced stdin and stdout formats for ffmpeg (#7272) @Aleksey28
    • fix warning for high concurrency level (closes #7188) (#7271) @miherlosev
    • Add validation for skipJsErrors method argument options (#7270) @Artem-Babich
    • fix video recording in concurrency mode (closes #7218) (#7268) @miherlosev
    • fix: more tolerant error handling for errors raised into reporter plugin methods (#7260) @miherlosev
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Aug 31, 2022)

    v2.0.0 (2022-08-31)

    TypeScript update

    :warning: TestCafe 2.0 includes a breaking change. The framework’s built-in TypeScript compiler has been updated from version 3.9 to version 4.7. The vast majority of TestCafe users should not experience any issues during the upgrade. However, since TypeScript does not follow the semver versioning policy, even minor TypeScript updates contain breaking changes. Some TypeScript users may need to perform additional actions to ensure the compatibility of their test code.

    Read the TestCafe 2.0 Migration Guide to learn more.

    Improvement: New ways to ignore JavaScript errors

    TestCafe v2.0 introduces new ways to ignore JavaScript errors during test runs.

    Two new methods allow you to ignore errors on a per-test or a per-fixture basis.

    • Use the test.skipJsErrors method to ignore JavaScript errors in specific tests.
    • Use the fixture.skipJsErrors method to ignore JavaScript errors for specific fixtures.
    • The t.skipJsErrors action lets you ignore JavaScript errors at specific points in the test.

    For each of the methods above, you can define the following options:

    • The pageUrl option filters errors by page URL.
    • The message option filters errors by message.
    • The stack option filters errors by call stack.

    Read the Skip JavaScript Errors recipe to learn more.

    Source code(tar.gz)
    Source code(zip)
  • v2.0.0-rc.4(Aug 30, 2022)

  • v2.0.0-rc.3(Aug 26, 2022)

  • v2.0.0-rc.2(Aug 26, 2022)

  • v2.0.0-rc.1(Aug 25, 2022)

    What’s Changed

    • release: publish 2.0.0-rc.1 (#7247) @miherlosev
    • Add API for more flexible setting of "skip-js-error" option(closes #2775) (#7192) @Artem-Babich
    • feat: Upgrade Typescript up to 4.x (#7103) @miherlosev
    • test: SUBTITLES should contains defenitions of all test run phases (#7232) @felis2803
    Source code(tar.gz)
    Source code(zip)
  • v1.20.2-alpha.1(Aug 16, 2022)

    What’s Changed

    • release: publish 1.20.2-alpha.1 (#7230) @miherlosev
    • fix: added definition for SUBTITLES[TEST_RUN_PHASE.pendingFinalization] (#7227) @felis2803
    • Temporary turn-off quarantine mode tests for the experimental debug mode (#7229) @miherlosev
    • chore: support of the 'about:blank' page in the proxyless mode (#7222) @miherlosev
    • proxyless: inject resources (part 2) (#7195) @miherlosev
    Source code(tar.gz)
    Source code(zip)
  • v1.20.1(Aug 8, 2022)

    v1.20.1 (2022-08-08)

    Bug Fixes

    • Running 11 or more tests concurrently causes a memory leak (#7188).
    • TestCafe cannot switch to iframes that descend from a shadowRoot element (#3673).
    • TestCafe attempts to execute JSON files without fixture and test definitions (PR #7187).
    • TestCafe incorrectly processes request hooks that return status code 500 (#7213)
    Source code(tar.gz)
    Source code(zip)
  • v1.20.1-rc.2(Aug 4, 2022)

    What’s Changed

    • fix: revert utilites (#7209) @miherlosev
    • fix: 'Memory leak on running more than 11 tests' (close #7188) (#7199) @miherlosev
    • Added Tesults to Custom Reporters in README.md (#7193) @ajeetd
    Source code(tar.gz)
    Source code(zip)
  • v1.20.1-rc.1(Jul 27, 2022)

    What’s Changed

    • ignore json files which do not contain test/fixtures (#7187) @AlexKamaev
    • chore: inject resources with CDP (#7186) @miherlosev
    • fix: supported switching to iframes that are places in a Shadow Root (#7139) @Aleksey28
    • chore: remove old proxyless implementation 4 (#7133) @miherlosev
    Source code(tar.gz)
    Source code(zip)
  • v1.20.0(Jul 18, 2022)

    v1.20.0 (2022-07-14)

    :warning: Warning: Impending breaking change. TestCafe v1.20 is the final version of the framework to support TypeScript 3. The next update will abandon TypeScript 3 in favor of TypeScript 4.

    API Testing

    TestCafe v1.20.0 includes a comprehensive set of server-side API testing tools. You can add dedicated API tests to your test suite or include API testing methods in existing functional tests.

    The new request test action executes an HTTP request and returns the server's response.

    const responseBody = await t.request(`http://localhost:3000/helloworld`).body;
     
    t.expect(responseBody).contains('Hello World') // true
    

    Read the API Testing Guide for a full overview of the framework's API testing capabilities.

    Global Starting URL

    You can now define a single starting URL for all the tests in your test suite.

    Declare the baseUrl in one of the following three ways:

    Once you define a baseUrl, you can omit fixture and test URLs entirely, or define them relative to your baseUrl:

    "baseUrl": "https://devexpress.github.io/testcafe"
    
    fixture`Test structure`
        .page`./example`; // starts at https://devexpress.github.io/testcafe/example
    

    Experimental: Chrome User Flow Replays

    TestCafe v1.20.0 introduces experimental, limited support for Google Chrome user flow recordings.

    Record page actions in Google Chrome and export the recording as a JSON file. Pass the path to the test file as an argument:

    testcafe all recording.json
    

    TestCafe will play the recording back and generate a test report.

    Read the User Flow Recordings guide to learn more.

    Coming soon: TypeScript 4

    The next version of TestCafe will adopt TypeScript 4 and lose compatibility with TypeScript 3.X.

    To indicate the breaking change, we will increment the framework's major version number - from 1 to 2.

    TestCafe 2.0 will be released later this month.

    Improvements

    • Better Google Chrome video capture

      TestCafe v1.20.0 uses the Screen Capture API to record videos of Google Chrome test runs. This results in a significantly better test recording framerate and image quality.

    Screen capture comparison GIF

    Bug Fixes

    • When the t.typeText action raises an error, TestCafe mistakenly awaits the target element for the second time (#6623).
    • Concurrent test runs do not always generate concurrent test run reports (#7062).
    • TestCafe doesn't properly handle errors raised inside the requestMock function (#6703).
    • The default terminal viewport width is too low for non-tty terminals (Issue #5919, PR #6930 by @PayBas).
    • TestCafe cannot switch to an invisible iframe (#4558).
    • Some SVGs don't meet the visibility criteria (#6998).
    • The framework includes an incomplete TypeScript definition (PR #7069 by @karolnowinski).
    Source code(tar.gz)
    Source code(zip)
  • v1.20.0-rc.1(Jul 8, 2022)

    What’s Changed

    • Add baseUrl option (closes #1932) (#6894) @Artem-Babich
    • feat: modified raw-command-callsite-record for the assertions (#7121) @Aleksey28
    • feat: added the fixture option to the testRunInfo of the reportTestDone method (#7125) @Aleksey28
    • feat: added api testing (#6974) @Aleksey28
    • feat: added actionId to the screenshot information (#7122) @Aleksey28
    • Fix: Incorrect cloud provider links are shown in report errors when running test in concurrency mode(closes #4346) (#7132) @Artem-Babich
    • chore: fix moment vulnerability (#7135) @miherlosev
    • chore: update hammerhead (#7134) @miherlosev
    • chore: remove old proxyless implementation (3) (#7130) @miherlosev
    • chore: remove old proxy implementation (part 2) (#7123) @miherlosev
    • chore: remove old proxyless implementation (part 1) (#7120) @miherlosev
    • json compiler: add replace option + escape special characters (#7095) @AlexKamaev
    • fix: prevented waiting element in the second time if an error was raised in the first (#7111) @Aleksey28
    • fix: error doesn't handle in the respond of the RequestMock (#7112) @miherlosev
    • update gherkin-testcafe link in documentation (#7109) @Arthy000
    • chore: update hammerhead (#7104) @miherlosev
    • feat: added the skipped option to the testStartInfo of the reportTestStart method (#7105) @Aleksey28
    • fix: fixed start test before task starting finishes (#7102) @Aleksey28
    • fix: fixed merging dashboard options (#7099) @Aleksey28
    Source code(tar.gz)
    Source code(zip)
  • v1.20.0-alpha.1(Jun 16, 2022)

    What’s Changed

    • Fix ts defs for request/response data interface (#7069) @karolnowinski
    • refactor: added overlap config dashboard options with env options (#7087) @Aleksey28
    • experimental dev tools json compiler support (#7052) @AlexKamaev
    • build: updated testcafe-hammerhead (#7066) @Aleksey28
    • Use Infinity width for non-TTY streams (#6930) @PayBas
    • feat: added permanent sending screenshots with errors to the dashboard reporter independent on users options (#7035) @Aleksey28
    • use Screencast API for video recording in chrome (#7047) @miherlosev
    • Change link to the dashboard documentation (#7059) @miherlosev
    • Fix: Incorrect local and BrowserStack OS version obtained from the user-agent(closes #7006) (#7041) @Artem-Babich
    • Allow switching to an invisible iframe(closes #4558) (#7020) @Artem-Babich
    • refix visibility check for SVG elements (#7042) @miherlosev
    • Fix incorrect option name (#7048) @miherlosev
    Source code(tar.gz)
    Source code(zip)
  • v1.19.0(May 26, 2022)

    TestCafe v1.19.0 released

    TestCafe v1.19.0 introduces three major capabilities: a Cookie Management API, suite-wide test hooks, and suite-wide request hooks.

    New Capabilities

    Cookie Management

    Previous versions of TestCafe lacked dedicated cookie management methods. Users had to write custom client functions to add and remove cookies. This technique was complicated and, at times, limiting. Some cookie manipulation actions --- such as HTTP-only cookie management --- were very hard to integrate into the test suite.

    The latest version of the framework includes a proper set of cookie management tools that can handle a wide variety of tasks. Learn more about the new methods in our documentation: deleteCookies, getCookies, setCookies.

    fixture('[API] Delete Cookies')
       .page('https://devexpress.github.io/testcafe/example/');
    test('Should delete all the cookies with the specified url', async t => {
       // Set a cookie for the examples page.
       await t.setCookies({ name: 'apiCookie1', value: 'value1' });
       // Set a cookie for the 'thank you' page.
       await t.setCookies({
           name:  'apiCookie2',
           value: 'value2',
       }, 'https://devexpress.github.io/testcafe/example/thank-you.html');
       // Check the cookies.
       let cookies = await t.getCookies();
       await t
           .expect(cookies.length).eql(2)
           .expect(cookies[0]).contains({ name: 'apiCookie1', path: '/testcafe/example/' })
           .expect(cookies[1]).contains({ name: 'apiCookie2', path: '/testcafe/example/thank-you.html' });
        // Delete cookies from the 'thank you' page.
        await t.deleteCookies({ domain: 'devexpress.github.io', path: '/testcafe/example/thank-you.html' });
        // Check the cookies.
        cookies = await t.getCookies();
        await t
            .expect(cookies.length).eql(1)
            .expect(cookies[0]).contains({ name: 'apiCookie1', path: '/testcafe/example/' });
    });
    

    Global Test Hooks

    Many TestCafe users employ test hooks --- functions that run before and after tests and fixtures. In TestCafe v1.19.0 and higher, you can attach hooks to test runs, as well as apply test hooks to your entire suite. This capability requires the use of a JavaScript configuration file.

    Learn more about hooks from our newly updated hook guide.

    Global Request Hooks

    Request hooks are functions that intercept HTTP requests and mock HTTP responses. Earlier versions of TestCafe let you attach request hooks to one test or fixture at a time. You can now define global request hooks and attach them to multiple tests or fixtures in your suite.

    Read the Request Hooks guide to learn more.

    Bug Fixes

    • TestCafe ignores CLI browser arguments when they conflict with the configuration file (#6618)
    • The outdated moment.js dependency contains a critical vulnerability (PR #6996 by @vergilfromadyen)
    • TestCafe proxy doesn't always serve cookies with the secure attribute (testcafe-hammerhead/#2715)
    Source code(tar.gz)
    Source code(zip)
  • v1.19.0-rc.2(May 24, 2022)

  • v1.19.0-rc.1(May 23, 2022)

    What’s Changed

    • release: fix publishing issues (#7043) @AndreyBelym
    • fix 'The test hangs on the drag action' (closes #7036) (#7038) @miherlosev
    • Hide dashboard-related stuff (#7037) @miherlosev
    • fix TypeScript definitions for the 'quarantineMode' runner option (#7034) @miherlosev
    • Fix 'ERESOLVE' errors of the 'npm i' command (#7033) @miherlosev
    • Run the 'testcafe dashboard on|off' command in case of non-existing token (#7027) @miherlosev
    • Change text formatting for the 'testcafe dashboard' command (#7025) @miherlosev
    Source code(tar.gz)
    Source code(zip)
  • v1.19.0-alpha.3(May 13, 2022)

  • v1.19.0-alpha.2(May 12, 2022)

    What’s Changed

    • refactor: make dashboards ads more selective (#7018) @Aleksey28
    • 'testcafe dashboard' command (#6975) @miherlosev
    • feat: added cookies API definitions (#6903) @Aleksey28
    Source code(tar.gz)
    Source code(zip)
Demo Selenium JavaScript E2E tests (end-to-end web browser automation tests)

Demo Selenium JavaScript E2E tests (end-to-end web browser automation tests)

Joel Parker Henderson 1 Oct 9, 2021
Simple JavaScript testing framework for browsers and node.js

A JavaScript Testing Framework Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any Ja

Jasmine 15.5k Jan 2, 2023
🔮 An easy-to-use JavaScript unit testing framework.

QUnit - A JavaScript Unit Testing Framework. QUnit is a powerful, easy-to-use, JavaScript unit testing framework. It's used by the jQuery project to t

QUnit 4k Jan 2, 2023
Delightful JavaScript Testing.

?? Delightful JavaScript Testing ????‍?? Developer Ready: A comprehensive JavaScript testing solution. Works out of the box for most JavaScript projec

Facebook 41k Jan 4, 2023
Simple interactive HTTP response mocker, useful for testing API callouts.

Simple interactive HTTP response mocker, useful for testing API callouts.

null 1 Jul 1, 2022
The goal of this app is to make user life easier while testing their own apps

Manual testing app The goal of this app is to make user life easier while testing their own apps. It is used to create the testing workflow, record te

null 1 Jan 2, 2023
JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage

JSCover - A JavaScript code coverage measurement tool. JSCover is an easy-to-use JavaScript code coverage measuring tool. It is an enhanced version of

null 392 Nov 20, 2022
☕️ simple, flexible, fun javascript test framework for node.js & the browser

☕️ Simple, flexible, fun JavaScript test framework for Node.js & The Browser ☕️ Links Documentation Release Notes / History / Changes Code of Conduct

Mocha 21.8k Dec 30, 2022
tap-producing test harness for node and browsers

tape tap-producing test harness for node and browsers example var test = require('tape'); test('timing test', function (t) { t.plan(2); t.eq

James Halliday 5.7k Dec 18, 2022
Node.js test runner that lets you develop with confidence 🚀

AVA is a test runner for Node.js with a concise API, detailed error output, embrace of new language features and process isolation that lets you devel

AVA 20.2k Jan 1, 2023
A single tab web browser built with puppeteer. Also, no client-side JS. Viewport is streamed with MJPEG. For realz.

:tophat: A single tab web browser built with puppeteer. Also, no client-side JS. Viewport is streamed with MJPEG. For realz.

Cris 23 Dec 23, 2022
A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Prisma ORM. Deploys to Fly.io

Live Demo · Twitter A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Pris

Remix Stacks 18 Oct 31, 2022
Free and open fair-code licensed node based Workflow Automation Tool. Easily automate tasks across different services.

n8n - Workflow Automation Tool n8n is an extendable workflow automation tool. With a fair-code distribution model, n8n will always have visible source

n8n - Workflow Automation 27.2k Dec 30, 2022
Tool to automate making Reddit accounts, written in Node.

redgen Tool to automate making Reddit accounts, written in Node. installation & configuration NOTE: This program requires that you have a 2Captcha acc

aria 3 Sep 1, 2022
AREX: It is a “Differential Testing” and “Record and Replay Testing” Tool.

AREX: It is a “Differential Testing” and “Record and Replay Testing” Tool. Test restful API by record, replay and stub request/response. Differential

ArexTest 15 Nov 1, 2022
End-to-end testing framework written in Node.js and using the Webdriver API

Nightwatch.js Homepage | Getting Started | Developer Guide | API Reference | About Automated end-to-end testing framework powered by Node.js and using

Nightwatch.js 11.3k Jan 7, 2023
Create front end projects from templates, add dependencies, and automate the resulting projects

volo Create browser-based, front-end projects from project templates, and add dependencies by fetching them from GitHub. Once your project is set up,

volojs 1.4k Jan 2, 2023
A Web end-to-end testing framework.

一款舒适的自动化测试框架 文档 XBell 站点 特性 基于 playwright 的异步测试框架 基于 TypeScript 提供多功能装饰器 多套数据环境支持 快速开始 # 初始化一个项目 $ npm create xbell # 进入项目 $ cd <your-project-name> #

X-Bell 10 Dec 15, 2022
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

?? Playwright Documentation | API reference Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit w

Microsoft 46.3k Jan 9, 2023