创建测试应用程序的想法 [英] Ideas for creating a testing application

查看:74
本文介绍了创建测试应用程序的想法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我之前也问过类似的问题,但只是在寻找一些想法.好的,我刚刚完成了对应用程序的测试.我必须手动执行280次测试.每个测试都有一个关联的SQL位,用于检查数据库并返回正确/不正确的结果.有没有人有任何简单的方法可以使测试过程自动化的想法???正在考虑创建一个Windows窗体并编写代码来执行此操作.非常感谢您的帮助.干杯

Hey everyone I asked a similar question before but just looking for a few ideas. Ok I am just finishing testing an application. There were 280 tests I had to manually carry out. Each test has an associated bit of SQL that checks the database and returns the correct/incorrect result. Has anyone any ideas on an easy way to make this testing process automated??? Was thinking of creating a windows form and writting the code to do it. Any help is very much apreciated. Cheers

推荐答案



您可以创建UnitTest用例以使您的工作自动化. TestMethod用于单个测试用例.

Hi,

you can create UnitTest cases to automate your work. TestMethod is used for individual test cases.

[TestMethod]
        public void MyTestMethod()
        {
            string sqlQuery = "select Count(*) from userMaster";
            var userCount = (int)SqlHelper.ExecuteScaler(sqlQuery);
            Assert.AreEqual<int>(12, userCount);
        }
</int>




假设您的数据库中有12个用户,并且您想测试ExecuteScaler函数,则可以采用这种方式.您的测试用例将取决于您希望与期望值和实际值匹配的内容.

希望对您有帮助,

谢谢
-amit




Suppose you have 12 Users in your database and you would like to test your ExecuteScaler function, you can do this way. your test case would be depend upon what you would like to match with expected and actual value.

hope this will help you,

thanks
-amit


这篇关于创建测试应用程序的想法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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