如何确保所有单元测试用例都经过验证 [英] how to ensure all unit test cases are verified

查看:92
本文介绍了如何确保所有单元测试用例都经过验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人问我一个问题:如何确保对项目中的特定模块的所有单元测试用例都进行了验证?"
我说过,因为它是手动测试,并且大多数是在设计阶段确定的,但是我不确定面试官对我的回答是否满意.

I was asked a question that "How can you ensure that all the unit test cases are verified for particular module in an project?"
I said since it''s manual testing and most of them are identified at design phase but i am not sure how much interviewer satisfied with my answer.

推荐答案

单元测试不是手动测试.您不会得到这份工作.单元测试可以自动化,因为它们只是针对代码运行的.巡航控制是平台的一个示例,该平台可在签入时生成代码,然后运行单元测试.

===================

NUnit被广泛用于验证单元测试的执行.除了日志外,它还可以直观地告诉执行者单位案例的通过/失败状态.
Unit tests are not manual tests. You will not get the job. Unit tests can be automated, because they are just something that is run against the code. Cruise control is one example of a platform that builds the code when there''s a check in, and then runs the unit tests.

====================

NUnits are widely used for verification of unit test execution. Apart from logs, it visually tells the executioner about the pass/fail status of unit cases.


经过验证的含义是什么?这个问题似乎来自从未写过任何单元测试的人.

如果他想测试覆盖率,可以使用NCover 之类的工具.它可以计算测试覆盖率并与阈值进行比较.
What do they mean by verified? The question seems to be coming from a person who never wrote any unit tests.

If he meant about test coverage, tools like NCover can help. It can calculate the test coverage and compare against a threshold value.


这篇关于如何确保所有单元测试用例都经过验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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