如何通过Coded Ui中的编码仅运行选定的TestMethod? [英] How to run only selected TestMethod through coding in Coded Ui ?

查看:61
本文介绍了如何通过Coded Ui中的编码仅运行选定的TestMethod?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



Coded Ui可以选择通过手动右键单击和运行测试来运行选定的测试方法。我需要通过编码来完成此功能。任何人都可以建议解决方案。









在此先感谢.. ..

Karthik.R

Hi all

Coded Ui has option to run a selected test method by manually right click and Run Test. I need this functionality to be done through coding. can anyone suggest solution.




Thanks in Advance....
Karthik.R

推荐答案

这是一个不可能回答的问题,不知道你正在使用的测试音序器或什么样的供应商提供的API。



您不是说要在测试方法中使用,还是使用外部应用程序,例如用于此目的自动化一些用户界面测试。



如果你想从外部应用程序这样做,有一些选择。



一种方法是记录鼠标操作并将其作为宏播放。有一些软件有这个功能,但我没有使用任何这样的软件多年,所以我不能推荐任何好的。

这是一个谷歌搜索提出的网页:记录鼠标点击和击键 [ ^ ]



另一个选择是使用好的老间谍++并找出你需要操作的不同菜单项和控件的ID。

然后你可以使用Win32方法,如 SendMessage PostMessage 以模拟鼠标点击。

根据我的经验,如果用Win32 C ++编写UI,这将更容易。
This is an impossible question to answer without any knowledge about the test sequencer you are using or what kind of API the vendor is providing.

You are not saying if you want to do this from within a test method or by using an external application, for example for the purpose of automate some user interface tests.

If you want to do this from an external application, there are some options.

One way is to record mouse operations and play them as a macro. There are some softwares out there that has this functionality, but I have not used any such software in years so I can't recommend any good one.
Here is one web page a Google search came up with: Record Mouse Clicks And Keystrokes[^]

Another option is to use good old Spy++ and find out the ID's of the the different menu items and controls you need to manipulate.
Then you can use Win32 methods such as SendMessage or PostMessage in order to simulate mouse clicks.
In my experience this is easier if the UI is written in Win32 C++.

这篇关于如何通过Coded Ui中的编码仅运行选定的TestMethod?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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