Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Pig Wiki" for change 

The following page has been changed by XuZhang:

      * Contributions should pass existing unit tests.
      * New unit tests should be provided to demonstrate bugs and fixes. 
[ JUnit] is our test framework:
            * You must implement a class that extends 
`junit.framework.TestCase` and whose class name contains `Test`.
+           * If an `HDFS` cluster and/or a `MapReduce` cluster is needed by 
your test, add a field of type `MiniCluster` to the class and initialize it 
with a statement like the following (the name of the field is not important).  
`` is an example of a test that uses cluster.
+                   `MiniCluster cluster = MiniCluster.buildCluster();`
            * Define methods within your class and annotate it with [EMAIL 
PROTECTED], and call JUnit's many assert methods to verify conditions; these 
methods will be executed when you run `ant test`.
-           * Place your class in the test tree. 
+           * Place your class in the `test` tree. 
            * you can then run all the unit test with the command `ant test`. 
Similarly, you can run a specific unit test with the command `ant test 
-Dtestcase=<ClassName>` (For example `ant test -Dtestcase=TestPigFile`)
  == Generating a patch ==

Reply via email to