1 | # Karma
|
2 | [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/karma-runner/karma) [![npm version](https://img.shields.io/npm/v/karma.svg?style=flat-square)](https://www.npmjs.com/package/karma) [![npm downloads](https://img.shields.io/npm/dm/karma.svg?style=flat-square)](https://npmcharts.com/compare/karma?minimal=true)
|
3 |
|
4 | [![Build Status](https://img.shields.io/travis/karma-runner/karma/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma) [![Build Status](https://img.shields.io/appveyor/ci/dignifiedquire/karma/master.svg?style=flat-square)](https://ci.appveyor.com/project/dignifiedquire/karma) [![Code Climate](https://img.shields.io/codeclimate/github/karma-runner/karma.svg?style=flat-square)](https://codeclimate.com/github/karma-runner/karma) [![PRs Welcome](https://img.shields.io/badge/prs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Dependency Status](https://img.shields.io/david/karma-runner/karma.svg?style=flat-square)](https://david-dm.org/karma-runner/karma) [![devDependency Status](https://img.shields.io/david/dev/karma-runner/karma.svg?style=flat-square)](https://david-dm.org/karma-runner/karma#info=devDependencies)
|
5 |
|
6 | A simple tool that allows you to execute JavaScript code in multiple
|
7 | _real_ browsers.
|
8 |
|
9 | > The main purpose of Karma is to make your test-driven development easy,
|
10 | > fast, and fun.
|
11 |
|
12 |
|
13 | ## Help and Support
|
14 |
|
15 | > For questions and support please use the mailing list or Gitter.
|
16 | > The issue tracker is for bug reports and feature discussions only.
|
17 |
|
18 | * Obligatory [documentation]
|
19 | * Quick questions:
|
20 | [![Gitter Chat](https://img.shields.io/badge/GITTER-join%20chat-green.svg?style=flat-square)](https://gitter.im/karma-runner/karma)
|
21 | * Longer questions: [Mailing List]
|
22 | * Bug reports [Issue Tracker]
|
23 | * Everything less than 140 characters: [@JsKarma] on Twitter
|
24 |
|
25 |
|
26 |
|
27 | ## When should I use Karma?
|
28 |
|
29 | * You want to test code in *real* browsers.
|
30 | * You want to test code in multiple browsers (desktop, mobile,
|
31 | tablets, etc.).
|
32 | * You want to execute your tests locally during development.
|
33 | * You want to execute your tests on a continuous integration server.
|
34 | * You want to execute your tests on every save.
|
35 | * You love your terminal.
|
36 | * You don't want your (testing) life to suck.
|
37 | * You want to use [Istanbul] to automagically generate coverage
|
38 | reports.
|
39 | * You want to use [RequireJS] for your source files.
|
40 |
|
41 |
|
42 | ## But I still want to use \_insert testing library\_
|
43 |
|
44 | Karma is not a testing framework, nor an assertion library.
|
45 | Karma just launches an HTTP server, and generates the test runner HTML file you probably already know from your favourite testing framework.
|
46 | So for testing purposes you can use pretty much anything you like. There are already plugins for most of the common testing frameworks:
|
47 |
|
48 | * [Jasmine]
|
49 | * [Mocha]
|
50 | * [QUnit]
|
51 | * and [many others](https://www.npmjs.org/browse/keyword/karma-adapter)
|
52 |
|
53 | If you can't find an adapter for your favourite framework, don't worry and write your own.
|
54 | It's not that hard and we are here to help.
|
55 |
|
56 |
|
57 | ## Which Browsers can I use?
|
58 |
|
59 | All the major browsers are supported, if you want to know more see the
|
60 | [browsers] page.
|
61 |
|
62 |
|
63 | ## Troubleshooting
|
64 | See [FAQ](https://karma-runner.github.io/latest/intro/faq.html).
|
65 |
|
66 |
|
67 | ## I want to use it. Where do I sign?
|
68 |
|
69 | You don't need to sign anything but here are some resources to help
|
70 | you to get started...
|
71 |
|
72 |
|
73 | ### Obligatory Screencast.
|
74 |
|
75 | Every serious project has a screencast, so here is ours. Just click
|
76 | [here] and let the show begin.
|
77 |
|
78 |
|
79 | ### Installation.
|
80 |
|
81 | See [installation](https://karma-runner.github.io/latest/intro/installation.html).
|
82 |
|
83 |
|
84 | ### Using it.
|
85 |
|
86 | See [configuration](https://karma-runner.github.io/latest/intro/configuration.html).
|
87 |
|
88 |
|
89 | ## This is so great. I want to help.
|
90 |
|
91 | Please, see
|
92 | [contributing](https://karma-runner.github.io/latest/dev/contributing.html).
|
93 |
|
94 |
|
95 | ## Why did you create this?
|
96 |
|
97 | Throughout the development of [AngularJS], we've been using [JSTD] for
|
98 | testing. I really think that JSTD is a great idea. Unfortunately, we
|
99 | had many problems with JSTD, so we decided to write our own test
|
100 | runner based on the same idea. We wanted a simple tool just for
|
101 | executing JavaScript tests that is both stable and fast. That's why we
|
102 | use the awesome [Socket.io] library and [Node.js].
|
103 |
|
104 |
|
105 | ## My boss wants a license. So where is it?
|
106 | [MIT License](./LICENSE)
|
107 |
|
108 |
|
109 | [AngularJS]: https://angularjs.org/
|
110 | [JSTD]: https://code.google.com/p/js-test-driver/
|
111 | [Socket.io]: http://socket.io/
|
112 | [Node.js]: http://nodejs.org/
|
113 | [Jasmine]: https://github.com/karma-runner/karma-jasmine
|
114 | [Mocha]: https://github.com/karma-runner/karma-mocha
|
115 | [QUnit]: https://github.com/karma-runner/karma-qunit
|
116 | [here]: https://www.youtube.com/watch?v=MVw8N3hTfCI
|
117 | [Mailing List]: https://groups.google.com/forum/#!forum/karma-users
|
118 | [Issue Tracker]: https://github.com/karma-runner/karma/issues
|
119 | [@JsKarma]: https://twitter.com/JsKarma
|
120 | [RequireJS]: http://requirejs.org/
|
121 | [Istanbul]: https://github.com/gotwarlost/istanbul
|
122 |
|
123 | [browsers]: https://karma-runner.github.io/latest/config/browsers.html
|
124 | [documentation]: https://karma-runner.github.io
|