Changes between Version 12 and Version 13 of DevelopersGuide/Compiling


Ignore:
Timestamp:
2016-12-29T02:59:59+01:00 (9 years ago)
Author:
gschmidtee@…
Comment:

necessary changes to make the tests Actually work. Missing tools & findbugs dir, & important info to use Ant to run them all

Legend:

Unmodified
Added
Removed
Modified
  • DevelopersGuide/Compiling

    v12 v13  
    4242=== Running Test from Command line ===
    4343
    44 You can run tests from the command line, as well. Include all libraries in the class path like this:
     44==== All tests ===
     45The quickest way to run the tests is done using the 'ant' build system. 
     46{{{
     47ant clean test   # this will run through all 200+ tests marking them suucessful, failure, in error, or skipped. 
     48}}}
     49
     50==== Individual tests ====
     51You can run individual tests from the command line, as well. Include all libraries in the class path like this:
    4552{{{
    4653#!sh
    4754export TESTCP=".:test/unit:test/functional:dist/josm-custom.jar:test/lib/fest/*:test/lib/junit/*:test/lib/*:test/lib/unitils-core/*"
     55export TESTCP=$TESTCP:"tools/*;tools/findbugs/*"   # added these missing directories.  Without it will fail to run.
    4856}}}
    49 Then run for example
     57Here are some the build and run instructions for some example tests:
    5058{{{
    5159#!sh
     60# Projections Reference Test
    5261javac -cp $TESTCP test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
    5362java -cp $TESTCP org.junit.runner.JUnitCore org.openstreetmap.josm.data.projection.ProjectionRefTest
     63
     64# Download GPS Task Test
     65javac -cp $TESTCP test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTaskTest.java
     66java -cp $TESTCP org.junit.runner.JUnitCore org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTaskTest
    5467}}}
    5568
     
    5770{{{
    5871#!sh
    59 set TESTCP=".;test/unit;test/functional;dist/josm-custom.jar;test/lib/fest/*;test/lib/junit/*;test/lib/*;test/lib/unitils-core/*"
     72set TESTCP=".;test/unit;test/functional;dist/josm-custom.jar;test/lib/fest/*;test/lib/junit/*;test/lib/*;test/lib/unitils-core/*;tools/*;tools/findbugs/*"
    6073javac -cp %TESTCP% test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
    6174java -cp %TESTCP% org.junit.runner.JUnitCore org.openstreetmap.josm.data.projection.ProjectionRefTest
     75
     76# and similar for the Download GPS Task Test
     77javac -cp %TESTCP% test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTaskTest.java
     78java -cp %TESTCP% org.junit.runner.JUnitCore org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTaskTest
    6279}}}