2017-05-16 12:20:37 +00:00
|
|
|
class Allure < Formula
|
|
|
|
desc "Flexible lightweight test report tool"
|
|
|
|
homepage "https://github.com/allure-framework/allure2"
|
2017-09-07 09:10:46 +00:00
|
|
|
url "https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.3.5/allure-2.3.5.zip"
|
|
|
|
sha256 "4dec89b03e502768ddd7829575b3b528854098a8c93c9d61b1da6e75da868539"
|
2017-05-16 12:20:37 +00:00
|
|
|
|
|
|
|
bottle :unneeded
|
|
|
|
|
|
|
|
depends_on :java => "1.8"
|
|
|
|
|
|
|
|
def install
|
|
|
|
# Remove all windows files
|
|
|
|
rm_f Dir["bin/*.bat"]
|
|
|
|
|
|
|
|
prefix.install_metafiles
|
|
|
|
libexec.install Dir["*"]
|
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"allure-results/allure-result.json").write <<-EOS.undent
|
|
|
|
{
|
|
|
|
"uuid": "allure",
|
|
|
|
"name": "testReportGeneration",
|
|
|
|
"fullName": "org.homebrew.AllureFormula.testReportGeneration",
|
|
|
|
"status": "passed",
|
|
|
|
"stage": "finished",
|
|
|
|
"start": 1494857300486,
|
|
|
|
"stop": 1494857300492,
|
|
|
|
"labels": [
|
|
|
|
{
|
|
|
|
"name": "package",
|
|
|
|
"value": "org.homebrew"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "testClass",
|
|
|
|
"value": "AllureFormula"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "testMethod",
|
|
|
|
"value": "testReportGeneration"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system "#{bin}/allure", "generate", "#{testpath}/allure-results", "-o", "#{testpath}/allure-report"
|
|
|
|
end
|
|
|
|
end
|