在构建过程中使用VSTS运行时,在第一个屏幕上遇到输入文本问题。 [英] Having issues with input text on first screen when running using VSTS from build process.

查看:66
本文介绍了在构建过程中使用VSTS运行时,在第一个屏幕上遇到输入文本问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

         当我使用VSTS构建通过代理运行我的测试时,我的第一个测试方法出了问题。  我的问题与在Web浏览器中进行测试有关。  我的测试基本上开始并加载
一个Web浏览器,然后移动到一个页面,我调用数据库来获取我所需的用户名和密码文本。  然后我在字段中输入用户名和密码。  

          I"m having issues with my very first test method when i'm using the VSTS build to run my test through an agent.   My issues is related to testing in a Web browser.  My test basically starts off and loads a Web browser, then moves to a page, I make a call to the database to get my required text for username and password.  Then after that I enter the Username and Password in the field.  

当我在我的桌面上本地运行时,我没有看到任何问题,它工作正常。  我尝试了许多不同的解决方案但无济于事。  我已添加了自己的日志记录以及DrawHighlight方法,以查看我的数据是否未获取或是否未找到输入
字段。  我没有收到错误消息,指出它无法找到控件,所以不是那样。  由于某些未知原因,在文本框中输入文本需要很长时间。

When i'm running this locally on my desktop I don't see any issues and it works fine.  I've tried many different solutions to no avail.  I've added my own logging and also the DrawHighlight method to see if its the data i'm not getting or if input field is not being found.  I dont' get a error message stating that it couldn't find the control so its not that.  It takes such a long time to input the text inside the textbox for some unknown reason.

这是当前系统i'我在运行它

Here are the current system i'm running it in

我已经远程启动并在我的远程计算机上打开屏幕我正在运行它。

I've Remote and left screen on in my remote computer i'm running it on.

计算机是一个Windows 7企业版

Computer is a Windows 7 Enterprise

有4GB内存

运行IE 11.0.38

Running IE 11.0.38

运行我的测试使用[AssemblyInitialize]我启动浏览器并使用一个浏览器测试我的所有测试用例。

Running my test using the [AssemblyInitialize] where i launch my browser and use one browser to test all my test cases.

以下是症状


  1. 第一次测试总是超时,因为将文本输入文本框需要很长时间
  2. 剩下的测试用例它通常很好。
  3. 我在文本框上为用户名和密码做了DrawHighlight,它正在找到它,但它有问题 
  4. 交互然后将文本输入到这些字段中我奇怪的原因。

这是我尝试过的。


  1. 我做了一个鼠标点击进入文本框然后输入我的文字(不起作用)
  2. 我做了一个  DrawHighlight 看看我是否看到它。它看到了那些元素,但仍然花了很长时间进行交互,并出于某些奇怪的原因在文本框中输入文本。
  3. 我做了一个键盘。将文本框发送到文本框,将文本发送到文本框中不起作用。

我不知道还有什么可以试试,然后尝试使用实际测试代理而不是VSTS使用的无代理模式运行它?  也许以前有人遇到过这个问题。  我将非常感谢我能得到的任何帮助。 Tahnks

I don't know what else to try other then try to run it using an Actual test agent not the agentless mode that VSTS uses?.  Maybe someone has had this issue before.  I'll appreciate any help I can get. Tahnks

~W

skinny_Will

skinny_Will

推荐答案

嗨skinny_Will, 

Hi skinny_Will, 

您是否使用VSTest控制台运行编码的ui测试?  如果是这样,请启用日志以检查结果文件究竟是什么时候结束了。

Do you use VSTest console to run your coded ui test?  If so please enable the log to check the result file what exactly made the time out.

在VS中,我们通常将其设置在QTAgent32_40.exe.config文件中,参考
使用编码的ui测试日志分析编码的ui测试。 

In VS we usually set it in the QTAgent32_40.exe.config file, refer analyzing coded ui tests using coded ui test logs. 

请在运行编码的UI测试后向我们提供测试日志跟踪,以便我们可以研究它运行缓慢的原因。 

作为第一个总是运行超时,请尝试添加 WaitForControlReady()方法等待控件准备好接受键盘输入。 

As the first always run time out, please try to add the WaitForControlReady() method to wait for the control to be ready to accept keyboard input. 

还有一些其他方法可以用来等待控件,你可以参考这个页面: 

There are some other methods which works as waiting for the control, you may refer to this page: 

https ://blogs.msdn.microsoft.com/gautamg/2010/02/12/how-to-make-playback-wait-for-certain-event/

祝你好运, 

Best regards, 

Fletch


这篇关于在构建过程中使用VSTS运行时,在第一个屏幕上遇到输入文本问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆