按钮单击事件的单元测试用例 [英] Unit test cases for button click events

查看:513
本文介绍了按钮单击事件的单元测试用例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,目前我正在开发一个asp.net Web应用程序,我需要按钮点击事件的单元测试用例,例如我需要提交按钮的单元测试用例示例点击

解决方案


嗨Anusha,


欢迎来到MSDN论坛。



>>我需要按钮点击事件的单元测试用例,例如我需要单元测试用例示例
用于提交按钮单击



根据我的知识,我们只能在点击事件后对操作内容进行单元测试,单击测试无法进行单元测试。


例如:按下按钮时创建图片


我们可以进行单元测试创建图片,但我们无法单独测试按下按钮的动作。


因此,如果您想进行UI测试,我建议您使用编码的UI测试。


感谢您的理解,如果我误解了您的问题,请告诉我。


问候,


Judyzh



HI, At present I am developing one asp.net web application for that I need unit test cases for button click events for example I need unit test case examples for submit button click

解决方案

Hi Anusha,

Welcome to the MSDN forum.

>>I need unit test cases for button click events for example I need unit test case examples for submit button click

Based on my knowledge, we can only unit test the operation content after the click event, the unit test cannot be performed on the Click action.

For example: to create a picture when the button is pressed

We could do unit tests on creating pictures, but we could not unit test the action of pressing the button.

So, if you want to do UI testing, I suggest you use coded UI test for it.

Thanks for your understanding and please let me know if I have misunderstood your issue.

Regards,

Judyzh


这篇关于按钮单击事件的单元测试用例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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