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.
根据前面简单的单元测试用例,这块代码是“干净,绿色”的——但只有在我真正彻底地测试这块代码的情况下这才有意义。
The test case consists of some simple command argument processing followed by a loop that calculates the factorial of the specified values (if any).
测试用例包含几个简单的命令参数处理,然后是一个循环,它计算指定值(如果有的话)的阶乘。
Write a test that fails We selected the test that seemed the easiest to implement (although in this case they were all simple) and wrote it.
写一个失败的测试:我们选择了一个最容易实现的测试(虽然在这个例子中所有的都很简单)来实现。
To make it obvious that this is a test case, a simple script can double each word. Taking our example from above.
为了明显地表明这是一个测试案例,可以用一个简单的脚本重复每个单词。
Listing 2 gives a simple JUnit test case for this class, and Figure 1 shows the results when I run this test in eclipse.
清单2给出了针对这个类的一个简单的JUnit测试用例,图1展示了我在Eclipse中运行这个测试时的结果。
The test case in Listing 5 does a simple HTTP get with the get :list command. Then, the test case runs three assertions
清单5中的测试用例利用get :list命令执行了一个简单的HTTP get。
Having a simple straightforward test case consistently reproducing the problem is always preferable, as it significantly speeds up resolution of the problem.
采用一个可以一直重现问题的简单测试用例通常都是个好主意,因为这可以显著地加速解决问题的过程。
In the simple case of a development environment test server, the WebSphere sample file registry was used.
在开发环境测试服务器这一简单的示例中,使用了WebSphere示例文件注册中心。
The first section of the test case is shown below. This is a simple JUnit test written in groovy.
下面将介绍测试用例的第一部分。
The system had a simple test on the important use case and described in this paper.
针对重要用例,系统进行了简单的测试,并在文中给出描述。
It seems like a simple layering issue, but even with a very simplified test case the bug is still apparent.
这似乎是一个简单的分层问题,但即使有一个非常简化的测试用例,错误仍然明显。
It seems like a simple layering issue, but even with a very simplified test case the bug is still apparent.
这似乎是一个简单的分层问题,但即使有一个非常简化的测试用例,错误仍然明显。
应用推荐