**结束。**此问题需要详细的调试信息。它目前不接受答案。
**想改进这个问题吗?**更新问题,使其成为堆栈溢出的主题。
5天前关门了。
改进这个问题
我使用testng进行单元测试。它在java8上运行得很好,但当我升级到Java11时,出现了以下错误:
[ERROR] test(com.dhruv.test.service.impl.ThirdPartyIntegrationServiceImplTest) Time elapsed: 0.045 s <<< FAILURE!
java.lang.ArrayIndexOutOfBoundsException: Index 37130 out of bounds for length 153
下面是pom.xml中的maven surefire插件
<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<it.db_port>${db_port}</it.db_port>
<it.redis_port>${redis_port}</it.redis_port>
<it.service_port>${service.port}</it.service_port>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng-unit.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>bitbucket</id>
</profile>
</profiles>
测试等级:
import static org.testng.Assert.assertTrue;
import org.testng.annotations.Test;
import com.dhruv.service.impl.ThirdPartyIntegrationServiceImpl;
import mockit.Tested;
public class ThirdPartyIntegrationServiceImplTest {
@Tested
private ThirdPartyIntegrationServiceImpl integrationService;
@Test
public void test() {
assertTrue(Boolean.TRUE);
}
}
暂无答案!
目前还没有任何答案,快来回答吧!