• Stars
    star
    11,952
  • Rank 2,745 (Top 0.06 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 13 years ago
  • Updated 27 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Spectacular Test Runner for JavaScript

Karma

js-standard-style npm version npm downloads

Code Climate PRs Welcome Dependency Status devDependency Status semantic-release

A simple tool that allows you to execute JavaScript code in multiple real browsers.

The main purpose of Karma is to make your test-driven development easy, fast, and fun.

Karma is deprecated and is not accepting new features or general bug fixes.

The web testing space has evolved significantly in the 10+ years since Karma's creation. The web landscape looks very different today and new patterns and tools have emerged in the ecosystem. New test runners offer more performant alternatives, and Karma no longer provides clear unique value.

Based on the current state of the web testing ecosystem, we have made the hard decision to deprecate Karma.

We know Karma is used particularly commonly in the Angular ecosystem, so Angular is adding Jest and Web Test Runner support to provide a migration path off of Karma. See the Angular blog for more details.

Critical security issues in Karma will still be triaged and fixed as necessary. This will continue until 12 months after Angular CLI's Web Test Runner support is marked stable.

For those outside Angular looking to migrate off Karma, both Web Test Runner and jasmine-browser-runner provide browser-based unit testing solutions which can be used as a direct alternative. Jest and Vitest also provide Node-based alternatives.

It has been incredible to see Karma's impact on the web testing ecosystem and we greatly appreciate the support of everyone who contributed to an awesome community. Keep testing. ✅

Help and Support

For questions and support please use the mailing list or Gitter. The issue tracker is for bug reports and feature discussions only.

When should I use Karma?

  • You want to test code in real browsers.
  • You want to test code in multiple browsers (desktop, mobile, tablets, etc.).
  • You want to execute your tests locally during development.
  • You want to execute your tests on a continuous integration server.
  • You want to execute your tests on every save.
  • You love your terminal.
  • You don't want your (testing) life to suck.
  • You want to use Istanbul to automagically generate coverage reports.
  • You want to use RequireJS for your source files.

But I still want to use _insert testing library_

Karma is not a testing framework, nor an assertion library. Karma just launches an HTTP server, and generates the test runner HTML file you probably already know from your favourite testing framework. So for testing purposes you can use pretty much anything you like. There are already plugins for most of the common testing frameworks:

If you can't find an adapter for your favourite framework, don't worry and write your own. It's not that hard and we are here to help.

Which Browsers can I use?

All the major browsers are supported, if you want to know more see the browsers page.

Troubleshooting

See FAQ.

I want to use it. Where do I sign?

You don't need to sign anything but here are some resources to help you to get started...

Obligatory Screencast.

Every serious project has a screencast, so here is ours. Just click here and let the show begin.

Installation.

See installation.

Using it.

See configuration.

This is so great. I want to help.

Please, see contributing.

Why did you create this?

Throughout the development of AngularJS, we've been using JSTD for testing. I really think that JSTD is a great idea. Unfortunately, we had many problems with JSTD, so we decided to write our own test runner based on the same idea. We wanted a simple tool just for executing JavaScript tests that is both stable and fast. That's why we use the awesome Socket.io library and Node.js.

My boss wants a license. So where is it?

MIT License

More Repositories

1

karma-coverage

A Karma plugin. Generate code coverage.
JavaScript
768
star
2

karma-jasmine

A Karma plugin - adapter for Jasmine testing framework.
JavaScript
542
star
3

grunt-karma

Grunt plugin for Karma.
JavaScript
468
star
4

karma-chrome-launcher

A Karma plugin. Launcher for Chrome and Chrome Canary.
JavaScript
467
star
5

karma-mocha

A Karma plugin. Adapter for Mocha testing framework.
JavaScript
379
star
6

gulp-karma

Example of using Karma with Gulp.
JavaScript
310
star
7

karma-phantomjs-launcher

A Karma plugin. Launcher for PhantomJS.
JavaScript
281
star
8

karma-ng-html2js-preprocessor

A Karma plugin. Compile AngularJS 1.x and 2.x templates to JavaScript on the fly.
CoffeeScript
266
star
9

karma-sauce-launcher

A Karma plugin. Launch any browser on SauceLabs!
TypeScript
199
star
10

karma-junit-reporter

A Karma plugin. Report results in junit xml format.
JavaScript
176
star
11

karma-browserstack-launcher

A Karma plugin. Launch any browser on BrowserStack!
JavaScript
150
star
12

karma-firefox-launcher

A Karma plugin. Launcher for Firefox.
JavaScript
104
star
13

karma-html2js-preprocessor

A Karma plugin. Convert HTML files into JS strings to serve them in a script tag.
CoffeeScript
74
star
14

karma-commonjs

A Karma plugin. Test CommonJS modules.
JavaScript
73
star
15

karma-webdriver-launcher

A plugin for Karma. Launch any browser with WebDriver.
JavaScript
66
star
16

karma-ie-launcher

A Karma plugin. Launcher for Internet Explorer.
JavaScript
59
star
17

karma-coffee-preprocessor

A Karma plugin. Compile coffee script on the fly.
JavaScript
53
star
18

karma-cli

The Karma command line interface.
JavaScript
52
star
19

karma-qunit

A Karma plugin. Adapter for QUnit testing framework.
JavaScript
51
star
20

maven-karma-plugin

Maven plugin for running tests using Karma.
Java
45
star
21

karma-requirejs

A Karma plugin. Adapter for RequireJS framework.
JavaScript
39
star
22

karma-teamcity-reporter

A Karma plugin. Report results for Teamcity CI.
JavaScript
34
star
23

karma-intellij

Reporter for IntelliJ / WebStorm.
JavaScript
34
star
24

karma-growl-reporter

A Karma plugin. Report results with growl.
JavaScript
27
star
25

karma-ng-scenario

A Karma plugin. Adapter for Angular's Scenario Runner.
JavaScript
25
star
26

karma-runner.github.com

Homepage of Karma - The Spectacular JavaScript Test Runner.
HTML
24
star
27

karma-edge-launcher

A Karma plugin. Launcher for Microsoft Edge.
JavaScript
21
star
28

karma-safari-launcher

A Karma plugin. Launcher for Safari.
JavaScript
19
star
29

karma-closure

A Karma plugin. Resolve Google Closure dependencies on the fly.
JavaScript
18
star
30

karma-dart

DEPRECATED. A plugin for Dart language.
JavaScript
16
star
31

karma-slimerjs-launcher

A Karma launcher for SlimerJS
JavaScript
13
star
32

karma-traceur-preprocessor

A Karma plugin. Compile ES6 script on the fly using traceur-compiler.
JavaScript
13
star
33

karma-nodeunit

A Karma plugin - adapter for Node unit testing framework.
JavaScript
12
star
34

karma-script-launcher

A Karma plugin. Launcher for custom scripts.
JavaScript
9
star
35

integration-tests

JavaScript
8
star
36

karma-dojo

A Karma plugin. Adapter for Dojo Toolkit.
JavaScript
7
star
37

karma-opera-launcher

A Karma plugin. Launcher for Opera.
JavaScript
7
star
38

test-device-manager

Keep-alive test browsers and redirect them to a test server on command.
JavaScript
6
star
39

karma-ember-preprocessor

A Karma plugin. Preprocessor for Ember.js templates (handlebars).
JavaScript
6
star
40

karma-googmodule-preprocessor

A Karma preprocessor to handle Closure's goog.module() system
JavaScript
5
star
41

shared-karma-files

Shared configs for all the Karma repos.
CoffeeScript
2
star