Detailed steps for using JUnit with Eclipse

  1. Launch eclipse. If you do not see your bj4 project from assignment 7, follow these steps to set it up.
  2. Add junit to your project classpath:
  3. Generate an initial test case from the application code
  4. Add member variable "public Hand testHand" to
  5. Implement setUp() and tearDown() methods
  6. Implement code for each test method
  7. Run the tests
  8. Keep adding test methods until you are sure that you have 100% branch coverage of
  9. If you run your junit tests and see error messages that look like "invoke0(Method, Object, Object[])line: not available [native method]" then you need to exit Eclipse and reload it.
sample use case templateexample test plan templateProject plan template