ReaderJunits

From RifidiWiki

Revision as of 19:16, 9 May 2008 by Kyle (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose of Junits

Junits are automated tests that programatically test functionality. The advantage of them is that you can run the tests to make sure that as new functionality is added, old functionality doesn't break.

Creating a new Junit in eclipse

Currently our testing packages are stored internally to Pramari because they have dependencies to non-free libraries provided by RFID reader companies. We are currently working on opening up our tests. However, you can ignore the first step and add the test to a testing package contained in your reader's source code.

  1. Checkout org.rifidi.tests and org.rifidi.internal.dependencies from the internal repository
  2. Create a new package for your tests
  3. Add a new Junit in eclipse
    1. New->Other->Junit Test Case
    2. Fill in the information in the wizard. You need a Junit 4 test case with the SetUpBeforeClass() and TearDownAfterClass() methods generated.Newjunit.png


Designing a Junit to Test a Virtual Reader

Running the Junit Test Case