【发布时间】:2011-08-17 15:59:10
【问题描述】:
我使用 Jemmy 进行 Java GUI 测试。是否可以测试关闭应用程序?
目前我模拟点击退出按钮(导致System.exit(0)),测试失败:
junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154)
谢谢, 安德烈
【问题讨论】:
-
您可能想尝试this question 的答案中描述的 SecurityManager 方法。