Gathering detailed insights and metrics for testcafe
Gathering detailed insights and metrics for testcafe
Gathering detailed insights and metrics for testcafe
Gathering detailed insights and metrics for testcafe
A Node.js tool to automate end-to-end web testing.
npm install testcafe
Typescript
Module System
Min. Node Version
Node Version
NPM Version
64.8
Supply Chain
85.7
Quality
92
Maintenance
100
Vulnerability
94.6
License
JavaScript (73.77%)
TypeScript (19.51%)
HTML (5.97%)
Less (0.46%)
Mustache (0.2%)
CoffeeScript (0.06%)
Dockerfile (0.02%)
Shell (0.01%)
Total Downloads
67,337,468
Last Day
31,632
Last Week
186,965
Last Month
885,460
Last Year
12,131,603
9,826 Stars
3,488 Commits
674 Forks
170 Watching
24 Branches
121 Contributors
Latest Version
3.7.0
Package Id
testcafe@3.7.0
Unpacked Size
6.02 MB
Size
1.43 MB
File Count
463
NPM Version
10.7.0
Node Version
18.20.4
Publised On
04 Nov 2024
Cumulative downloads
Total Downloads
Last day
4%
31,632
Compared to previous day
Last week
-4.7%
186,965
Compared to previous week
Last month
-9.2%
885,460
Compared to previous month
Last year
-1.9%
12,131,603
Compared to previous year
97
73
Automate end-to-end web testing with TestCafe, a Node.js-based testing framework.
TestCafe is free and as easy to use as 1-2-3:
1. Write your tests in JS or TypeScript.
2. Execute your tests.
3. View test results.
Homepage   •  Documentation   •  FAQ   •  Support
npm install -g testcafe
Running a sample test in Safari
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
When you enable live mode, changes to test code immediately restart the test, and you instantly see the results.
Latest JS and TypeScript support
TestCafe supports the most recent JavaScript-related features, including ES2017 (async/await). You can also use TypeScript if you prefer a strongly typed language instead.
Detects JS errors in your code
TestCafe reports JS errors that it locates on a given webpage. Tests automatically fail if TestCafe encounters such errors.
You can, however, disable this option.
Concurrent test launch
TestCafe can open multiple instances of the same browser and run parallel tests (to help decrease 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.
1const 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 within CI systems (TeamCity, Jenkins, Travis & etc.)
TestCafe is the perfect choice for JavaScript developers and experienced Q&A teams. If you’d like to delegate testing to QA engineers and are looking for a code-free way to record and maintain tests compatible with your existing infrastructure, check out TestCafe Studio - a testing IDE built atop the open-source version of TestCafe.
Review the following article to learn how TestCafe Studio can fit into any workflow: What's Better than TestCafe? TestCafe Studio.
Record and Run a Test in TestCafe Studio
Ensure that you run Node.js version 16 or higher, and run the following command:
1npm install -g testcafe
For this simple example, we will test the following page: https://devexpress.github.io/testcafe/example
Create a .js or .ts file on your computer. Remember that a .js or .ts file must maintain a specific structure: tests must be organized into fixtures. You can paste the following code to see the test in action:
1import { Selector } from 'testcafe'; // first import testcafe selectors 2 3fixture `Getting Started`// declare the fixture 4 .page `https://devexpress.github.io/testcafe/example`; // specify the start page 5 6 7//then create a test and place your code within it 8test('My first test', async t => { 9 await t 10 .typeText('#developer-name', 'John Smith') 11 .click('#submit-button') 12 13 // Use the assertion to check if actual header text equals expected text 14 .expect(Selector('#article-header').innerText).eql('Thank you, John Smith!'); 15});
Call the following command in a command shell. Specify the target browser and file path.
1testcafe chrome test1.js
TestCafe opens the browser and begins test execution.
Important: Make certain the browser tab that runs tests stays active. Do not minimize the browser window. Inactive tabs and minimized browser windows switch to lower resource consumption mode. In low consumption mode, tests may not execute correctly.
TestCafe outputs results into a command shell by default. See Reporters for more information. You can also use plugins to customize reports.
Read the Getting Started page for additional assistance.
Visit the following webpage to review our online help system: Documentation.
Join the TestCafe community on Stack Overflow. Ask and answer questions using the TestCafe tag.
Use our GitHub issues page to report bugs and suggest enhancements.
Follow us on Twitter. We post TestCafe news and updates.
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.
Thanks to all of our contributors – We appreciate your commitment to the TestCafe community.
aha-oretama | ai | aleks-pro | Aleksey28 | AlexanderMoiseev | AlexanderMoskovkin |
alexey-lin | AlexKamaev | alexphilin | AlexSkorkin | alexwybraniec | AnastasiaIvanova8 |
andrewbranch | AndreyBelym | AndyWendt | AnnaKondratova | anthophobiac | Artem-Babich |
Arthy000 | augustomezencio-hotmart | bdwain | benmonro | beyondcompute | bill-looby-i |
bsmithb2 | caseyWebb | cdrini | cgfarmer4 | Chris-Greaves | churkin |
dej611 | DIRECTcut | Dmitry-Ostashev | eignatyev | ericyd | Farfurix |
flora8984461 | GeoffreyBooth | helen-dikareva | honsq90 | infctr | inikulin |
Ivan-Katovich | jamesgeorge007 | jaypea | josephmalam | kanhaiya15 | karolnowinski |
kirovboris | kisrefod | LavrovArtem | link89 | lzxb | macdonaldr93 |
MargaritaLoseva | Marketionist | MatthewNielsen27 | mattkubej | mattmanske | mcjim |
miherlosev | morfey13 | mostlyfabulous | murajun1978 | NickCis | Nuarat |
Ogurecher | PayBas | pgorny | pietrovich | radarhere | raspo |
rbardini | renancouto | rob4629 | rueyaa332266 | sgrillon14 | smockle |
stefanschenk | superroma | sylbru | taiki-fw | testcafe-build-bot | theghostbel |
titerman | tobiasbueschel | varunkumar | VasilyStrelyaev | vitalics | Vla8islav |
wentwrong | b12031106 | danielroe | danieltroger | DevSide | intermike |
kirillsalikhov | michaelficarra | rr13k | tomashanacek | TrevorKarjanis |
TestCafe developers and community members made these plugins:
Browser Providers
Use TestCafe with cloud browser providers and emulators.
Framework-Specific Selectors
Work with page elements in a way that is native to your framework.
Plugins for Task Runners
Integrate TestCafe into your project's workflow.
Custom Reporters
View test results in different formats.
GitHub Action
Run TestCafe tests in GitHub Actions workflows.
Test Accessibility
Find accessibility issues in your web app.
IDE Plugins
Run tests and view results from your favorite IDE.
ESLint
Use ESLint when writing and editing TestCafe tests.
Cucumber Support
Create and run tests that use the Cucumber syntax.
 | 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.
Show everyone you are using TestCafe:
To display this badge, add the following code to your repository readme:
1<a href="https://github.com/DevExpress/testcafe"> 2 <img alt="Tested with TestCafe" src="https://img.shields.io/badge/tested%20with-TestCafe-2fa4cf.svg"> 3</a>
We are grateful to BrowserStack for providing the infrastructure that we use to test code in this repository.
Code released under the MIT license.
Developer Express Inc. (https://devexpress.com)
No vulnerabilities found.
Reason
all changesets reviewed
Reason
22 commit(s) and 20 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
4 existing vulnerabilities detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 1
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-12-09
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More