- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在单独的 maven 配置文件中运行集成测试,因此我需要按以下步骤进行:
mvn install -Pit
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.1.4</version>
<configuration>
<wait>false</wait>
<container>
<containerId>tomcat7x</containerId>
<home>${env.CATALINA_HOME}</home>
<timeout>300000</timeout>
</container>
<configuration>
<type>standalone</type>
<home>target/tomcat7x</home>
<properties>
<cargo.jvmargs>-XX:PermSize=256m -XX:MaxPermSize=512m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled</cargo.jvmargs>
</properties>
</configuration>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
<goal>deploy</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
<logOutput>true</logOutput>
</configuration>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-server</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8</version>
<configuration>
<junitArtifactName>
org.junit:com.springsource.org.junit
</junitArtifactName>
<excludes>
<exclude>**/unit/*Test.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>**/integration/*Test.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<activation>
<property>
<name>it</name>
</property>
</activation>
</profile>
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building My APP
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [jaxws:wsimport {execution: default}]
[debug] execute contextualize
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[debug] execute contextualize
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: C:\Workspace\MyAPP\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running integration.MyTest
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<configuration>
<skipTests>true</skipTests>
</configuration>
</execution>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<includes>
<include>**/integration/*Test.java</include>
</includes>
<skipTests>false</skipTests>
</configuration>
</execution>
</executions>
<configuration>
<argLine>-Xms256M -Xmx768M -XX:MaxPermSize=256M</argLine>
</configuration>
</plugin>
最佳答案
根据日志,很明显失败是因为surefire正在运行test
中的集成测试。相而不是integration-test
阶段。
This link说,如何仅将surefire用于集成测试。
This documentation更深入地了解 Maven 和集成测试的最佳实践。
关于jakarta-ee - 如何在运行集成测试之前启动tomcat?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8893482/
我想了解为什么一些 Jakarta EE 规范是空的。 例如 Jakarta Annotations规范由免责声明和快速描述(3 行)组成,但是有 Javadoc . 当 JCP 负责 J2EE 规范
我正在研究 OpenNTF 项目“XPages Jakarta EE Support”。 我正在尝试为 Person 对象上的 CRUD 操作设置 REST API。我设法创建 GET 和 POST
我正在研究 OpenNTF 项目“XPages Jakarta EE Support”。 我正在尝试为 Person 对象上的 CRUD 操作设置 REST API。我设法创建 GET 和 POST
我正在采用 Jakarta EE 9 并使用 EJB 和 WEB 模块开发一个 EE 应用程序。 EJB 已经完成并部署在 Glassfish 6(Jakarta EE 9 的 RI 实现)上。现在,
OpenLiberty(v20.0.0.2-beta 或其他版本)中是否有办法将 jakarta ee 9(通过 webProfile-9.0 或 jakartaee-9.0 或任何仅 jakarta
在使用Spring Boot 3.0.7并试图保持更新时,我遇到了这个错误,不知道它是什么意思。。加载的依赖项是Spring Security 6.0.9,问题存在于使用Java 17或19的情况下(
有没有办法在 JPA 实体监听器中检查当前事务是否已提交,如下所示? @ApplicationScoped public class EntityListener { @Inject
以下代码使用 javamail api 通过 gmail smtp 服务器发送邮件和附件。 public void doSendGmail(){ from = txtFrom.getT
大家好我有一个应用程序(spring+hibernate)需要同时发送数千封电子邮件我被告知这里最好的解决方案是有一个邮件服务器我不知道从哪里开始,或者是否有更好的框架或服务所以请大家给我一些信息,从
我正在尝试从 Java 邮件的文件夹中删除/删除消息(在我将其复制到另一个文件夹之后),这是我的代码: Flags deleted = new Flags("DELETED"); folder.se
某些页面可以接收称为“P1”的特定请求参数: page.do?P1=value1 现在,一个scriptlet正在测试request参数的存在,如果P1为“value1”,则会在页面上呈现一些信息。
我有一段非常类似于此http://java.sun.com/developer/onlineTraining/JavaMail/contents.html#JavaMailFetching的代码 我的
我在NetBeans中创建了一个Java Web应用程序项目,并在其中创建了一个启动bean: package malibu.util; import javax.annotation.PostCon
我有两个不同的项目:A 和 B。 B 包含一个拦截器,我想在项目 A 以及将来的项目 C 和 D 中使用它。 我在两个项目中都使用 jboss-javaee-6.0 版本 3.0.3.Final(这意
我一直在阅读 “Java 事务” ,我一直困惑它是什么?什么是有用的? 最佳答案 你可以谷歌搜索并找到这样的页面:http://www.java-tips.org/java-ee-tips/enter
这个问题在这里已经有了答案: What exactly is Java EE? (5 个回答) Difference between an application server and a servl
Web 应用程序的用户界面通常包含用于执行 CRUD 操作的各种按钮。在执行以下操作时,按钮标签的建议命名约定是什么? 用户创建(添加用户...或添加用户或添加用户) 事件创建(添加事件...或添加事
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
我对java网页环境很陌生。最近尝试用Java开发一个电子商务平台。 因此,我使用 j_security_check 基于表单作为我的身份验证工具。身份验证完成后,成功重定向到所需页面。 但是,由于我
什么时候 我通过无状态服务从数据库中获取实体, 然后在另一个 bean 和 中修改它 然后想通过无状态服务将其保存到数据库中, 我注意到实体已分离。我认为因为无状态服务的持久化上下文,实体从被夺取到存
我是一名优秀的程序员,十分优秀!