你不必为每个方法都编写测试程序,只需为那些可能会发生变化的方法编写测试程序就够了。
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.
作为一名程序员,应该在编写代码之前编写测试,然后只编写足以让测试通过的代码即可。
As a programmer, you should write tests before you write code, then write just enough code to get the tests to pass.
出于同样的原因,编写那些您知道将要经常运行的测试程序会更有效些。
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 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.
您不能以递增方式生成窗体设计器—也就是说,您不能实现一个服务,测试应用程序,然后编写另一个服务。
You can't build the forms designer incrementally-that is, you can't implement one service, test the application, and then write another service.
在整个代码中的适当地方,程序员编写程序逻辑来测试当前用户是否有权执行某个操作。
At appropriate places throughout the code, the programmer writes program logic to test whether the current user is authorized to perform an operation.
现在,可以编写一个测试脚本并与测试应用程序一起运行,以检验测试中的组件。
A test script can now be written and run with this test application to exercise the component under test.
在这个有关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.
许多没有先编写测试的程序员甚至不知道还可以使用这种方法。
Many programmers who don't write tests first don't even know it's an option.
正如我上月所述,编写足够的代码以使测试通过可以简化程序代码,从而有更多的精力关注手边的工作。
As I said last month, writing just enough code to make a test pass keeps code simpler and keeps me focused on the task at hand.
本文介绍了并行算法,并介绍了如何编写并行程序、构建集群以及对集群进行基准测试。
This article covers parallel algorithms, and shows you how to write parallel programs, set up clusters, and benchmark clusters.
在本月的专栏中,我将探讨为. NET应用程序编写轻量级ui测试自动化的另一种方法。
In this month's column, I'll explore another approach to writing lightweight UI test automation for.net applications.
编写足够的代码以使测试进行编译此时将为您提供即将通过的测试程序,但不是长期。
Writing just enough code to get the test to compile gave you a passing test this time, but not for long.
此外,通过提供被注入对象的存根实现、改进测试覆盖率和代码质量,可轻松对编写良好的应用程序类执行单元测试。
Furthermore, well-written application classes can easily be unit tested by providing stub implementations of the injected objects, improving test coverage and code quality.
与通过施加压力来测试建筑砖块的结构完整性不同的是,软件设计者靠编写代码来测试他们的程序。
Instead of placing building blocks under measured forces to test their structural integrity, software engineers write code for their testing.
除此之外,当老的、未测试的代码被改变的时候,程序员应为代码编写新的测试。
Additionally, when old, untested code is modified, programmers should write new tests for that code.
除此之外,当老的、未测试的代码被改变的时候,程序员应为代码编写新的测试。
Additionally, when old, untested code is modified, programmers should write new tests for that code.
应用推荐