All Projects → romanresh → vscode-testcafe

romanresh / vscode-testcafe

Licence: MIT license
This extension allows you to run TestCafe tests directly from VS Code

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to vscode-testcafe

testcafe-snippets
Code snippets for TestCafe
Stars: ✭ 54 (+12.5%)
Mutual labels:  visual-studio-code, testcafe
vscode-icons-manager--electron
Manage vscode icons by Dhanish Gajjar easy with ease
Stars: ✭ 22 (-54.17%)
Mutual labels:  visual-studio-code
Karma
Spectacular Test Runner for JavaScript
Stars: ✭ 11,591 (+24047.92%)
Mutual labels:  test-runner
Htmltestrunner
A Test Runner in python, for Human Readable HTML Reports
Stars: ✭ 228 (+375%)
Mutual labels:  test-runner
Nunit Console
NUnit Console runner and test engine
Stars: ✭ 168 (+250%)
Mutual labels:  test-runner
tester-jest
Tester Jest is a tester provider for the Atom Tester.
Stars: ✭ 21 (-56.25%)
Mutual labels:  test-runner
Zunit
A powerful testing framework for ZSH projects
Stars: ✭ 140 (+191.67%)
Mutual labels:  test-runner
ctagsx
VSCode ctags implementation that actually works
Stars: ✭ 24 (-50%)
Mutual labels:  visual-studio-code
bazel-stack-vscode
VSCode Extension for Bazel
Stars: ✭ 50 (+4.17%)
Mutual labels:  visual-studio-code
Junit Dataprovider
A TestNG like dataprovider runner for JUnit with many additional features
Stars: ✭ 226 (+370.83%)
Mutual labels:  test-runner
Specjour
distributed rspec & cucumber via bonjour
Stars: ✭ 214 (+345.83%)
Mutual labels:  test-runner
Carton
📦 Watcher, bundler, and test runner for your SwiftWasm apps
Stars: ✭ 171 (+256.25%)
Mutual labels:  test-runner
vscode-whats-new
VS Code submodule for a What's New page
Stars: ✭ 26 (-45.83%)
Mutual labels:  visual-studio-code
Nunit3 Vs Adapter
NUnit 3.0 Visual Studio test adapter for use under VS 2012 or later
Stars: ✭ 158 (+229.17%)
Mutual labels:  test-runner
cake-vscode
Contains Cake extension for Visual Studio Code.
Stars: ✭ 43 (-10.42%)
Mutual labels:  visual-studio-code
Spectrum
A BDD-style test runner for Java 8. Inspired by Jasmine, RSpec, and Cucumber.
Stars: ✭ 142 (+195.83%)
Mutual labels:  test-runner
Acutest
Simple header-only C/C++ unit testing facility.
Stars: ✭ 170 (+254.17%)
Mutual labels:  test-runner
Marathon
Cross-platform test runner written for Android and iOS projects
Stars: ✭ 250 (+420.83%)
Mutual labels:  test-runner
vue-generator-graph
🌌 An extension which will create a graph of a vuejs app by statically analyzing imports and auto imported components
Stars: ✭ 59 (+22.92%)
Mutual labels:  visual-studio-code
elm-doctest
doctest runner against Elm-lang source files
Stars: ✭ 13 (-72.92%)
Mutual labels:  test-runner

TestCafe Test Runner for Visual Studio Code

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.

  • Run a particular test, fixture, all tests in a file or directory via the context menu or built-in commands
  • Automatically detect browsers installed on the local machine
  • Repeat last test run
  • Debug tests
  • View test results in the Debug Console panel

Demo

Requirements

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\....

Optional

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.

How to install extension

Install the TestCafe Test Runner extension from VS Code Marketplace as described in the VS Code documentation.

Features

Activation

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.

Editor context menu

Running a particular test

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.

Running a particular test fixture

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.

Running all tests in a file

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.

Explorer context menu

Running all tests in a folder

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.

Rerunning previous tests

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.

Test Debugging

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.

Explorer context menu

Test Result

You can view a test run report in the Debug console.

Failing test report

Update browser list

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.

Commands and shortcuts

To run built-in commands, press Ctrl+Shift+P and type the command name:

  • TestCafe: Run Test(s) in IE, TestCafe: Run Test(s) in Chrome, ... - runs a test or fixture at the cursor position in the specified browser.
  • TestCafe: Repeat Previous Test Run (Ctrl+Alt+P) - reruns a set of tests that was run previously.
  • TestCafe: Refresh Browser List (Ctrl+Alt+U) - refreshes the list of installed browsers.

Configuration

  • testcafeTestRunner.customArguments - Specifies the custom arguments of the TestCafe Command Line Interface. See the whole list of available arguments in the TestCafe documentation. The arguments should be separated by space.
    • The value of this configuration property will be joined to the standard arguments list generated by this extension.
    • Example:
{
    "testcafeTestRunner.customArguments": "--speed 0.1"
}
  • testcafeTestRunner.workspaceRoot - Specifies a relative path to the folder which contains the node_modules folder with the testcafe package. Use this setting if the test files are located in a nested folder with its own node_modules subdirectory. Default value is ./;
    • Example:
{
    "testcafeTestRunner.workspaceRoot": "./acceptance"
}
  • testcafeTestRunner.useLiveRunner - Specifies which testcafe runner to use (TestCafe Live or TestCafe). Default value is false;
    • Example:
{
    "testcafeTestRunner.userLiveRunner": true
}
  • testcafeTestRunner.useHeadlessMode - Run tests in Google Chrome and Mozilla Firefox without any visible UI shell. Default value is false;
    • Example:
{
    "testcafeTestRunner.useHeadlessMode": true
}
  • testcafeTestRunner.portableFirefoxPath or testcafeTestRunner.portableChromePath - Specifies a path to the portable Chrome's or Firefox's executable file. The corresponding commands will become available if these options are specified;
    • Example:
{
    "testcafeTestRunner.portableFirefoxPath": "C:\Program Files (x86)\Firefox Portable\firefox.exe"
}

Sources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].