Maven Surefire 插件与转储文件的问题 - Java Maven

问题描述 投票:0回答:1

我面临 Surefire 插件的问题,由于某些奇怪的原因测试失败,我收到此错误,想法是在本地运行测试而不出现任何问题。我的问题有解决方案吗?这是我第一次遇到此消息的问题,也许您会知道如何解决它。

Please refer to C:\Users\rener\IdeaProjects\parking-time-microservice\application\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

这是我的pom

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.parkingtime</groupId>
        <artifactId>parking-time-project</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <artifactId>application</artifactId>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>${io.jsonwebtoken.version}</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>${io.jsonwebtoken.version}</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId>
            <version>${io.jsonwebtoken.version}</version>
        </dependency>

        <dependency>
            <groupId>com.parkingtime.parking-time-project</groupId>
            <artifactId>common</artifactId>
            <version>${parent.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.1.2</version>
            </plugin>
        </plugins>
    </build>
</project>
java spring-boot maven maven-surefire-plugin
1个回答
0
投票

尝试

@Test
void contextLoads() {

} 和

mvn clean install

请将您的结果发送给我

© www.soinside.com 2019 - 2024. All rights reserved.