With test-driven development (TDD), you use unit tests to help design your code.
利用测试驱动开发(TDD),你用单元测试帮助设计你的代码。
One way to specify the behavior implicitly is to use unit tests written with JUnit (see Resources).
一种隐式地指定行为的方法是使用以JUnit(请参阅参考资料)编写的单元测试。
Many developers use a variant of testing called test-after development (TAD), whereby you write the code and then write the unit tests.
许多开发人员使用称为后测试开发(TAD)的各种测试,你首先编写代码,然后编写单元测试。
This means that you can use it in any number of different circumstances: unit tests, production code, and so on.
这意味着您可以在不同的情况下使用它:单元测试、生产代码,等等。
It includes an extensive set of unit tests with the source code. Developers can modify the library and use the test to verify its functionality.
它包含了一套广泛的单元测试源代码,开发者可以修改函数库源代码并使用单元测试验证其功能。
Although it might seem like overkill to create unit tests for a small application like this, it really does build good programming practices to use this approach for even the smallest of projects.
尽管为这么小的应用程序创建单元测试似乎有点儿过分了,但是实际上即使对于最小的项目,使用这种方式也是良好的编程习惯。
This is why we use good design practices and automated feedback loops like unit or system tests; to keep things easy to change.
这就是为什么我们使用好的设计实践,和像单元测试与系统测试这样的自动化反馈环,都是为了让修改变得容易。
Use cases and the supporting artifacts are invaluable drivers for identifying and creating Unit, Function, System Integration, and User Acceptance tests.
对于识别和创建单元、功能、系统集成,以及用户验收测试来说,用例和相应的支持工件是价值无法估量的驱动。
You can also use this embeddable container easily with unit tests.
您还可以将这个可嵌入的容器轻松用于单元测试。
Typically the Business requirement is written and the team will drill down to flesh out the use cases that will drive the tests cases, the unit tests and ultimately the implementation code.
通常,编写完业务需求后,团队成员会进行深入的探讨,建立起具体的用例,由这些用例驱动测试用例、单元测试和最终代码的实现。
Behavior Driven Development goes further by directly associating unit tests (and test cases) with the requirements via the use of natural language.
行为驱动开发则更进一步,通过使用自然语言,直接把单元测试(以及测试用例)同需求联系起来。
The best you can do to flush these errors out into the open is use a wide variety of data in your unit tests.
所以要使这些错误浮出水面,最好的办法是在单元测试中使用各种各样的数据。
Service tests for service use cases are no different, although they may be thought of more as functional tests than unit tests.
服务用例的服务测试没有什么不同,不过更多地将其看作功能测试,而不是单元测试。
That's what these unit tests are: a set of coded use cases that document what a class does, given a controlled set of inputs.
那就是单元测试:一系列记录类所做工作的用例代码,提供输出控制。
But reading and writing files in unit tests slows tests and requires adding more complexity (like creating a temp directory and cleaning up files after use).
但在单元测试中读和写文件会减缓测试,增加更多的复杂性(如创建临时目录和在使用后清除文件)。
You can use this embedded container to run unit tests without having to run an entire servlet container.
可以使用这个嵌入式容器来运行单元测试,而不必运行整个servlet容器。
Even if you choose to edit code in another program, you can use Zend Studio to debug classes, methods, and unit tests.
即使选择在另一个程序中编辑代码,也可以利用Zendstudio调试类、方法和单元测试。
Unit tests are written from the developer's perspective and focus on particular methods of the class under test. Use these guidelines when writing unit tests
单元测试是从开发人员的角度出发编写的,并且关注的是所测试的类的特定方法。
Whether or not you use Contract4J with your unit tests, thinking about the contract of your components will improve your designs.
不论是否使用Contract4J进行单元测试,考虑组件的合约都会改进设计。
Download PHPUnit and start adding unit tests for your PHP scripts you can use for testing upgrades.
下载PHPUnit并开始为可用于测试升级的php脚本添加单元测试。
You will still want to use JUnit to create unit tests for logic that are called without a Web harness.
您仍然希望利用JUnit为那些没有利用Web而调用的逻辑创建单元测试。
The JBoss RESTEasy implementation comes with a lightweight embeddable servlet container called TJWS that you can use within unit tests to make remote invocations to JAX-RS Web services.
JBossRESTEasy实现附带一个轻量级的可嵌入servlet容器TJWS,可用于在单元测试中对JAX - RSWeb服务进行远程调用。
Therefore we can use a base test class for all Wicket-related unit tests.
因此,我们可以为所有Wicket相关的单元测试创建一个测试基类。
Use Tools (Static Analysis, Unit Test, Continuous Integration, Automated Acceptance Tests) to help the teams find, reduce and measure their debt load.
使用工具(静态分析,单元测试,持续集成,自动化可接受性测试)来帮助团队发现、减少和衡量他们的技术债务量。
There are any number of conventions about how to name unit tests, but our guidance is simply that you use names that make it clear what the test is checking.
如何命名单元测试有许多约定,但我们的指导是简单,你所采用的名字能清楚地表达它测试什么即可。
Static unit tests also don't have to be intact like dynamic unit tests for the helper classes because you only use them to build and test your game.
静态单元测试也不需要像动态单元测试那样原封不动,因为你只是用它们来生成和测试你的游戏。
You can also use refactoring to update data generation plans, scripts, and unit tests.
还可以使用重构更新数据生成计划、脚本和单元测试。
Before you run database unit tests, you should use a data generator to create realistic test data without exposing production data to your developers.
运行数据库单元测试之前,应使用数据生成器创建切实可行的测试数据,而不必向开发人员公开生产数据。
If you use fully qualified names in your unit tests, the refactoring engine can update them whenever you rename a schema object.
如果在单元测试中使用完全限定的名称,则无论何时重命名架构对象,重构引擎都可以对它们进行更新。
If you use fully qualified names in your unit tests, the refactoring engine can update them whenever you rename a schema object.
如果在单元测试中使用完全限定的名称,则无论何时重命名架构对象,重构引擎都可以对它们进行更新。
应用推荐