Karma

JavaScript的出色的测试运行程序。(Spectacular Test Runner for JavaScript.)

Github星跟踪图

Karma 是一个简单的工具,允许您在多个真正的浏览器中执行JavaScript代码。

Karma的主要目标是为开发人员带来有效的测试环境。 环境是他们不必设置大量配置的环境,而是开发人员只需编写代码并从测试中获取即时反馈的地方。 因为获得快速的反馈意见是什么使您富有成效和创造力。

Karma 特性:

  • 实时测试 -- 在真正的浏览器和实际设备(如手机,平板电脑或无头的PhantomJS实例)上测试您的代码。
  • 遥控 -- 从命令行或IDE控制整个工作流程 - 只需保存一个文件,并且Karma将运行所有测试。
  • 测试框架不可知论 -- 使用Jasmine,Mocha,QUnit描述您的测试,或者为任何您喜欢的框架编写一个简单的适配器。
  • 开源 -- 由GitHub的开源社区开发和维护。
  • 轻松调试 -- 可以通过WebStorm或Google Chrome从IDE直接调试。
  • 持续整合 -- 与Jenkins,Travis或Semaphore的简单整合。

主要指标

概览
名称与所有者karma-runner/karma
主编程语言JavaScript
编程语言CoffeeScript (语言数: 7)
平台
许可证MIT License
所有者活动
创建于2011-10-12 07:55:46
推送于2025-02-13 14:07:46
最后一次提交2024-07-29 17:42:11
发布数248
最新版本名称v6.4.4 (发布于 )
第一版名称v0.0.1 (发布于 2012-03-11 20:34:10)
用户参与
星数12k
关注者数313
派生数1.7k
提交数2.9k
已启用问题?
问题数2057
打开的问题数349
拉请求数902
打开的拉请求数33
关闭的拉请求数897
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

Karma

js-standard-style npm version npm downloads

Build Status Build Status Code Climate PRs Welcome Dependency Status devDependency Status

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.

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