| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
TestCafe is a pure Node.js end-to-end framework for testing web apps. This extension allows you to run TestCafe tests directly from VS Code.
TestCafe should be installed in your project as a local package. To install it, use the npm install testcafe command. For Mac OS, add TestCafe to dependencies in your package.json file. Your project should contain TestCafe modules in node_modules\testcafe\....
This is only required if you would like the option to use the TestCafe Live runner in place of TestCafe. Note that TestCafe Live depends on TestCafe, but they are separate repositories. In other words, you need to install both TestCafe and TestCafe Live if you wish to use the TestCafe Live runner.
Use the npm install testcafe-live command.
Install the TestCafe Test Runner extension from VS Code Marketplace as described in the VS Code documentation.
While activating, the extension detects browsers installed on your machine. For each browser, the extension creates a corresponding command and an item in the context menu.
To run a particular test, invoke the context menu when the cursor is placed within the test body and select TestCafe: Run Test(s) in... for the required browser.
To run all tests in a particular test fixture, invoke the context menu when the cursor is placed within this fixture outside of a test body and select TestCafe: Run Test(s) in... for the required browser.
To run all tests in the current file, invoke the context menu for this file in the Explorer panel and select TestCafe: Run Test(s) in... for the required browser.
To run all test files in a folder, invoke the context menu for this folder in the Explorer panel and select TestCafe: Run Test(s) in... for the required browser.
If you need to run the same set of tests you ran previously, invoke the context menu and select Repeat Previous Test Run. Alternatively, you can use the Ctrl+Alt+P shortcut. This command is available after the first test run.
To debug your test, place the debugger statement in test code and run this test via one of the commands. Test execution will be stopped once it reaches the debugger statement and you will be able to continue step-by-step.
You can view a test run report in the Debug console.
When you install a new browser or delete an existing one, update the extension's browser list. To do this, use the TestCafe: Refresh Browser List command or the Ctrl+Alt+U shortcut.
To run built-in commands, press Ctrl+Shift+P and type the command name:
{
"testcafeTestRunner.customArguments": "--speed 0.1"
}
{
"testcafeTestRunner.workspaceRoot": "./acceptance"
}
{
"testcafeTestRunner.userLiveRunner": true
}
{
"testcafeTestRunner.useHeadlessMode": true
}
{
"testcafeTestRunner.portableFirefoxPath": "C:\Program Files (x86)\Firefox Portable\firefox.exe"
}
| Back | FazBrowse Home | New Git URL |