Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JBIDE-23724] - Integration tests: move webservices integration tests to jbosstools/webservice repo #260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions features/org.jboss.tools.ws.test.feature/feature.xml
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@
</requires>

<plugin id="org.jboss.tools.ws.reddeer" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.ws.ui.bot.test" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.ws.core.test" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.ws.creation.core.test" download-size="0" install-size="0" version="0.0.0" />
<plugin id="org.jboss.tools.ws.jaxrs.core.test" download-size="0" install-size="0" version="0.0.0" />
6 changes: 6 additions & 0 deletions itests/org.jboss.tools.ws.ui.bot.test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
screenshots/
target/
bin/
/.classpath
/.project
.settings/
64 changes: 64 additions & 0 deletions itests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Webservices UI Bot Tests
Bundle-SymbolicName: org.jboss.tools.ws.ui.bot.test
Bundle-Version: 1.9.3.qualifier
Bundle-Activator: org.jboss.tools.ws.ui.bot.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.apache.log4j;bundle-version="1.2.13",
org.jboss.reddeer.go;bundle-version="[1.2.0,2.0.0)",
org.jboss.tools.ws.reddeer;bundle-version="1.9.3",
org.eclipse.jdt.ui,
org.eclipse.ui.ide;bundle-version="3.5.1",
org.eclipse.ui.forms;bundle-version="3.4.1",
org.junit;bundle-version="4.5.0",
org.eclipse.core.resources,
org.jboss.tools.ws.ui;bundle-version="1.1.0",
org.eclipse.wst.common.project.facet.core,
org.hamcrest.core;bundle-version="1.3.0",
org.eclipse.jst.ws.jaxws.ui,
org.eclipse.jst.ws.cxf.ui;bundle-version="1.0.200",
org.hamcrest.core;bundle-version="1.3.0",
org.jboss.tools.common.reddeer,
org.eclipse.wst.server.ui,
org.jboss.ide.eclipse.as.ui,
org.eclipse.jst.servlet.ui,
org.eclipse.jst.ws.creation.ui,
org.eclipse.jst.ws.uddiregistry,
org.jboss.tools.ws.creation.ui,
org.eclipse.wst.wsdl.ui,
org.eclipse.jst.ws.axis.creation.ui,
org.eclipse.jst.ws.cxf.creation.ui,
org.eclipse.jst.ws.jaxrs.ui,
org.jboss.tools.ws.jaxrs.ui,
org.eclipse.wst.jsdt.web.ui,
org.jboss.ide.eclipse.as.ui,
org.jboss.ide.eclipse.as.classpath.ui
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Eclipse-RegisterBuddy: org.apache.log4j
Bundle-ClassPath: .
Export-Package: org.jboss.tools.ws.ui.bot.test;
uses:="org.eclipse.ui.plugin,
org.eclipse.swtbot.eclipse.finder,
javax.xml.namespace,
junit.framework,
org.eclipse.core.resources,
org.jboss.tools.ui.bot.ext,
org.osgi.framework,
org.jboss.tools.ws.ui.bot.test.uiutils.wizards",
org.jboss.tools.ws.ui.bot.test.webservice.eap
Eclipse-BundleShape: jar
Bundle-Localization: plugin
Bundle-Vendor: JBoss by Red Hat
Import-Package: org.jboss.ide.eclipse.as.reddeer.server.requirement,
org.jboss.reddeer.junit.requirement.inject,
org.jboss.reddeer.junit.runner,
org.jboss.reddeer.requirements.openperspective,
org.jboss.reddeer.requirements.server,
org.jboss.tools.common.reddeer.requirements,
org.jboss.tools.ws.reddeer.ui.dialogs,
org.jboss.tools.ws.reddeer.ui.preferences,
org.jboss.tools.ws.reddeer.ui.tester.views,
org.apache.commons.lang
61 changes: 61 additions & 0 deletions itests/org.jboss.tools.ws.ui.bot.test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# JBoss Tools WebServices UI Bot Tests
### Using ** Maven **

1. get jbosstools-integration-tests ``` $ git clone https://github.com/jbosstools/jbosstools-integration-tests.git ```

2. run (all required plugins, files and also the server will be downloaded) ``` $ mvn clean verify -Dswtbot.test.skip=false```


### Tests execution from ** Eclipse **


0. Get prerequisites:
- JBoss server: WildFly, JBoss AS 7 or JBoss EAP 6 - setup RedDeer xml config file (see https://github.com/jboss-reddeer/reddeer/wiki/Write-complex-requirement-with-own-schema) e.g. WildFly config file
```
<?xml version="1.0" encoding="UTF-8"?>
<testrun
xmlns="http://www.jboss.org/NS/Req"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:server="http://www.jboss.org/NS/ServerReq"
xsi:schemaLocation="http://www.jboss.org/NS/Req http://www.jboss.org/schema/reddeer/RedDeerSchema.xsd
http://www.jboss.org/NS/ServerReq http://www.jboss.org/schema/reddeer/JBossServerRequirements.xsd">

<requirements>
<server:jboss-server-requirement name="WildFly">
<server:type>
<server:familyWildFly version="8.x"></server:familyWildFly>
</server:type>
<server:runtime>/path/to/wildfly</server:runtime>
</server:jboss-server-requirement>
</requirements>
</testrun>
```

- projects used to test some features: download from maven repo
JBoss Tools Experiments/org/jboss/tools/ws/tests/org.jboss.tools.ws.ui.bot.test.resources.projects
https://repository.jboss.org/nexus/index.html#view-repositories;jbosstools-experiments~browseindex
- Apache CXF 2.x - create ws.properties file in directory {project_location}/properties with property ``` apache-cxf-2.x={apache-cxf-2.x-path} ```

1. Download tests and required plugins:
- get jbosstools-integration-tests ``` $ git clone https://github.com/jbosstools/jbosstools-integration-tests.git ```
- get Red Deer ``` $ git clone https://github.com/jboss-reddeer/reddeer ```

2. ** Now run eclipse in a new workspace (e.g. ~/jbds_test_workspace_ws) **

3. Import projects (File > Import... > Existing Projects into workspace)
- import WebServices tests - jbosstools-integration-tests/tests/org.jboss.tools.ws.ui.bot.test
- import plugins org.jboss.tools.ws.reddeer and org.jboss.ide.eclipse.as.reddeer
from directory jbosstools-integration-tests/plugins/
- import all Red Deer plugins from directory reddeer/plugins/


4. Install RedDeer
- in eclipse open Install dialog (Help > Install New Software...) and install everything from
http://download.jboss.org/jbosstools/builds/staging/RedDeer_master/all/repo/
(see https://github.com/jboss-reddeer/reddeer/wiki/Installation)

5. Run with VM arguments:
- to set server configuration```-Drd.config=/path/to/wildfly.xml```
- to close Usage reporting dialog ```-Dusage_reporting_enabled=false```

6. Enjoy testing :)
5 changes: 5 additions & 0 deletions itests/org.jboss.tools.ws.ui.bot.test/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
resources/,\
.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<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="true"/>
<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.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/webservice/eap/EAPCompAllTests.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="DISPLAY" value=":1"/>
</mapAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<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"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.ws.ui.bot.test.webservice.eap.EAPCompAllTests"/>
<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.jboss.tools.ws.ui.bot.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="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms256m -Xmx1024m -Dswtbot.test.properties.file=${env_var:HOME}/swtbot.properties -Dusage_reporting_enabled=false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="com.jboss.jbds.product.product"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="true"/>
</launchConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
<booleanAttribute key="com.mountainminds.eclemma.core.INPLACE_INSTRUMENTATION" value="true"/>
<listAttribute key="com.mountainminds.eclemma.core.INSTRUMENTATION_PATHS">
<listEntry value="/org.jboss.tools.ws.ui/target/classes"/>
<listEntry value="/org.jboss.tools.ws.creation.ui/target/classes"/>
<listEntry value="/org.jboss.tools.ws.core/target/classes"/>
<listEntry value="/org.jboss.tools.ws.creation.core/bin"/>
</listAttribute>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="true"/>
<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.jboss.tools.ws.ui.bot.test"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="DISPLAY" value=":1"/>
</mapAttribute>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<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"/>
<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.7"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.ws.ui.bot.test.WSAllBotTests"/>
<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.jboss.tools.ws.ui.bot.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="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms256m -Xmx1024m -Dswtbot.test.properties.file=${env_var:HOME}/swtbot.properties -Dusage_reporting_enabled=false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<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="true"/>
</launchConfiguration>
Loading