Karma
karma-runner.github.io
What it is
Karma is a JavaScript test runner that starts a web server, connects browsers, runs tests, and reports results to developers. It can watch configured files and rerun tests when they change. Plugins connect frameworks such as Jasmine, Mocha, and QUnit, alongside preprocessors, reporters, and browser launchers. Documented launchers include Chrome, Firefox, Safari, PhantomJS, JSDOM, Opera, Internet Explorer, SauceLabs, and BrowserStack. A browser on another device on the same network, including a phone or tablet, can be captured by visiting the Karma server URL. Karma runs on Node.js and is distributed as an npm package; its installation guide recommends installing it locally in a project. Documentation includes integration guides for Travis CI, Jenkins, and Semaphore CI. The project describes Karma as primarily designed for low-level unit testing and points to Protractor for high-level testing. Karma is free and MIT-licensed, but deprecated: it accepts no new features or general bug fixes. Critical security fixes continue until 12 months after Angular CLI’s Web Test Runner support is marked stable.
Spec sheet
- Purpose
- Karma runs JavaScript tests in multiple real browsers and reports results to developers.Read 29 Sep 2026 · github.com
- Support
- The project directs questions to its mailing list or Gitter and says the issue tracker is for bug reports and feature discussions.Read 29 Sep 2026 · github.com
- License
- Karma is released under the MIT license.Read 29 Sep 2026 · karma-runner.github.io
- Automatic reruns
- Karma watches configured files and reruns tests when a file changes.Read 29 Sep 2026 · karma-runner.github.io
- Browser launchers
- Documented launchers include Chrome, Firefox, Safari, PhantomJS, JSDOM, Opera, Internet Explorer, SauceLabs, and BrowserStack.Read 29 Sep 2026 · karma-runner.github.io
- CI integrations
- The documentation provides integration guides for Travis CI, Jenkins, and Semaphore CI.Read 29 Sep 2026 · karma-runner.github.io
- How it works
- Karma starts a web server, connects browsers, runs tests in them, and displays their results.Read 29 Sep 2026 · karma-runner.github.io
- Installation
- Karma runs on Node.js, is distributed as an npm package, and the installation guide recommends installing it locally in the project.Read 29 Sep 2026 · karma-runner.github.io
- Maintenance status
- Karma is deprecated and is not accepting new features or general bug fixes; critical security issues will still be triaged and fixed during the stated support period.Read 29 Sep 2026 · github.com
- Manual device capture
- A browser on another device, including a phone or tablet on the same network, can be captured by visiting the Karma server URL.Read 29 Sep 2026 · karma-runner.github.io
- Plugin model
- Preprocessors, reporters, browser launchers, and framework adapters are plugins that can be installed from npm or written for Karma.Read 29 Sep 2026 · karma-runner.github.io
- Security support period
- The repository says critical security fixes will continue until 12 months after Angular CLI's Web Test Runner support is marked stable.Read 29 Sep 2026 · github.com
- Testing frameworks
- Plugins are available for Jasmine, Mocha, QUnit, and other testing frameworks.Read 29 Sep 2026 · github.com
- Testing scope
- The FAQ says Karma was primarily designed for low-level unit testing and recommends Protractor for high-level testing.Read 29 Sep 2026 · karma-runner.github.io
- Who it is for
- The project describes Karma as useful for developers who want to run tests locally, in multiple browsers, on each save, or on a continuous integration server.Read 29 Sep 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Runs tests across configured real browsers.
- Watches files and reruns tests after changes.
- Plugins support Jasmine, Mocha, and QUnit.
- MIT-licensed and free.
Limits
- Deprecated; no new features or general bug fixes.
- Primarily designed for low-level unit testing.
- Critical security fixes have a stated support end point.
Who it suits
Karma suits developers who want local, multi-browser tests, reruns on file changes, or CI test runs. The project describes it as primarily for low-level unit testing.
Karma in depth
Read the full write-up
Overview
Karma is a JavaScript test runner for projects that need to execute tests in browsers, locally or in continuous integration. It suits teams maintaining an existing browser-testing setup; for a new project, its deprecated status makes the free price a weaker reason to adopt it.
It starts a web server, connects browsers, runs tests, and reports results. The project focuses on low-level unit testing and recommends Protractor for high-level testing.
Key features
Browser-based testing
Karma's documented browser launchers cover Chrome, Firefox, Safari, PhantomJS, JSDOM, Opera, Internet Explorer, SauceLabs, and BrowserStack. That range gives teams options for running tests across browser environments, but the actual choices depend on the launchers and environment a project configures. A browser on another device, such as a phone or tablet on the same network, can also connect by visiting the Karma server URL.
Reruns and plugins
Karma can watch configured files and rerun tests after a change, supporting a local edit-and-check workflow. Plugins provide preprocessors, reporters, browser launchers, and framework adapters, with documented integrations for Jasmine, Mocha, QUnit, and others. This lets a project assemble a suitable testing stack, though the team must install and maintain its chosen plugins.
CI and development setup
Karma runs on Node.js and is distributed through npm; its installation guide recommends installing it locally in the project. Documentation includes integration guides for Travis CI, Jenkins, and Semaphore CI. Component testing, coverage reporting, and parallel execution are supported.
Pricing
Karma costs nothing under the MIT license. There are no paid plans to weigh against it, but the project is deprecated: it accepts no new features or general bug fixes. Critical security issues will continue to be triaged and fixed until 12 months after Angular CLI's Web Test Runner support is marked stable. That continuing security commitment is time-bounded, so teams choosing Karma should account for the eventual end of that support.
Platforms
Karma is available for Android, iOS, Linux, macOS, self-hosted environments, the web, and Windows. It runs on Node.js and is distributed as an npm package, so installation belongs in a Node.js project workflow.
Who it's for
Karma remains a reasonable fit for developers who already rely on it to run low-level tests locally, across browsers, on each save, or on a CI server. Its browser launchers, manual device capture, and plugin model are useful when those capabilities are already part of a project's testing process. It is not the right choice for high-level testing, which the project points to Protractor for, or for teams that need ongoing feature development and general bug fixes.
Pros and cons
Pros
Browser choice: documented launchers span common browsers, simulated environments, and hosted browser services, giving projects several ways to execute tests.
Flexible integration: plugins cover core parts of the test setup, while framework adapters include Jasmine, Mocha, and QUnit.
Free and open source: the MIT license and free price make use cost-free.
Local and CI workflows: file watching supports reruns on change, and the documentation covers three CI systems.
Cons
Deprecated: no new features or general bug fixes are accepted, which makes it a risky foundation for new projects.
Security support has an endpoint: critical fixes continue only through the stated support period, so adopters must plan for what follows.
Low-level testing focus: the project recommends Protractor rather than Karma for high-level testing.
Plugin assembly takes ownership: projects install and configure the components they need, then carry responsibility for maintaining that setup.
Alternatives
Web Test Runner is another free option for teams considering a browser-oriented test runner; Modern Web frames it as part of its guides and tools for modern web development, built in close collaboration with the browser.
Vitest is a free, open-source alternative for readers comparing JavaScript testing tools; no plan limits are stated.
Mocha is a free, open-source JavaScript test framework installed as a development dependency. Choose it when you want the framework itself rather than Karma's browser orchestration.
Rstest is a free MIT-licensed JavaScript and TypeScript testing framework. Japa and Jest are also free options.
Poku is a free, MIT-licensed alternative with Node.js, Bun, and Deno support. Pure Test is another free option.
For a broader comparison, see JavaScript Testing Frameworks.
Verdict
Choose Karma if you are maintaining a project that already depends on its browser-based unit testing and plugin workflow, and the absence of new features and general bug fixes is acceptable. Its strongest case is free, configurable execution across browsers and CI; its main drawback is that deprecated status puts the burden on adopters to plan beyond the remaining critical-security support period. For new work, prefer an actively maintained alternative.
Verdict
Karma offers browser-based test execution and plugin-based framework support, but its deprecated status is a significant consideration. It remains free under the MIT license, with critical security fixes continuing only through the stated support period.
Where Specifiction places it
- JavaScript Testing Frameworks#3 of 238.2