لن يسمح القط المضمن بتشغيل قصص السيلينيوم/jbehave الخاصة بي
-
11-12-2019 - |
سؤال
أحاول من أجل Tomcat المضمن للبدء قبل اختبارات التكامل (استخدمي السيلينيوم + JBehave) و توقف بعد ذلك بقليل.
إليك كيف حاولت تكوين maven:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<id>start-tomcat</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>stop-tomcat</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
ومع ذلك، يبدأ Tomcat بشكل جيد عندما أركض mvn integration-test
ويبدو أنها لن تسمح لقصصي أن تستمر..
هل أستطيع مساعدتك؟
المحلول
أعتقد أنني وجدت الحل.يعمل مع التكوين التالي:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<fork>true</fork>
</configuration>
<executions>
<execution>
<id>start-tomcat</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>stop-tomcat</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
لاحظ عنصر التكوين المضافة الذي يخبر القط بالشوكة.
لا تنتمي إلى StackOverflow