Jenkins + qUnit [英] Jenkins + qUnit

查看:237
本文介绍了Jenkins + qUnit的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何轻松地将Jenkins与qUnit整合?我要使用真正的浏览器(如firefox和chrome)来运行测试。我的服务器运行在RedHat 6.1 Linux上。我想我有所有需要的插件/库,但我还不知道如何使它的工作。我正在与Jenkins合作第一次(在服务器端)。

How to easily integrate Jenkins with qUnit? I gonna use real browser (like firefox and chrome) to run tests. My server runs on RedHat 6.1 Linux. I think I have all needed plugins/libraries but I still don't know how to make it working. I'm working with Jenkins 1st time (on server side).

//编辑:

提前感谢。)

推荐答案

说Jenkins和QUnit只是谜题的一部分。您仍然需要一个Web浏览器和一个方法来获取一个JUnit风格的XML文件从QUnit结果到磁盘。虽然有Selenium和Webdriver来控制大量的浏览器,最简单的方法是使用PhantomJS(http://phantomjs.org/)。

Saying Jenkins and QUnit is only part of the puzzle. You still need a web browser and a way to get a JUnit style XML file from the QUnit results on to disk. While there is Selenium and Webdriver for controlling numerous browsers, the easiest way to get started is to use PhantomJS (http://phantomjs.org/). PhantomJS is a headless webkit based browser meant just for tasks like this.

如果您浏览此页面的测试框架部分( http://code.google.com/p/phantomjs/wiki/WhoUsesPhantomJS ),您将看到几个脚本用于运行QUnit(有些支持JSCoverage)。 phantomjs-jscoverage-qunit脚本看起来像会击中你想击中的所有主要点,和United一样。

If you browse the "Test Frameworks" sections of this page ( http://code.google.com/p/phantomjs/wiki/WhoUsesPhantomJS ) you will see several scripts for running QUnit (some with JSCoverage support). The phantomjs-jscoverage-qunit script looks like it will hit all the major points you want to hit, as does United. Both look like they will require some fiddling to get them going though.

唉,我没有发现任何运行QUnit测试和获取JUnit输出的方法,无论是Selenium, WebDriver或PhantomJS,只需工作而不需要修改。

Alas, I haven't discovered any method for running QUnit tests and getting JUnit output for either Selenium, WebDriver, or PhantomJS that will just work without modification.

编辑:现在几个月后,我已经清楚,webdriver是Selenium的未来(它可能应该已经清楚我在那时,但它wasn 't)。此外,PhantomJS现在通过GhostDriver与WebDriver协作,因此只支持WebDriver并选择PhantomJS作为目标可能是最好的建议。

Now several months later, it have become clear to me that webdriver is the future of Selenium (it probably should have been clear to me back then, but it wasn't). Also, PhantomJS now works with WebDriver via GhostDriver, so supporting only WebDriver and choosing PhantomJS as a target is probably the best advice going forward.

这篇关于Jenkins + qUnit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆