Ошибка тайм-аута Serenity BDD

Я запускаю сценарии 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 секунд в рамках


person Santhosh S    schedule 22.08.2016    source источник


Ответы (1)


Решение довольно простое.

Я нашел связанный вопрос и ответил здесь.

Вы можете запустить тесты с дополнительным аргументом, например:

mvn clean verify -DstoryTimeoutInSecs=600

Или поместите свойство в файл serenity.properties (который должен быть в корне вашего проекта, если он у вас есть) следующим образом:

story.timeout.in.secs=600
person Traveller    schedule 29.09.2016