简体   繁体   English

一个CUIT测试可以支持测试不同计算机上的两个应用程序吗?

[英]Can one CUIT test support testing two applications that are on different computers?

Can one Coded UI test support the testing of two applications that are on different computers and where the steps rely on each app's test results? 一个编码的UI测试能否支持对不同计算机上的两个应用程序以及步骤取决于每个应用程序的测试结果的测试?

Two applications are resident on two computers. 两个应用程序驻留在两台计算机上。 Eg App1 on Comp1 , and App2 on Comp2 . 例如, 应用1器Comp1,App2组合物2。 The two computers are connected via Ethernet. 两台计算机通过以太网连接。 App1 and App2 talk to each other via TCP/IP. App1App2通过TCP / IP相互通信。 Is it possible within one Coded UI test case to control both App1 and App2 simultaneously, where the actions on App1 need to rely on the results of executing App2 . 一个编码UI测试用例中是否可以同时控制App1App2 ,而App1上的操作需要依赖于执行App2的结果。 Eg click on button A on App1 if label B on App2 == " Sent ". 例如,如果App2上的标签B ==“已发送 ”,则单击App1上的按钮A。

Notice, App1 and App2 are on different computers. 请注意, App1App2在不同的计算机上。

You can't run one test on two different computers at the same time and you can't access another computer's UI from one computer via CUIT. 您不能同时在两台不同的计算机上运行一个测试,也不能通过CUIT从一台计算机访问另一台计算机的UI。 The best solution would be to write two tests: one for App1 and another for App2, and implement a simple socket communication between the two applications/computers and run them locally with mstest or in VS with test agents on the test computers. 最好的解决方案是编写两个测试:一个用于App1,另一个用于App2,并在两个应用程序/计算机之间实现简单的套接字通信,并使用mstest或在VS中使用测试计算机上的测试代理在本地运行它们。 App1 does some things (click on button A) then waits for a message on the socket from App2. App1做一些事情(单击按钮A),然后等待来自App2的套接字上的消息。 App2 does some things (triggered by App1) then sends message to App1 (label B == "Sent"). App2做一些事情(由App1触发),然后将消息发送到App1(标签B ==“已发送”)。 App1 gets the message, continues test accordingly. App1收到消息,相应地继续测试。

Coded UI test need access to mouse and keyboard. 编码的UI测试需要访问鼠标和键盘。 If you can do the test manual form one computer normally the CUIT can do it the same way. 如果您可以在一台计算机上正常完成测试手册,则CUIT可以以相同的方式进行操作。

From my point of view this is really difficult for your mentioned test case. 从我的角度来看,对于您提到的测试用例,这确实很难。 When you run the test on Comp1 how will you get access to mouse and keyboard form Comp2 ? Comp1上运行测试时,如何访问Comp2的鼠标和键盘? Maybe a remote-console can help you. 也许远程控制台可以为您提供帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM