- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试让 jBehave 处理我的 2 模块 Google App Engine 项目,该项目以 https://github.com/ctesniere/appengine-modules-sample-java 为模型。 。我使用 Maven 生成了 jBehave 原型(prototype) (jbehave-simple-archetype
)。我能够成功运行它。
但是,当我手动将更改应用于目标项目上的 pom.xml 并复制 jBehave 原型(prototype)生成的两个 java 文件时,我无法成功 mvn clean install
。
我收到以下错误:
[INFO] --- jbehave-maven-plugin:3.9.5:run-stories-as-embeddables (embeddable-stories) @ followerdownloader-frontend ---
[INFO] Running stories as embeddables using embedder Embedder[storyMapper=StoryMapper,storyRunner=StoryRunner,embedderMonitor=MavenEmbedderMonitor,classLoader=EmbedderClassLoader[urls=[/Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/target/classes/, appengine-api-1.0-sdk-1.9.17.jar, servlet-api-2.5.jar, jstl-1.2.jar, jbehave-core-3.9.5.jar, hamcrest-integration-1.3.jar, commons-collections-3.2.1.jar, commons-io-2.4.jar, commons-lang-2.6.jar, plexus-utils-3.0.10.jar, freemarker-2.3.19.jar, paranamer-2.4.jar, xstream-1.4.5.jar, xmlpull-1.1.3.1.jar, xpp3_min-1.1.4c.jar],parent=ClassRealm[plugin>org.jbehave:jbehave-maven-plugin:3.9.5, parent: sun.misc.Launcher$AppClassLoader@6da21389]],embedderControls=UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]],embedderFailureStrategy=<null>,configuration=org.jbehave.core.configuration.MostUsefulConfiguration@3ba4236f,candidateSteps=<null>,stepsFactory=<null>,metaFilters=[],systemProperties=<null>,executorService=<null>,executorServiceCreated=false,storyManager=<null>]
[INFO] Found class names: [com.netbase.jbehaveexample.MyStories]
[INFO] Using controls UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]]
[INFO] Running embeddable com.netbase.jbehaveexample.MyStories
[INFO] Processing system properties {}
[INFO] Using controls UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]]
(BeforeStories)
(AfterStories)
[INFO] Generating reports view to '/Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/target/jbehave' using formats '[stats, console, txt, html, xml]' and view properties '{navigator=ftl/jbehave-navigator.ftl, views=ftl/jbehave-views.ftl, reports=ftl/jbehave-reports-with-totals.ftl, nonDecorated=ftl/jbehave-report-non-decorated.ftl, decorated=ftl/jbehave-report-decorated.ftl, maps=ftl/jbehave-maps.ftl}'
java.io.FileNotFoundException: /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/target/jbehave/storyDurations.props (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileReader.<init>(FileReader.java:72)
at org.jbehave.core.reporters.TemplateableViewGenerator.storyDurations(TemplateableViewGenerator.java:123)
at org.jbehave.core.reporters.TemplateableViewGenerator.generateReportsView(TemplateableViewGenerator.java:115)
at org.jbehave.core.embedder.Embedder.generateReportsView(Embedder.java:249)
at org.jbehave.core.embedder.Embedder.generateReportsView(Embedder.java:237)
at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:213)
at org.jbehave.core.junit.JUnitStories.run(JUnitStories.java:20)
at org.jbehave.core.embedder.Embedder.runAsEmbeddables(Embedder.java:121)
at org.jbehave.mojo.RunStoriesAsEmbeddables.execute(RunStoriesAsEmbeddables.java:18)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] Reports view generated with 0 stories (of which 0 pending) containing 0 scenarios (of which 0 pending)
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ followerdownloader-frontend ---
[INFO] Installing /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/target/followerdownloader-frontend-1.0.war to /Users/mosofsky/.m2/repository/com/netbase/followerdownloader/followerdownloader-frontend/1.0/followerdownloader-frontend-1.0.war
[INFO] Installing /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/pom.xml to /Users/mosofsky/.m2/repository/com/netbase/followerdownloader/followerdownloader-frontend/1.0/followerdownloader-frontend-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.363 s
[INFO] Finished at: 2014-12-22T14:53:51-08:00
[INFO] Final Memory: 22M/222M
[INFO] ------------------------------------------------------------------------
我找不到名为 behave/storyDurations.props
的文件来从原型(prototype)构建复制到我自己的项目。我错过了什么?
最佳答案
缺少从原型(prototype)复制到新项目的文件是stories/my.story
。尽管该错误与其他问题有关,但当我复制 my.story 文件时,我能够消除此错误:
[INFO] --- jbehave-maven-plugin:3.9.5:run-stories-as-embeddables (embeddable-stories) @ followerdownloader-frontend ---
[INFO] Running stories as embeddables using embedder Embedder[storyMapper=StoryMapper,storyRunner=StoryRunner,embedderMonitor=MavenEmbedderMonitor,classLoader=EmbedderClassLoader[urls=[/Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/target/classes/, appengine-api-1.0-sdk-1.9.17.jar, servlet-api-2.5.jar, jstl-1.2.jar, jbehave-core-3.9.5.jar, hamcrest-integration-1.3.jar, commons-collections-3.2.1.jar, commons-io-2.4.jar, commons-lang-2.6.jar, plexus-utils-3.0.10.jar, freemarker-2.3.19.jar, paranamer-2.4.jar, xstream-1.4.5.jar, xmlpull-1.1.3.1.jar, xpp3_min-1.1.4c.jar],parent=ClassRealm[plugin>org.jbehave:jbehave-maven-plugin:3.9.5, parent: sun.misc.Launcher$AppClassLoader@6da21389]],embedderControls=UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]],embedderFailureStrategy=<null>,configuration=org.jbehave.core.configuration.MostUsefulConfiguration@2b37d486,candidateSteps=<null>,stepsFactory=<null>,metaFilters=[],systemProperties=<null>,executorService=<null>,executorServiceCreated=false,storyManager=<null>]
[INFO] Found class names: [com.netbase.jbehaveexample.MyStories]
[INFO] Using controls UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]]
[INFO] Running embeddable com.netbase.jbehaveexample.MyStories
[INFO] Processing system properties {}
[INFO] Using controls UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]]
(BeforeStories)
[INFO] Running story com/netbase/jbehaveexample/stories/my.story
(com/netbase/jbehaveexample/stories/my.story)
Scenario: A scenario with some pending steps
Given I am a pending step (PENDING)
And I am still pending step (PENDING)
When a good soul will implement me (PENDING)
Then I shall be happy (PENDING)
@Given("I am a pending step")
@Pending
public void givenIAmAPendingStep() {
// PENDING
}
@Given("I am still pending step")
@Pending
public void givenIAmStillPendingStep() {
// PENDING
}
@When("a good soul will implement me")
@Pending
public void whenAGoodSoulWillImplementMe() {
// PENDING
}
@Then("I shall be happy")
@Pending
public void thenIShallBeHappy() {
// PENDING
}
(AfterStories)
[INFO] Generating reports view to '/Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/target/jbehave' using formats '[stats, console, txt, html, xml]' and view properties '{navigator=ftl/jbehave-navigator.ftl, views=ftl/jbehave-views.ftl, reports=ftl/jbehave-reports-with-totals.ftl, nonDecorated=ftl/jbehave-report-non-decorated.ftl, decorated=ftl/jbehave-report-decorated.ftl, maps=ftl/jbehave-maps.ftl}'
[INFO] Reports view generated with 1 stories (of which 1 pending) containing 1 scenarios (of which 1 pending)
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ followerdownloader-frontend ---
[INFO] Installing /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/target/followerdownloader-frontend-1.0.war to /Users/mosofsky/.m2/repository/com/netbase/followerdownloader/followerdownloader-frontend/1.0/followerdownloader-frontend-1.0.war
[INFO] Installing /Users/mosofsky/Developer/FollowerDownloader/followerdownloader-frontend/pom.xml to /Users/mosofsky/.m2/repository/com/netbase/followerdownloader/followerdownloader-frontend/1.0/followerdownloader-frontend-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.486 s
[INFO] Finished at: 2014-12-22T15:08:01-08:00
[INFO] Final Memory: 22M/229M
[INFO] ------------------------------------------------------------------------
复制 .story 文件使 jbehave/storyDurations.props 错误的 java.io.FileNotFoundException 消失。
==================
更新:另一个解决方案是建立一个指向包含故事文件的目录的符号链接(symbolic link)。如果您有多个 Google App Engine 模块,但您想要跨模块共享故事文件,这非常有用。有关如何设置符号链接(symbolic link)(“symlink”)的说明,请参阅其他解决方案:https://stackoverflow.com/a/28137844/2848676
关于jbehave/storyDurations.props 的 java.io.FileNotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27611890/
我使用 jBehave 和 WebDriver 创建了一些测试。 当我通过 Maven 执行它们时,执行是安全的: 测试 1 打开导航 执行第一个故事的所有步骤 关闭导航 测试 2 打开导航 执行第二
我想从 JBehave 生成一份报告,其中仅列出每个场景的名称和通过/失败状态。如果根据场景结果给出故事的通过/失败状态(如果所有场景都通过故事通过),则可获得奖励积分。像这样的东西: PASS:
我的故事情节如下 Scenario: Given user is on Login page When user types login details with xxx as user xxx as
我正在使用 JBehave 进行场景测试。 在使用教程时,我在 pom.xml 中收到如下错误 Missing artifact org.jbehave:jbehave-core:zip:resour
这是我可以开始工作的示例。 http://ivanz.com/2011/05/25/java-bdd-with-jbehave-and-watij-in-eclipse-with-junit/ 问题:
我在 eclipse 的 jbehave .feature 文件中使用 JUnitReportingRunner,如下所示。但仅运行 BeforeStories 和 AfterStories,并且 .
当我运行在 eclipse 中编写的 jbehave IT 测试时出现此异常。 org.jbehave.core.io.storyresourcenotfound 我在 test/java/packa
以下步骤: 创建新的 Maven Java 项目 下载 JBehave JAR 文件版本 3.6.8 并将其添加到配置构建路径 > 添加外部 jar 并添加 JUnit4 通过帮助安装 Eclipse
我不知道为什么,但 JBehave 没有考虑给定故事中的失败。如果给定故事发生故障,它将不会执行该故事的其余步骤,但会执行给定故事的其余步骤。这是一个例子: GivenStories: stories
我在 JBehave 中有一个“何时”,在某些情况下应该抛出异常。但是,我找不到任何有关如何处理此问题的文档。这是我的场景: 假设游戏有 6 个现有赌注,且游戏的最大赌注为 6当用户下注时 没有 th
我正在尝试创建并运行一个简单的 JUnitStory 来运行 .story 文件。 我有这个: class Scenario1 extends JUnitStory { @Delegate M
我已将 jbehave 与 Selenium 集成。我正在通过命令行运行测试,如下所示 C:\eclipse_workspace\MySeleniumTests>mvn clean test -Dwe
想象一下我有以下jBehave故事: When I create servers with properties: | processor | ram | os | | i5 | 8
我已经创建了故事/场景。喜欢: Scenario: Create a new Firm Given a Firm Test When Firm Test is valid Then New Firm
您好,我有一个场景,我需要测试搜索服务是否返回正确的结果。所以我的故事看起来像这样: Narrative: In order to easily discover if a player is reg
我正在尝试实现一个简单的程序来学习如何使用 jBehave!!。该程序正在添加两个数字。我从这里安装了eclipse的插件 http://jbehave.org/eclipse-integration
我为 JBehave 自动测试编写了一些场景。这里需要写几个相似的场景,不同的是常量参数。 为了不复制很多脚本,我希望将参数添加到我的故事中,并使用不同的参数多次调用它。 我如何使用“GivenSto
我的情况是这样的: 我有一个包含多个场景的 JBehave 故事。每个场景都会写入一些文件,检查它们是否符合预期。然后下一个场景的 @BeforeScenario 导致框架删除输出文件。 当某些场景失
我在 eclipse 中使用 maven 有一个 Jbehave 和 selenium 项目。最初我是为一个故事做的,但现在我写了两个故事,我希望这两个故事在测试中运行。但只有一个故事文件通过程序。我
我正在使用 JBehave 编写 BDD 集成测试。 问题:JBehave 在执行单个步骤时清除对象(实例变量)的状态 代码:步骤定义: public class StepDefs { pri
我是一名优秀的程序员,十分优秀!