سؤال

لقد كنت في جوجل حولها لفترة من الوقت في محاولة لمعرفة إصلاح لهذا دون حظ حقيقي. أحصل على هذا عند محاولة إجراء اختبار jbehave -

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

إن السيناريو النصي الخاص بي ، فئة الخطوات ، ودرس السيناريو كلها في نفس الدليل ($ path_to_jbehave_directory).

هذا ما أستخدمه في Maven Pom:

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

أي مساعدة سيكون موضع تقدير كبير!

هل كانت مفيدة؟

المحلول

لا يقوم Maven تلقائيًا بنسخ ملفات .story لاختبار ClassPath إلا إذا أخبرتها بـ:

    <testResources>
        <testResource>
            <directory>src/test/java</directory>
            <includes>
                <include>**/*.story</include>
            </includes>
        </testResource>
    </testResources>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top