尝试运行 jBehave 场景时出现 ScenarioNotFoundException

发布于 2024-09-14 21:09:41 字数 580 浏览 0 评论 0原文

我已经在谷歌上搜索了一段时间,试图找到解决这个问题的方法,但没有真正的运气。我在尝试运行 jBehave 测试时遇到此问题 -

org.jbehave.scenario.errors.ScenarioNotFoundException: Path '$Path_to_jBehave_Directory' 
could not be found by classloader sun.misc.Launcher$AppClassLoader@f4a24a ...

我的文本场景、Steps 类和场景类都位于同一目录 ($Path_to_jBehave_Directory) 中。

这就是我在我的 maven pom 中使用的:

<dependency>
  <groupId>org.jbehave</groupId>
  <artifactId>jbehave-core</artifactId>
  <version>2.5</version>
</dependency>

任何帮助将不胜感激!

I've been Google-ing around for a while trying to figure out a fix for this with no real luck. I'm getting this when trying to run a jBehave test -

org.jbehave.scenario.errors.ScenarioNotFoundException: Path '$Path_to_jBehave_Directory' 
could not be found by classloader sun.misc.Launcher$AppClassLoader@f4a24a ...

My textual scenario, Steps class, and scenario class are all in the same directory ($Path_to_jBehave_Directory).

This is what I'm using in my maven pom :

<dependency>
  <groupId>org.jbehave</groupId>
  <artifactId>jbehave-core</artifactId>
  <version>2.5</version>
</dependency>

Any help would be greatly Appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天煞孤星 2024-09-21 21:09:41

Maven 不会自动将 .story 文件复制到测试类路径,除非您告诉它:

    <testResources>
        <testResource>
            <directory>src/test/java</directory>
            <includes>
                <include>**/*.story</include>
            </includes>
        </testResource>
    </testResources>

Maven does not automatically copy .story files to test classpath unless you tell it to:

    <testResources>
        <testResource>
            <directory>src/test/java</directory>
            <includes>
                <include>**/*.story</include>
            </includes>
        </testResource>
    </testResources>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文