make a first step to split between pure JUnit and integration tests (#488)

* make a first step to split between pure JUnit and integration tests

Related to: https://github.com/openhab/openhab-core/issues/482

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
pull/493/head
Markus Rathgeb 2019-01-30 07:57:06 +00:00 committed by Kai Kreuzer
parent c4f1fc3cfa
commit 76dd62623f
585 changed files with 214 additions and 323 deletions

View File

@ -138,6 +138,12 @@
<version>${jetty.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-client</artifactId>
@ -218,8 +224,8 @@
</dependency>
<!-- Serial Communication -->
<!-- <dependency> <groupId>org.eclipse.kura</groupId> <artifactId>org.eclipse.soda.dk.comm</artifactId> <version>1.2.201</version>
<scope>compile</scope> </dependency> -->
<!-- <dependency> <groupId>org.eclipse.kura</groupId> <artifactId>org.eclipse.soda.dk.comm</artifactId> <version>1.2.201</version>
<scope>compile</scope> </dependency> -->
<dependency>
<groupId>org.vesalainen.comm</groupId>
<artifactId>javaxcomm</artifactId>

View File

@ -15,12 +15,23 @@
<name>openHAB Core :: BOM :: Test Index</name>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.enroute.junit.wrapper</artifactId>
<version>4.12.0</version>
</dependency>
<dependency>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.test</artifactId>
<type>pom</type>
<scope>compile</scope>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

View File

@ -21,9 +21,9 @@
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.enroute.junit.wrapper</artifactId>
<version>4.12.0</version>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
@ -46,14 +46,6 @@
<artifactId>groovy</artifactId>
<version>2.5.5</version>
</dependency>
<!-- Jetty -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="false"/>
<booleanAttribute key="automaticValidate" value="true"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/org.eclipse.smarthome.test"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.smarthome.test"/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.smarthome.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.equinox.p2.director.app.product"/>
<booleanAttribute key="run_in_ui_thread" value="false"/>
<stringAttribute key="selected_target_plugins" value="ch.qos.logback.classic@default:default,ch.qos.logback.core@default:default,ch.qos.logback.slf4j@default:false,com.eclipsesource.jaxrs.jersey-min@default:default,com.google.gson@default:default,com.google.guava@default:default,javax.activation@default:default,javax.inject@default:default,javax.measure.unit-api@default:default,javax.servlet@default:default,javax.transaction@default:false,javax.xml@default:default,net.bytebuddy.byte-buddy-agent@default:default,net.bytebuddy.byte-buddy@default:default,org.apache.ant@default:default,org.apache.commons.io@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.commons.net@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.codehaus.groovy@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.region@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.weaving.hook@default:false,org.eclipse.jdt.annotation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.osgi.alpn.fragment@default:false,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.osgi@-1:true,org.hamcrest.core@default:default,org.hamcrest.integration@default:default,org.hamcrest.library@default:default,org.hamcrest.text@default:default,org.hamcrest@default:default,org.junit@default:default,org.mockito.mockito-core@default:default,org.objenesis@default:default,org.slf4j.api@default:default,org.slf4j.log4j@default:default,tec.uom.lib.uom-lib-common@default:default,tec.uom.se@default:default"/>
<stringAttribute key="selected_workspace_plugins" value="org.eclipse.smarthome.config.core@default:default,org.eclipse.smarthome.config.xml@default:default,org.eclipse.smarthome.core@default:default,org.eclipse.smarthome.test@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>

View File

@ -97,25 +97,14 @@
<module>org.openhab.core.model.thing.runtime</module>
<module>org.openhab.core.storage.json</module>
<module>org.openhab.core.storage.mapdb</module>
<module>org.openhab.core.test.magic</module>
<module>org.openhab.core.test</module>
<module>org.openhab.core.test.magic</module>
<module>org.openhab.core.ui</module>
<module>org.openhab.core.ui.icon</module>
<module>org.openhab.core.ui.dashboard</module>
</modules>
<profiles>
<profile>
<id>skip-test-bundles</id>
<activation>
<property>
<name>!skipTests</name>
</property>
</activation>
<modules>
<module>tests</module>
</modules>
</profile>
<profile>
<id>model-specific-profile</id>
<activation>
@ -265,9 +254,9 @@
<type>pom</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.test</artifactId>
<type>pom</type>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

View File

@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.core.storage.mapdb.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -1,3 +0,0 @@
eclipse.preferences.version=1
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.storage.mapdb.tests</artifactId>
<name>openHAB Core :: Bundles :: Tests :: Storage MapDB Tests</name>
<dependencies>
<dependency>
<groupId>org.openhab.core.bom</groupId>
<artifactId>org.openhab.core.bom.test</artifactId>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openhab.core.bundles</groupId>
<artifactId>org.openhab.core.storage.mapdb</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

View File

@ -1,19 +0,0 @@
This content is produced and maintained by the Eclipse SmartHome project.
* Project home: https://eclipse.org/smarthome/
== Declared Project Licenses
This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.
== Source Code
https://github.com/eclipse/smarthome
== Copyright Holders
See the NOTICE file distributed with the source code at
https://github.com/eclipse/smarthome/blob/master/NOTICE
for detailed information regarding copyright ownership.

View File

@ -4,15 +4,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.audio.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Audio Test</name>
<name>openHAB Core :: Integration Tests :: Audio Test</name>
<build>
<plugins>

View File

@ -4,14 +4,14 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.auth.oauth2client.tests</artifactId>
<name>openHAB Core :: Bundles :: Tests :: OAuth2Client Tests</name>
<name>openHAB Core :: Integration Tests :: OAuth2Client Tests</name>
<packaging>eclipse-test-plugin</packaging>

View File

@ -4,15 +4,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.automation.core.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Automation Core Tests</name>
<name>openHAB Core :: Integration Tests :: Automation Core Tests</name>
<build>
<plugins>

View File

@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.automation.event.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Automation Event Tests</name>
<name>openHAB Core :: Integration Tests :: Automation Event Tests</name>
<build>
<plugins>

View File

@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.automation.integration.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Automation Integration Tests</name>
<name>openHAB Core :: Integration Tests :: Automation Integration Tests</name>
<build>
<plugins>

View File

@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.automation.module.core.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Automation Core Module Tests</name>
<name>openHAB Core :: Integration Tests :: Automation Core Module Tests</name>
<build>
<plugins>

View File

@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.automation.module.script.defaultscope.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Automation Script Module Defaultscope Tests</name>
<name>openHAB Core :: Integration Tests :: Automation Script Module Defaultscope Tests</name>
<build>
<plugins>

View File

@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.automation.module.script.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Automation Script Module Tests</name>
<name>openHAB Core :: Integration Tests :: Automation Script Module Tests</name>
<build>
<plugins>

View File

@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.automation.module.timer.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Automation Module Timer Tests</name>
<name>openHAB Core :: Integration Tests :: Automation Module Timer Tests</name>
<build>
<plugins>

View File

@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.core.bundles.tests</groupId>
<artifactId>org.openhab.core.reactor.bundles.tests</artifactId>
<groupId>org.openhab.core.itests</groupId>
<artifactId>org.openhab.core.reactor.itests</artifactId>
<version>2.5.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.core.binding.xml.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
<name>openHAB Core :: Bundles :: Tests :: Binding XML Tests</name>
<name>openHAB Core :: Integration Tests :: Binding XML Tests</name>
<build>
<plugins>

Some files were not shown because too many files have changed in this diff Show More