我想,一些简单的重构可以在没有单元测试的情形下进行。
I imagine some simple refactorings can be performed even without unit testing in place.
单元测试给我信心,让我相信我的代码能够工作,而且我只要看一下,可以修改它,就不会害怕它会崩溃。
Unit tests give me the confidence that my code works and that I can change it, at a moment's notice, without the fear of it breaking.
根据前面简单的单元测试用例,这块代码是“干净,绿色”的——但只有在我真正彻底地测试这块代码的情况下这才有意义。
So the code is "clean and green," according to my simple unit test case — but that's meaningful only if I'm really testing the code thoroughly.
在某些情况下,重构可能改变单元测试本身,但重要的是这也应该是自动发生的。
In some cases, the unit tests themselves may be changed by the refactoring, but the point is that this should happen automatically as well.
现在,想像一下对发出开销较高的SOAP调用的类进行单元测试。
Now imagine trying to unit test a class that makes an expensive SOAP call.
portletUnit能够让您在代码上执行单元测试,且在不将它们部署到服务器的情况下执行portlet。
PortletUnit gives you the capability to do unit tests on code and to execute the portlets without deploying them to a server.
奇怪的是同样的代码能在版本3.5上运行,也能在WebSphereStudioApplication DeveloperVersion 5.1jvm下用“main”方法进行单元测试时运行。
This was puzzling because the same code had worked on Version 3.5, and also worked when unit tested by running the "main" method under the WebSphere Studio Application Developer Version 5.1 JVM.
这个项目是在ApacheLicense 2.0下发布的,附带了针对。NETFramework 3.5的源代码和单元测试。
The project, released under Apache License 2.0, comes with source code and unit tests and targets.net Framework 3.5. Some of the lessons learned, according to Skeet, are.
图2显示了在Log选项卡下的单元测试统计数据(单击这里可以看到图2的放大图)。
Figure 2 shows the unit test stats under the Log TAB. (Click here to see a larger version of Figure 2.)
然而,由于它是在假设会被抛弃的情况下建立的,它会迂回于需求评审,设计评审,代码评审和单元测试之间。
However, because it was created under the presumption that it would be thrown away, it bypassed requirements reviews, design reviews, code reviews, and unit testing.
这意味着您可以在不同的情况下使用它:单元测试、生产代码,等等。
This means that you can use it in any number of different circumstances: unit tests, production code, and so on.
通常情况下,一个单元测试在特殊环境下只测试一些特殊的方法,因此它将白箱测试分为更广泛的种类。
Usually, a unit test exercises some particular method in a particular context, thus it falls in the broader category of white box testing.
单元测试工具使我们能够检查重整情况下继续保持的程序的关键不变量。
Unit testing tools allow us to check that key invariants of our programs continue to hold under refactoring.
您可以看一下我的博客,我以前曾详细地讨论过关于在门户中进行单元测试的思想。
For those of you who do not follow my blog, I have previously discussed in some detail the idea of unit testing in the portal world.
好的单元测试要求单元间的松散耦合,这是在测试条件下让测试得以运行的条件。
Good unit tests encourage loose coupling between units, a requirement to get the test running in a test harness.
一般情况下,这个构建应用软件和运行测试单元的过程都是自动的安排有序地每夜或者每周运行的工作。
Typically, the process of building the application and running the test suite is automated and scheduled as nightly or weekly jobs.
对比图13和图7中的单元测试结果,并观察两种情况下如何描述日期信息数组。
Compare Figure 13 with the unit test result in Figure 7, and observe how the array of the date information is represented in each case.
多数的开发人员只是进行一下形式上的单元测试,甚至不被要求单元测试;然而,我们发现通过正式的单元测试过程来确保一致的精确和质量是具有巨大价值的。
Most developers did some form of unit testing even without being asked; however, we found tremendous value in formalizing the unit test process to ensure consistent rigor and quality.
一般情况下,人们对单元测试运行的速度没太注意,但是如果乘上Jester上千次执行测试套件的次数,那么任何节约都会非常显著。
Normally you don't worry too much about how fast the unit tests take to run, but any savings can be significant when multiplied by the thousands of times Jester executes the test suite.
集成测试提供了竞争环境(compete scenarios)下的测试,并不像单元测试和功能测试那样可以用特定的测试方法或单一的HTTP处理来完成的。
Integration tests enable the testing of compete scenarios, as opposed to the specific testing of methods or single HTTP operations that unit and functional testing provide.
这里,我们将看一下我们的单元测试工作的范围,我们可以选择(或者不)使用自动化的能力,并且我们使用RationalPureCoverage来确定我们测试的彻底性。
Here we.ll look at the scope of our unit-testing effort, the automation capabilities we chose to use (or not), and our use of Rational PureCoverage to determine the thoroughness of our testing.
在一些情况下,个体开发人员使用象rationalPurify、Quantify和PureCoverage这样的工具为他们的单元测试工作提供补充。
In some cases, individual developers used tools such as Rational Purify, Quantify, and PureCoverage to supplement their unit-testing effort.
设计确认应当保证器械符合之前界定好的使用者需求和预期使用要求,设计确认应当包括在实际或等效的使用条件下的产品单元的测试。
Design validation shall ensure that devices conform to defined user needs and intended USES and shall include testing of production units under actual or simulated use conditions.
我认为,单元测试的情况下会收拾自己。
I would assume that the unit test context would clean up after itself.
在架构师的指导下,完成项目的架构设计编写,负责项目的详细设计,并带领程序员完成代码的编写和单元测试。
Writing the system architecture design under the guidance of enterprise architect, complete the system detail design document, and lead the developers to finish the coding and unit test.
您可能希望在MTA模式(使用多线程单元)下运行您的测试,原因在于您用来编写测试的方法。
You might want to run your tests in MTA mode (using multithreaded apartments) because of the methods that you have used to write your tests.
在前面提到的情况下,可能无法更新单元测试。
In the cases mentioned earlier, it might not be possible to update the unit tests.
进行了一系列数值例题测试,表明单元RPAQ能自动消除闭锁现象,在由薄板到厚板的不同情况下,在各种网格畸变的情况下,都能体现出良好的精度和数值稳定性。
The results of numerical tests show that the element RPAQ is free from shear locking, insensitive to mesh distortion and very accurate and stable for both thin plate and thick plate.
系统采用精确的仪表作为电量测试单元,配备霍尔传感器,适用于各种变频器电源供电状态下的电量测量。
This system that adopts precision instrument as test units of electricity quantity, and equips with Hall sensor is used for electricity quantity test of various transducer power in power supply state.
系统采用精确的仪表作为电量测试单元,配备霍尔传感器,适用于各种变频器电源供电状态下的电量测量。
This system that adopts precision instrument as test units of electricity quantity, and equips with Hall sensor is used for electricity quantity test of various transducer power in power supply state.
应用推荐