为现有代码编写测试可能是个挑战。
先编写测试需要遵循一定的规程。
先编写测试用例会降低重构中的风险。
先编写测试还使您知道该类何时完成。
Writing tests first additionally lets you know when the class is complete.
我告诉他们如何使用现代工具编写测试。
只管打开您的IDE并且开始编写测试。
或许某些人不希望编写测试打断工作流。
Perhaps some people don’t like the fact that writing tests first interrupts the flow.
在先编写测试时,必须习惯故意只看眼前。
When writing tests first, you have to get used to being intentionally shortsighted.
在编写测试时,也应该遵守良好的设计原则。
Just because you're writing tests doesn't mean that you should throw good design principles out the window.
在编写测试时,请务必考虑这一附加的依赖性。
Account for this added dependency when you write your tests.
编写测试时,一定要注意所编写测试的质量。
When you're writing tests, be mindful of the quality of the tests you write.
Test提供了许多自动编写测试脚本的函数。
Test provides a number of functions that automate writing test scripts.
为servlet和JSP编写测试。
AM团队是编写测试的专家,他们应该进行均衡。
Am teams are experts at writing tests, they should be leveraged.
在少数情况下,我恰好根本想不出如何编写测试。
In some rare instances, I just can't figure out how to write a test at all.
总之,测试函数可以极大地增强编写测试的简便性。
Above all, test functions vastly enhance what might be called the writability of tests.
在编写测试的同时您也就熟悉了未知代码的内部构造。
You explore the internals of the unknown code while writing the tests.
这样就造成了编程人员编写测试,而客户期盼测试的情形。
And as they write tests, the customers come to expect tests.
用户可以使用英语编写测试脚本,然后在云中批处理执行。
The tool is provided as a Cloud-based application that enables users to define the test scripts used for Batch Processing in plain English.
Jeff:“因为Mark不编写测试,刚被我解雇了。”
我的意思是,您只需假定您正在为其编写测试的类已经存在。
What I mean is that you simply pretend that the class you are writing the test for exists.
关于先编写测试最有趣的事情之一是,它有助于发现新问题。
One of the most interesting things about writing tests first is that it helps make emergence possible.
首先编写测试用例,并且只编写足以让测试用例通过的代码。
Write your test cases first, and write only enough code to make your test case pass.
只有在编写了测试(并失败)后,您才可以编写测试中的代码。
Only after you have your tests written (and failing) do you write the code under test.
在本文的后面,我将深入描述如何编写测试脚本以及测试用例。
I will describe in depth how to write test scripts and test cases later in this article.
您必须习惯这种思想,在编写代码之前,可以并应该编写测试。
You have to get used to the idea that you can and should write tests before you write code.
由于单元测试是如此重要,所以您应该先编写测试,再编写代码。
Unit tests are so important that you should write your tests before you write the code.
很多测试工具要么是捕获——重放工具,要么需要编写测试脚本。
Many testing tools are either capture-replay tools or require writing test scripts.
但是,我的兴奋不是来自编写测试用例,而是看着它们生效。
My high, however, isn't from writing the test cases; it's in seeing their results.
但是,我的兴奋不是来自编写测试用例,而是看着它们生效。
My high, however, isn't from writing the test cases; it's in seeing their results.
应用推荐