yslow を使用するように Jenkins を構成する方法を教えてください。
yslow のライトニング スピーチで CI を使用して実装できることを見ましたが、これを行う方法についてはあまり情報がありませんでした。グーグルで yslow と CI またはジェンキンスをかなり検索しましたが、何も見つかりませんでした。
誰かが私を正しい方向に向けることができますか?
yslow を使用するように Jenkins を構成する方法を教えてください。
yslow のライトニング スピーチで CI を使用して実装できることを見ましたが、これを行う方法についてはあまり情報がありませんでした。グーグルで yslow と CI またはジェンキンスをかなり検索しましたが、何も見つかりませんでした。
誰かが私を正しい方向に向けることができますか?
Sorry, seem like someone destroyed YSlow for PahntomJS wiki page but it's back again, check it out at: https://github.com/marcelduran/yslow/wiki/PhantomJS
There was Jenkins screenshot but no step-by-step integration, I just updated the wiki with the following:
Once you have Jenkins, PhantomJS and YSlow for PhantomJS installed and working properly, just add the following shell command into your building process:
phantomjs /tmp/yslow.js -i grade -threshold "B" -f junit http://built-page-here > yslow.xml
In line above:
/tmp/yslow.js
-i grade
specifies that all rules will be tested-threshold "B"
specifies the lowest acceptable score for all rules as well as overall score-f junit
specifies the output format for Jenkinshttp://built-url-here
is the reachable built page url of your projectyslow.xml
is the output results in junit formatIf you have TAP plugin installed (via Jenkins plugin manager), you can replace the line above or add another test as follows:
phantomjs /tmp/yslow.js -i grade -threshold "B" -f tap http://built-page-here > yslow.tap
In line above:
/tmp/yslow.js
-i grade
specifies that all rules will be tested-threshold "B"
specifies the lowest acceptable score for all rules as well as overall score-f tap
specifies the output format for TAP Jenkins pluginhttp://built-url-here
is the reachable built page url of your projectyslow.tap
is the output results in TAP formatMake sure you publish JUnit and/or TAP results report in the post-build actions pointing to the output test results file(s), e.g: yslow.xml, yslow.tap, etc.