Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Karma Test Adapter
Karma Test Adapter

Karma Test Adapter

Morten Houston Ludvigsen

|
15,428 installs
| (14) | Free
A Visual Studio test explorer adapter for Karma
Download

Karma Test Adapter

Changes | Source code | Report bugs

This extension integrates Karma - Spectacular Test Runner for Javascript with the test explorer in Visual Studio 2013 and Visual Studio 2015 Preview / CTP.

This extension is built using JsTestAdapter.

This test adapter runs tests in browsers using Karma. If you need to run tests in Node.js you might be interested in theJasmine Node Test Adapter.

Features

  • Karma is started in the background with autoWatch set to true, so tests are run immediately when files change.

  • Once Karma has concluded a test run the results are shown in the Test Explorer in Visual Studio. There is no need to clickRun All in the Test Explorer.

  • Any output from a test (f.ex. using console.log) will be shown in the test result in the Test Explorer as a link:Output.

  • The port setting in the Karma configuration file (normally karma.conf.js) is ignored. A free port is chosen automatically.

  • Karma is only started if the configuration files (karma.conf.js and optionallyKarmaTestAdapter.json) are included in a Visual Studio project. Any other files, that Karma uses do not need to be included in a project.

Features specific to Jasmine tests

  • The file and position of each test is registered, so that the Test Explorer in Visual Studio can link to the source code for the test.

  • Source maps in test files are used to find the position of tests. So if, for example, a test is written in Typescript and the compiled javascript file contains a source map the test explorer will link to the typescript file.

  • The stack trace of a failed test is shown as a list of function names that link to the relevant line and file. As with the position of of tests, source maps are used to link to the original source.

More information

Please see Home page

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft