我正在为我的geb-spock项目使用spock报告。我观察到,当我从Intellij IDE执行我的测试用例时,如果失败,它会提供很多详细信息日志,但是在html报告文件中没有提取相同内容。
请参考以下示例。 来自Intellij IDE的Stacktrace:
geb.waiting.WaitTimeoutException: condition did not pass in 50.0 seconds (failed with exception)
at geb.waiting.Wait.waitFor(Wait.groovy:138)
at geb.Page.verifyThisPageAtOnly(Page.groovy:243)
at geb.Page.getAtVerificationResult(Page.groovy:223)
at geb.Page.verifyAt(Page.groovy:194)
at geb.Browser.doAt(Browser.groovy:457)
at geb.Browser.at(Browser.groovy:356)
at geb.Browser.to(Browser.groovy:573)
at geb.Browser.to(Browser.groovy:550)
at geb.Browser.to(Browser.groovy:539)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
at spec.sprintOne.TC002_SMO_Scenario_Spec.Step 2:User initiates transfer process(TC002_SMO_Scenario_Spec.groovy:50)
Caused by: Assertion failed:
title == "Money Transfer"
| |
| false
Log In with States
at pageobjects.apps.SMOPage._clinit__closure8(SMOPage.groovy:11)
at pageobjects.apps.SMOPage._clinit__closure8(SMOPage.groovy)
at geb.waiting.Wait.waitFor(Wait.groovy:127)
... 10 more
[org.spockframework.runtime.RunContext.stop()] INFO com.athaydes.spockframework.report.template.TemplateReportAggregator - Writing summary report to C:\DurgeshProjectWork\Workspace\IdeaProjects\bdd_geb_spock\target\reports\index.html
以下是index.html中针对同一测试用例失败的屏幕截图:
来自index.html的Stacktrace(与附带的截图相同)
geb.waiting.Wait.waitFor(Wait.groovy:138)
geb.Page.verifyThisPageAtOnly(Page.groovy:243)
geb.Page.getAtVerificationResult(Page.groovy:223)
geb.Page.verifyAt(Page.groovy:194)
geb.Browser.doAt(Browser.groovy:457)
geb.Browser.at(Browser.groovy:356)
geb.Browser.to(Browser.groovy:573)
geb.Browser.to(Browser.groovy:550)
geb.Browser.to(Browser.groovy:539)
geb.spock.GebSpec.methodMissing(GebSpec.groovy:56)
spec.sprintOne.TC002_SMO_Scenario_Spec.Step 2:User initiates transfer process(TC002_SMO_Scenario_Spec.groovy:50)
那么有没有办法在index.html中获取更多细节。 我也从github引用了这个问题:GitHub Spock report issue 66
然而,我无法做到这一点。你能帮我解决这个问题。
谢谢, Durgesh