我能得到一些关于配置Jenkins使用yslow的帮助吗?
我在lightning speach上看到它可以用CI实现,但它没有给出太多关于如何做这件事的信息。我已经在谷歌上搜索了相当多的yslow和CI或jenkins,但都找不到任何东西。
有谁能给我指个方向吗?
发布于 2012-07-12 03:50:54
对不起,看起来像someone destroyed YSlow for PahntomJS wiki page,但它又回来了,请在:https://github.com/marcelduran/yslow/wiki/PhantomJS上查看它
有Jenkins截图,但没有一步一步的集成,我只是用以下内容更新了wiki:
一旦你为PhantomJS安装了Jenkins、PhantomJS和YSlow并正常工作,只需将以下外壳命令添加到你的构建过程中:
phantomjs /tmp/yslow.js -i grade -threshold "B" -f junit http://built-page-here > yslow.xml
在上面的一行中:
junit脚本位于/tmp/yslow.js
-i grade
指定所有规则将为tested
-threshold "B"
指定所有规则的最低可接受分数以及整体score
-f junit
指定Jenkins
http://built-url-here
的输出格式是可访问的构建页面project
yslow.xml
的url是以如果你已经安装了TAP插件(通过Jenkins插件管理器),你可以替换上面的行,或者添加另一个测试,如下所示:
上面一行中的phantomjs /tmp/yslow.js -i grade -threshold "B" -f tap http://built-page-here > yslow.tap
:
Jenkins脚本位于/tmp/yslow.js
-i grade
指定所有规则均为tested
-threshold "B"
指定所有规则的最低可接受分数以及总体score
-f tap
指定TAP的输出格式Jenkins plugin
http://built-url-here
是可访问的构建页面project
yslow.tap
的url是以TAP格式表示的输出结果确保在指向输出测试结果文件的构建后操作中发布JUnit和/或点击results report,例如: yslow.xml、yslow.tap等。
https://stackoverflow.com/questions/11419284
复制相似问题