我用QFTest检查Java应用程序。我需要证明HMI在关机时停止。在QFTest中,我创建了一个Jython过程,试图向HMI发送套接字,如果不能,则意味着HMI停止,然后测试正常。这里是Jython脚本:
import threading
import time
rc.setLocal("returnValue", False)
for i in range(50):
time.sleep(0.5)
try:
# here we try to send a socket to HMI
rc.toSUT("client", vars)
except:
# here there was an exception trying to send the socket, the HMI is shutdown: test OK."
rc.setLocal("returnValue", True)
break
似乎用于将Java程序连接到QFTest的QFTestjavaagent阻止了我的应用程序被完全终止。你有办法证明我的HMI在QFTest程序中被杀死吗?