Changes between Version 12 and Version 13 of DevelopersGuide/Compiling
- Timestamp:
- 2016-12-29T02:59:59+01:00 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DevelopersGuide/Compiling
v12 v13 42 42 === Running Test from Command line === 43 43 44 You can run tests from the command line, as well. Include all libraries in the class path like this: 44 ==== All tests === 45 The quickest way to run the tests is done using the 'ant' build system. 46 {{{ 47 ant clean test # this will run through all 200+ tests marking them suucessful, failure, in error, or skipped. 48 }}} 49 50 ==== Individual tests ==== 51 You can run individual tests from the command line, as well. Include all libraries in the class path like this: 45 52 {{{ 46 53 #!sh 47 54 export TESTCP=".:test/unit:test/functional:dist/josm-custom.jar:test/lib/fest/*:test/lib/junit/*:test/lib/*:test/lib/unitils-core/*" 55 export TESTCP=$TESTCP:"tools/*;tools/findbugs/*" # added these missing directories. Without it will fail to run. 48 56 }}} 49 Then run forexample57 Here are some the build and run instructions for some example tests: 50 58 {{{ 51 59 #!sh 60 # Projections Reference Test 52 61 javac -cp $TESTCP test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java 53 62 java -cp $TESTCP org.junit.runner.JUnitCore org.openstreetmap.josm.data.projection.ProjectionRefTest 63 64 # Download GPS Task Test 65 javac -cp $TESTCP test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTaskTest.java 66 java -cp $TESTCP org.junit.runner.JUnitCore org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTaskTest 54 67 }}} 55 68 … … 57 70 {{{ 58 71 #!sh 59 set TESTCP=".;test/unit;test/functional;dist/josm-custom.jar;test/lib/fest/*;test/lib/junit/*;test/lib/*;test/lib/unitils-core/*" 72 set TESTCP=".;test/unit;test/functional;dist/josm-custom.jar;test/lib/fest/*;test/lib/junit/*;test/lib/*;test/lib/unitils-core/*;tools/*;tools/findbugs/*" 60 73 javac -cp %TESTCP% test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java 61 74 java -cp %TESTCP% org.junit.runner.JUnitCore org.openstreetmap.josm.data.projection.ProjectionRefTest 75 76 # and similar for the Download GPS Task Test 77 javac -cp %TESTCP% test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTaskTest.java 78 java -cp %TESTCP% org.junit.runner.JUnitCore org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTaskTest 62 79 }}}
