通过命令行启动java test

时间:2010-02-25 12:59:45

标签: java automated-tests launch

我创建了runner.bat来启动一个java测试 它包含:java的路径,classpath org.junit.runner.JUnitCore package.class 当我启动它时:

  

失败测试运行:1,失败:1

Exception in thread "Thread-0" java.lang.IllegalStateException: Shutdown in progress
        at java.lang.ApplicationShutdownHooks.add(Unknown Source)
        at java.lang.Runtime.addShutdownHook(Unknown Source)
        at com.sun.imageio.stream.StreamCloser$2.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.imageio.stream.StreamCloser.addToQueue(Unknown Source)
        at javax.imageio.stream.FileCacheImageInputStream.<init>(Unknown Source)
        at com.sun.imageio.spi.InputStreamImageInputStreamSpi.createInputStreamInstance(Unknown Source)
        at javax.imageio.ImageIO.createImageInputStream(Unknown Source)
        at javax.imageio.ImageIO.read(Unknown Source)
        at com.polyspace.util.guicomponent.CompositePanel.setBufferedImage(Unknown Source)
        at com.polyspace.util.guicomponent.CompositePanel.<init>(Unknown Source)

1 个答案:

答案 0 :(得分:0)

如果在调用方法时JVM已经关闭,则运行时,运行时,如果JVM已经关闭,则运行时会抛出IllegalStateException。

在CompositePanel构建完成之前,是否会导致测试结束? (例如,在单独的线程中运行的东西。)