How to create JUnit test cases?
如何创建JUnit测试用例?
Importing existing JUnit test cases.
导入已有的JUnit测试用例。
Listing 3. JUnit test for deposit method.
JUnit的deposit方法测试。
Create JUnit test cases for the application.
为这个应用软件创建JUnit测试用例。
The JUnit test should complete with no errors.
JUnit测试应无错误地完成。
JUnit test: running the sample code using JUnit.
Junit测试:利用Junit运行样本代码。
Generating JUnit test cases for your application.
为应用程序生成JUnit测试用例。
Follow these steps to create the JUnit test case.
按照以下步骤来创建JUnit测试用例。
Creating the JUnit test cases for the application.
为这个应用软件创建JUnit测试用例。
I have written a JUnit test for the parser as well.
我还编写了用于该解析器的JUnit测试程序。
Running the JUnit test cases to test the sample application
运行这个JUnit测试用例来测试这个样本应用软件
Note that all JUnit test methods must begin with the word "test."
注意到所有JUnit测试方法必须以单词“test”开头。
The test above was run as a simple JUnit test without code coverage.
以上测试是作为简单的JUnit测试运行的,没有代码覆盖。
Select "JUnit test into component test project" as the import source.
选择“JUnit testintocomponent testproject ”作为导入源。
The results of the JUnit test will appear in the JUnit view as normal.
JUnit测试的结果会正常显示在 JUnit视图中。
In this section, we will add JUnit test cases for the sample application.
在这个部分中,我们将为这个样本应用软件添加JUnit测试用例。
In other words, use a JUnit test case to capture the scenario requirement.
换句话说,使用JUnit测试用例来捕捉场景需求。
Define the location of the CruiseControl logs and log the JUnit test results.
定义CruiseControl日志的位置并记录JUnit测试结果。
To test the portlet's function, the first step is to create JUnit test cases.
为测试portlet的功能,第一步是要创建JUnit测试用例。
At minimum, a JUnit test case has the common structure shown in code Listing 1.
最低限度,一个JUnit测试用例有一个如列表1代码中所示的常用结构。
Therefore, you can reuse the underlying JUnit test cases for your EJB unit tests.
因此,您可以为您的EJB单元测试重新使用基本的JUnit测试用例。
To test the above data maps, you will usually write a couple of JUnit test cases.
要测试上述数据映射,您通常要编写两个JUnit测试用例。
If you use JUnit, the all-important question is, Do I have to stop writing JUnit test cases?
如果您使用的是JUnit,则最重要问题是:必须停止编写JUnit测试用例吗?
The first section of the test case is shown below. This is a simple JUnit test written in groovy.
下面将介绍测试用例的第一部分。
The first step is to create a JUnit test and appropriately configure JDepend, as shown in Listing 2.
第一步是创建一个JUnit测试并且对JDepend做相应配置,如清单2所示。
Download JUnitPerf: a collection of JUnit test decorators used to measure performance and scalability.
下载JUnitPerf:一系列用于测量性能和可伸缩性的JUnit测试装饰器。
To execute the sample program, run the TestsRulesEngineTest JUnit test found in the demo.test package.
要执行示例程序,运行demo.test 中的 TestsRulesEngineTestJUnit 测试。
We will first create a JUnit test class, add a single test to the class, and then, finally, execute the test.
我们首先创建JUnit测试类,将单个测试添加到该类,最后执行该测试。
This step is similar to running pre-deployment unit tests, except for the nature of the JUnit test cases to run.
此步骤与运行部署前单元测试类似,不过 JUnit测试用例的本质不同。
As far as the build automation procedure is concerned, this step is just an invocation of a set of JUnit test cases.
就构建自动化过程而言,此步骤只是调用一组JUnit测试用例。
应用推荐