我正在运行Serenity Jbehave脚本,其中包含具有19行值的示例表,但该脚本仅执行示例表中存在的7行,并且在执行第8行时给出如下异常
控制台的堆栈跟踪为:
Example: {workspaceName=admin, menuName=Admin, menuOption=Parameter Maintenance, portletTitle=Parameter Maintenance}
Given login to CMS as colinw and colinw
Then I Navigate to admin Workspace
When I Select Parameter Maintenance Option from Admin Menu
Then I Verify Portlet Parameter Maintenance is Displayed
Then I Close the Portlet Parameter Maintenance
Then logout from CMS
Example: {workspaceName=admin, menuName=Admin, menuOption=Product Maintenance, portletTitle=Product Type}
Story stories/smoke/ShakeDownScript.story duration of 301 seconds has exceeded timeout of 300 seconds
(AfterStories)
[pool-2-thread-1] INFO net.thucydides.core.webdriver.SystemPropertiesConfiguration - project.build.directory : null
[pool-2-thread-1] INFO net.thucydides.core.webdriver.SystemPropertiesConfiguration - project.reporting.OutputDirectory : null
[pool-2-thread-1] INFO net.thucydides.core.webdriver.SystemPropertiesConfiguration - OutputDirectory : C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
Given login to CMS as colinw and colinw
Then I Navigate to admin Workspace
Generating reports view to 'C:\WCG Automation\CMS\CMS_Automation\target\jbehave' using formats '[stats, console, html, xml, serenityreporter, junitscenarioreporter]' and view properties '{decorateNonHtml=true}'
Reports view generated with 0 stories (of which 0 pending) containing 0 scenarios (of which 0 pending)
Tests run: 47, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 313.246 sec <<< FAILURE! - in wcg.cms.CMSTestSuite
wcg.cms.CMSTestSuite Time elapsed: 3.651 sec <<< ERROR!
java.lang.RuntimeException:org.jbehave.core.embedder.Embedder$RunningStoriesFailed: Failures in running stories:
stories/smoke/ShakeDownScript.story: java.util.concurrent.CancellationException
at org.jbehave.core.embedder.Embedder$ThrowingRunningStoriesFailed.handleFailures(Embedder.java:553)
at org.jbehave.core.embedder.Embedder.handleFailures(Embedder.java:238)
at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:216)
at net.serenitybdd.jbehave.embedders.ExtendedEmbedder.runStoriesAsPaths(ExtendedEmbedder.java:60)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.run(SerenityReportingRunner.java:175)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
Results :
Tests in error:
JUnit4Provider.invoke:128->executeTestSet:153->executeWithRerun:173->execute:283 » Runtime
Tests run: 47, Failures: 0, Errors: 1, Skipped: 0
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO]
[INFO] --- serenity-maven-plugin:1.1.36:aggregate (serenity-reports) @ CMS_Automation ---
[INFO] LOADING LOCAL PROPERTIES FROM C:\WCG Automation\CMS\CMS_Automation\serenity.properties
[INFO] LOADING LOCAL PROPERTIES FROM C:\WCG Automation\CMS\CMS_Automation\serenity.properties
[INFO] LOADING LOCAL PROPERTIES FROM C:\WCG Automation\CMS\CMS_Automation\serenity.properties
[INFO] webdriver.base.url=http://nssrvdfsdev01/calms2cms/
[INFO] serenity.project.name=Automation Testing
[INFO] webdriver.timeouts.implicitlywait=60000
[INFO] project.build.directory : C:\WCG Automation\CMS\CMS_Automation
[INFO] project.reporting.OutputDirectory : null
[INFO] OutputDirectory : C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
[INFO] current_project.base.dir: C:\WCG Automation\CMS\CMS_Automation
Generating HTML Story Reports from C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
Generating HTML Story Reports to C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
[INFO] project.build.directory : C:\WCG Automation\CMS\CMS_Automation
[INFO] project.reporting.OutputDirectory : null
[INFO] OutputDirectory : C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
Merging requirements = [Requirement{name='Smoke', type='feature' parent = 'null', cardNumber='null'}]
Merging requirements = []
Merged requirements set = [Requirement{name='Smoke', type='feature' parent = 'null', cardNumber='null'}]
[INFO] REPORTS GENERATED IN C:\WCG Automation\CMS\CMS_Automation\target\site\serenity
[INFO] REPORT HOME PAGE: C:\WCG Automation\CMS\CMS_Automation\target\site\serenity\index.html
[INFO] Generating release reports for: []
GENERATE CUSTOM REPORTS
[INFO]
[INFO] --- maven-failsafe-plugin:2.18.1:verify (default) @ CMS_Automation ---
[INFO] Failsafe report directory: C:\WCG Automation\CMS\CMS_Automation\target\failsafe-reports
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping Sample Serenity project using JBehave and WebDriver
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 05:25 min
[INFO] Finished at: 2016-08-22T17:26:18+05:30
[INFO] Final Memory: 37M/416M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:verify (default) on project CMS_Automation: There are test failures.
[ERROR]
[ERROR] Please refer to C:\WCG Automation\CMS\CMS_Automation\target\failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
故事执行似乎超过了300秒的超时。有没有办法让我们在框架中将300秒重置为600秒
解决办法很简单。
我在这里找到了一个相关的问答。
您可以使用额外的参数运行测试,例如:
mvn clean verify -DstoryTimeoutInSecs=600
或者将一个属性放在serenity.properties
文件中(如果你有它,它应该在项目的根目录中),如下所示:
story.timeout.in.secs=600
我正在尝试使用Serenity运行一组JBehave用户故事。在使用Serenity-Maven插件生成Serenity测试报告时,我发现超文本标记语言报告和相应的控制台输出两次加载相同的JBehave故事。 是否有任何方法可以防止故事在需求中加载两次? 为了便于参考,提供了控制台输出的一个片段,并对某些敏感细节进行了编辑:
我正在使用Cucumber结合Serenity框架编写一些BDD自动化测试。在我的BDD测试中,我需要一些超时机制,这样如果cucumber场景或Serenity中的一个步骤花费的时间太长,它就会超时,测试就会失败。 我在下面的链接中发现了一些信息:https://groups.google.com/forum/#!topic/cukes/QaPvVMnqDvE 因此,对于Cucumber,步骤定
我正在设置一个多模块maven项目,以使用junit和scriptplay bdd模式为基于浏览器的大型应用程序创建UI测试。 每个模块都按预期单独工作和报告,但是,如果我尝试在项目的顶层运行测试,则测试将运行,但报告不包括所有子模块。 我只从其中一个模块中获得了一份包含详细信息的报告。 我创建了一个简单的测试示例如下; “简单”Maven项目是在Eclipse中创建的,模块测试项目是使用 MVN
我有一个Java Maven项目,使用Serenity BDD (serenity-bdd)结合Selenium来运行自动化测试。pom.xml包含serenity-bdd依赖项 当我导入时,确保类不可用。其他类 sush Actor 可用: 我已经更新了Maven存储库。我也关注了这个文档:https://serenity-bdd.github.io/theserenitybook/latest
我有一种情况,其中两个WebServer是用nginx作为loadbalancer设置的,它们本身是后端。发行版是Debian Wheezy。两台服务器上的配置相同(四核32GB RAM) TCP协议
null 我们得出的结论是,客户端可以连接到Nginx,但是Nginx在将请求重定向到FPM(可以通过端口7777访问)时没有收到响应,并显示超时错误。我们一直致力于解决Nginx和FPM之间的通信问题,但几个小时后,我们还没有找到解决方案。 注意:这个问题在我们设置的四个虚拟机中重复出现。 Nginx错误日志(注意:主机名和ip已被取消) 文件:/etc/nginx/fastcgi_params