Changeset 9501 in josm


Ignore:
Timestamp:
2016-01-17T15:06:09+01:00 (9 years ago)
Author:
Don-vip
Message:

make the distinction between unit tests (*Test.java) and integration tests (*TestIT.java)

Location:
trunk
Files:
3 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1010taginfo-img
        1111build2
         12junit*.properties
         13foobar
  • trunk/build.xml

    r9357 r9501  
    321321        <init-test-preferences testfamily="functional"/>
    322322        <init-test-preferences testfamily="performance"/>
     323        <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="tools/jacocoant.jar" />
    323324    </target>
    324325    <target name="test-clean">
     
    326327        <delete dir="${test.dir}/report"/>
    327328        <delete file="${test.dir}/jacoco.exec" />
     329        <delete file="${test.dir}/jacocoIT.exec" />
    328330        <delete file="${test.dir}/config/unit-josm.home/preferences.xml" />
    329331        <delete file="${test.dir}/config/functional-josm.home/preferences.xml" />
     
    370372    <macrodef name="call-junit">
    371373        <attribute name="testfamily"/>
     374        <attribute name="testITsuffix" default=""/>
    372375        <sequential>
    373             <echo message="Running @{testfamily} tests with JUnit"/>
    374             <jacoco:coverage destfile="${test.dir}/jacoco.exec">
     376            <echo message="Running @{testfamily}@{testITsuffix} tests with JUnit"/>
     377            <jacoco:coverage destfile="${test.dir}/jacoco@{testITsuffix}.exec">
    375378                <junit printsummary="yes" fork="true" forkmode="once">
    376379                    <jvmarg value="-Dfile.encoding=UTF-8"/>
     
    388391                    <formatter type="xml"/>
    389392                    <batchtest fork="yes" todir="${test.dir}/report">
    390                         <fileset dir="${test.dir}/build/@{testfamily}" includes="**/*Test.class"/>
     393                        <fileset dir="${test.dir}/build/@{testfamily}" includes="**/*Test@{testITsuffix}.class"/>
    391394                    </batchtest>
    392395                </junit>
     
    394397        </sequential>
    395398    </macrodef>
    396     <target name="test" depends="test-compile"
     399    <target name="test" depends="test-compile" unless="test.notRequired"
    397400        description="Run unit, functional and performance tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
    398         <taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpath="tools/jacocoant.jar" />
    399401        <call-junit testfamily="unit"/>
    400402        <call-junit testfamily="functional"/>
    401403        <call-junit testfamily="performance"/>
    402404    </target>
    403     <target name="test-html" depends="test" description="Generate HTML test reports">
     405    <target name="test-it" depends="test-compile" unless="test-it.notRequired"
     406        description="Run integration tests. OSM API (TEST) account shall be set with -Dosm.username and -Dosm.password">
     407        <call-junit testfamily="unit" testITsuffix="IT"/>
     408        <call-junit testfamily="functional" testITsuffix="IT"/>
     409        <call-junit testfamily="performance" testITsuffix="IT"/>
     410    </target>
     411    <target name="test-html" depends="test, test-it" description="Generate HTML test reports">
    404412        <!-- May require additional ant dependencies like ant-trax package -->
    405413        <junitreport todir="${test.dir}/report">
     
    412420            <executiondata>
    413421                <file file="${test.dir}/jacoco.exec"/>
     422                <file file="${test.dir}/jacocoIT.exec"/>
    414423            </executiondata>
    415424            <structure name="JOSM Test Coverage">
  • trunk/test

    • Property svn:ignore
      •  

        old new  
        22report
        33jacoco.exec
         4jacocoIT.exec
  • trunk/test/functional/org/openstreetmap/josm/data/osm/TaginfoTestIT.java

    r9496 r9501  
    2626
    2727/**
    28  * Various tests with Taginfo.
     28 * Various integration tests with Taginfo.
    2929 */
    30 public class TaginfoIntegrationTest {
     30public class TaginfoTestIT {
    3131
    3232    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java

    r9500 r9501  
    2828
    2929/**
    30  * Unit tests of {@link MapPaintPreference} class.
     30 * Integration tests of {@link MapPaintPreference} class.
    3131 */
    32 public class MapPaintPreferenceTest {
     32public class MapPaintPreferenceTestIT {
    3333
    3434    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java

    r9500 r9501  
    2323
    2424/**
    25  * Unit tests of {@link TaggingPresetPreference} class.
     25 * Integration tests of {@link TaggingPresetPreference} class.
    2626 */
    27 public class TaggingPresetPreferenceTest {
     27public class TaggingPresetPreferenceTestIT {
    2828
    2929    /**
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java

    r9500 r9501  
    2020
    2121/**
    22  * Unit tests of {@link PluginHandler} class.
     22 * Integration tests of {@link PluginHandler} class.
    2323 */
    24 public class PluginHandlerTest {
     24public class PluginHandlerTestIT {
    2525
    2626    /**
Note: See TracChangeset for help on using the changeset viewer.