将Node.js与QUnit集成到Jenkins [英] Integrating Node.js with QUnit to Jenkins

查看:126
本文介绍了将Node.js与QUnit集成到Jenkins的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的第一篇文章,因此请原谅我的格式和思维方式.在发布此信息之前,我已经做出了很大的努力来解决我的问题.我的问题的一部分可能是缺乏对Ubuntu或Node.js中软件包的了解,因此请指导我.

我正在尝试从针对Node.js应用程序的QUnit测试中为Jenkins创建XUnit xml文件.我没有运行浏览器甚至是无头浏览器的能力,也不了解为什么我需要一个浏览器,因为Node.js代码无法处理浏览器.

I'm trying to create a XUnit xml file for Jenkins from QUnit tests for a Node.js application. I don't have the ability to run a browser or even a headless browser, also don't understand why I'd need one since the Node.js code doesn't deal with the browser.

我一直在搜索,直到使用qunit-tap和'prove'创建XML文件才成功.证明需要下载一个格式化文件,该格式化文件是一个perl文件.我们正在尝试防止使用Perl的东西.

I've been searching all over and have only been successful using qunit-tap and 'prove' to create an XML file. Prove required downloading a formatter which was a perl file. We are trying to prevent using perl stuff.

我的系统是Ubuntu VM.这是一项工作,我的老板正在要求最少数量的软件包和依赖项.我们的Node.js服务器正在接受Web套接字请求,并使用php编写的旧系统来回传递消息.

My system is an Ubuntu VM. This is a task for work and my boss is asking for the minimal amount of packages and dependencies. Our Node.js server is accepting web socket requests and passing messages back and forth with a legacy system written in php.

QUnit的输出似乎是一种漂亮的打印格式,在表格中.仅仅用一个标志将其变成一个扁平的形式真是太神奇了!

QUnit's output seems to be a pretty print format, in a table, when I run my tests in the console. It would be amazing to just get that into a flatter form with a flag!

提前谢谢!

推荐答案

同上,上面的回答很好

使用junit报告并将其连接到标准jenkins单元测试插件-> http://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin

use the junit report out and connect it to the standard jenkins unit testing plugin -> http://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin

为了易于在机器上配置自安装的nodejs,我必须推荐出色的-> http://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin

for nice easy to configure self-installed nodejs on the machine, i have to recommend the excellent -> http://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin

对于jshint/csslint报告,我找到了 https://wiki.jenkins -ci.org/display/JENKINS/Checkstyle+Plugin 插件非常好,jshint和csslint都输出到此

for jshint/csslint reports, i found the https://wiki.jenkins-ci.org/display/JENKINS/Checkstyle+Plugin plugin very nice, jshint and csslint both output to this

jshint : {
    options : {
        reporter : 'checkstyle',
        reporterOutput : 'reports/jshint.xml',
    },
    src : "..."
},

csslint : {
    strict : {
        options : {
            formatters : [{
                id : 'checkstyle-xml',
                dest : 'reports/csslint.xml'
            }],
            csslintrc: '.csslintrc'
        },
        src : [...],
    },
},

这篇关于将Node.js与QUnit集成到Jenkins的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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