| 38 | = How to use it = |
| 39 | We present bellow the requirements for running JUnit on top of Hadoop using our solution |
| 40 | * Java |
| 41 | * Hadoop 2.0 |
| 42 | * JUnit 4 |
| 43 | |
| 44 | This is a development tool. So its purpose is to be used during development and testing. To run a test class with HadoopRunner, simple adnotate the class with @RunWith(HadoopRunner.class). We provide a Makefile with several basic commands: |
| 45 | * setup - starts the Hadoop daemons |
| 46 | * shutdown - closes the Hadoop daemons |
| 47 | * build - will compile the test classes and the HadoopRunner class and build a jar to be send into the HDFS. |
| 48 | * run - runs the tests. If the RunWith adnotation is missing, this rule will run the test with a usual JUnit runner. |
| 49 | |
| 50 | We aaded on the SVN a sample test class: [https://svn-batch.grid.pub.ro/svn/PP2009/proiecte/HadoopJUnit/src/TestAdd.java TestAdd], with 5 test methods. Two of them shoudl pass, the other three should fail. Also, this class needs a simple class: X, just to demonstrate how HadoopRunner loads class at runtime using our resource server. |
| 51 | |
| 52 | |