giovedì 11 ottobre 2012

JUnit

http://junit.sourceforge.net/doc/faq/faq.htm#overview_1

Getting Started




  • Where do I download JUnit?
    The latest version of JUnit is available on SourceForge.
  • How do I install JUnit?
    1. First, download the latest version of JUnit, referred to below as junit.zip.
    2. Then install JUnit on your platform of choice:
      Windows
      To install JUnit on Windows, follow these steps:
      1. Unzip the junit.zip distribution file to a directory referred to as %JUNIT_HOME%.
      2. Add JUnit to the classpath:set CLASSPATH=%CLASSPATH%;%JUNIT_HOME%\junit.jar
      Unix (bash)
      To install JUnit on Unix, follow these steps:
      1. Unzip the junit.zip distribution file to a directory referred to as $JUNIT_HOME.
      2. Add JUnit to the classpath:
        export CLASSPATH=$CLASSPATH:$JUNIT_HOME/junit.jar
    3. (Optional) Unzip the $JUNIT_HOME/src.jar file.
    4. Test the installation by running the sample tests distributed with JUnit. Note that the sample tests are located in the installation directory directly, not the junit.jar file. Therefore, make sure that the JUnit installation directory is on your CLASSPATH. Then simply type:
      java org.junit.runner.JUnitCore org.junit.tests.AllTests
      All the tests should pass with an "OK" message.
      If the tests don't pass, verify that junit.jar is in the CLASSPATH.
    5. Finally, read the documentation.
  • How do I uninstall JUnit?
    1. Delete the directory structure where you unzipped the JUnit distribution.
    2. Remove junit.jar from the CLASSPATH.
    JUnit does not modify the registry so simply removing all the files will fully uninstall it.
  • Nessun commento: