Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Squish将应用程序上下文设置为由测试中的aut启动的aut_Python_Qt_Squish - Fatal编程技术网

Python Squish将应用程序上下文设置为由测试中的aut启动的aut

Python Squish将应用程序上下文设置为由测试中的aut启动的aut,python,qt,squish,Python,Qt,Squish,在python中,是否可以将应用程序上下文设置为第二个gui,该gui由被测gui调用 例如:我们使用startApplication启动一个名为test1.exe的应用程序。单击text1.exeGUI中的按钮将调用另一个名为test2.exe的GUI应用程序 现在是否可以将应用程序上下文设置为test2.exeGUI?Squish for Qt要求子进程由Squish_dir/bin/startaut.exe启动(然后使用attachToApplication()),Squish_dir/b

在python中,是否可以将应用程序上下文设置为第二个gui,该gui由被测gui调用

例如:我们使用
startApplication
启动一个名为
test1.exe
的应用程序。单击
text1.exe
GUI中的按钮将调用另一个名为
test2.exe
的GUI应用程序


现在是否可以将应用程序上下文设置为
test2.exe
GUI?

Squish for Qt要求子进程由Squish_dir/bin/startaut.exe启动(然后使用attachToApplication()),Squish_dir/bin/dllpreload.exe(自动连接),或者将内置挂钩编译到其中

在某些情况下,您可以通过执行以下操作(记录在中)逃脱:

  • test2.exe重命名为test2.exe
  • 将\u qt\u dir/bin/dllpreload.exe的squish\u复制到与test2\uu.exe相同的文件夹中,并将其重命名为test2.exe
通过这种方式,test1.exe将调用test2.exe,它现在是dllpreload.exe,这将导致dllpreload.exe启动test2.exe


如果test1.exe需要进程IDtest2.exe,或者test2.exe需要其父进程的进程ID,则此方法将不起作用,因为在这两种情况下,都是重命名的dllpreload.exe。如果test1.exetest2.exe尝试通过它们的stdout、stderr、stdin流彼此通信(因为dllpreload.exe没有设置此功能)。

尝试在测试套件设置中选择“连接到子进程…”