你不必为每个方法都编写测试程序,只需为那些可能会发生变化的方法编写测试程序就够了。
You don't have to write a test for every single method you write, only production methods that could possibly break.
此时将编译和链接dll,因此可以编写测试程序来使用ExampleAPI并对其进行测试。
At this point, the DLL will compile and link, so one could write a test program to use the Sample API and test it.
一种策略是,在编写正在测试的代码时,编写测试程序;另一种策略是,让另一个开发者小组来编写测试程序。
Either you write the test when you write the code being tested, or you have another team of developers write the tests.
因为仿真器的工作完全仿照微处理器,你可以用微处理器的装配语言或可以在微处理器上运行的语言来编写测试程序。
Because the emulator works exactly like the microprocessor, you write test programs in the assembly language of the microprocessor or in a language that can be compiled to run on the microprocessor.
作为一位编程人员,受最大影响的实践(Practice)(XP或其它方面)是在我编写代码之前编写测试程序。
As a programmer, the practice (XP or otherwise) that has had the biggest impact is writing tests before I write code.
对每一个模块最佳的测试是为其编写程序,看它如何工作。
The best test for each module was to write for it, and see how well it worked.
我还为创建使用反射的对象编写了类似的计时测试程序,但这种情况下的差异不象字段和方法调用情况下那么显著。
I also wrote a similar timing test program for creating objects using reflection. The differences for this case aren't nearly as significant as for the field and method call cases, though.
出于同样的原因,编写那些您知道将要经常运行的测试程序会更有效些。
By the same token, it's more effective to write tests that you know you'll run often.
实际上讲,可以采用两种策略中某一种来编写自动化测试程序。
Practically speaking, you can follow one of two strategies to write automated tests.
在本文中,您将学习到如何用这个叫做TestNG的新测试框架为应用程序编写单元测试。
In this article, you will learn how to write unit tests for an application using a new testing framework called TestNG.
我还编写了用于该解析器的JUnit测试程序。
JUnit是一个用于编写自动化测试程序的简单且小型的框架。
JUnit is a simple and small framework for writing automated tests.
在编写代码前编写测试极大地改变了我作为程序员的生活,它同样也可以改变您的生活。
Writing tests before I write code has revolutionized my life as a programmer, and it can do the same for you.
特别是,如果把一个程序自身当作它的输入是会发生什么,我们需要编写一个怎忙的程序来测试它呢?
In particular, what if we decided we wanted to write a program that would test what happens when we run a program on itself as input.
让我吃惊的是,今天有多少程序员在编写代码时不去考虑测试。
It amazes me how many programmers today write code without bothering to test it.
在整个代码中的适当地方,程序员编写程序逻辑来测试当前用户是否有权执行某个操作。
At appropriate places throughout the code, the programmer writes program logic to test whether the current user is authorized to perform an operation.
在这个有关SOA环境中的测试驱动的开发系列中,第1部分向您介绍了如何为SOA应用程序编写单元测试。
Part 1 of this series on test-driven development in an SOA environment showed you how to write unit tests for SOA applications.
为了澄清这一点,我编写了一个程序进行一些测试。
其中一个产生问题的位置就是单元测试,我们编写代码来测试运行应用程序的代码。
One place where this can be a problem is with unit testing, where we write code that tests the code that runs an application.
采用这一点做法,任何程序员都可以先编写测试。
With a little practice, any programmer can write tests first.
单元测试是从程序员的角度编写的。
许多没有先编写测试的程序员甚至不知道还可以使用这种方法。
Many programmers who don't write tests first don't even know it's an option.
所有这些都编写好之后,现在就该测试应用程序了。
我们应该编写一个测试应用程序来处理这些中断。
A test application should be written to handle these interrupts.
在本月的专栏中,我将探讨为. NET应用程序编写轻量级ui测试自动化的另一种方法。
In this month's column, I'll explore another approach to writing lightweight UI test automation for.net applications.
在脚本语言中编写应用程序测试代码。
程序员在编写代码的同时编写程序员测试。
此外,通过提供被注入对象的存根实现、改进测试覆盖率和代码质量,可轻松对编写良好的应用程序类执行单元测试。
Furthermore, well-written application classes can easily be unit tested by providing stub implementations of the injected objects, improving test coverage and code quality.
此外,通过提供被注入对象的存根实现、改进测试覆盖率和代码质量,可轻松对编写良好的应用程序类执行单元测试。
Furthermore, well-written application classes can easily be unit tested by providing stub implementations of the injected objects, improving test coverage and code quality.
应用推荐