1
我使用Jemmy进行Java GUI测试。是否可以测试关闭应用程序?我如何使用jemmy测试应用程序退出
目前我模拟的退出按钮点击(导致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)
感谢, 安德烈
可能重复(http://stackoverflow.com/questions/6141252/dealing-with-system-exit0-in-junit-tests) – Pops
您可能想要尝试在[此问题]的答案中描述的SecurityManager方法(http://stackoverflow.com/questions/6141252/dealing-with-system-exit0-in-junit-tests)。 – bkimminich