Skip to content

Commit 9d4fefb

Browse files
ptzieglerlaeubi
authored andcommitted
Execute RCPTT tests as part of the integration tests
RCPTT tests allows perform much more complex UI tests than which are possible with JUnit alone. It also provides another structured way to submit bug reproducer. The caveat is that they perform a lot slower and thus should only be sparingly used, in order to avoid slowing down the entire build.
1 parent 346aa34 commit 9d4fefb

File tree

6 files changed

+99
-0
lines changed

6 files changed

+99
-0
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,23 @@ Some tests are in a separate repository which is referenced as a Git submodule i
7777
* Open the project modules you want to work on (right-click > Open project) and their dependencies; approve m2e connectors installation if prompted
7878
* Happy coding!
7979

80+
### ⌨️ Setting up the RCPTT Test Environment
81+
82+
* Download and install the RCPTT IDE from [here](https://www.eclipse.org/rcptt/download/).
83+
84+
* Create an executable application .
85+
* Right-click on [m2e-ide.product](products/m2e-ide/m2e-ide.product), *Export... > Plug-in Development > Eclipse product*
86+
* Execute `mvn clean verify -D skipTests` in the command line. The application is located under `products/m2e-ide/target/products`.
87+
88+
* Launch the RCPTT IDE and import [org.eclipse.m2e.rcptt.tests](org.eclipse.m2e.rcptt.tests) into your workspace.
89+
90+
* Add m2e to your applications.
91+
92+
* Right-click on the test case you want to execute, *Run As... > Test Cases*. Select the m2e application.
93+
94+
Alternatively, you may also install RCPTT directly into your Eclipse IDE via the update site.
95+
96+
When creating new test cases, it is recommended to use the *Record* functionality, to track your actions in the test application. Check the [User Guide](https://www.eclipse.org/rcptt/documentation/userguide/getstarted/) for more information.
8097

8198
### 🏗️ Build
8299

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>org.eclipse.m2e.rcptt.tests</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.m2e.core.maven2Builder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.rcptt.core.builder.q7Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
21+
<nature>org.eclipse.rcptt.core.rcpttnature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>org.eclipse.m2e</groupId>
7+
<artifactId>m2e-core</artifactId>
8+
<version>2.1.0-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>org.eclipse.m2e.rcptt.tests</artifactId>
12+
<packaging>rcpttTest</packaging>
13+
<name>M2E - RCPTT Integration tests</name>
14+
15+
<pluginRepositories>
16+
<pluginRepository>
17+
<id>rcptt</id>
18+
<name>Eclipse RCPTT repository</name>
19+
<url>https://repo.eclipse.org/content/repositories/rcptt-releases/</url>
20+
</pluginRepository>
21+
</pluginRepositories>
22+
23+
<build>
24+
<plugins>
25+
<plugin>
26+
<groupId>org.eclipse.rcptt</groupId>
27+
<artifactId>rcptt-maven-plugin</artifactId>
28+
<version>${rcptt-maven-version}</version>
29+
<extensions>true</extensions>
30+
<configuration>
31+
<aut>
32+
<explicit>../products/m2e-ide/target/products/m2e-ide-[platform].tar.gz</explicit>
33+
</aut>
34+
<testOptions>
35+
<!-- Timeout for entire test suites (in sec) -->
36+
<execTimeout>1800</execTimeout>
37+
<!-- Timeout for a single test (in sec) -->
38+
<testExecTimeout>300</testExecTimeout>
39+
</testOptions>
40+
</configuration>
41+
</plugin>
42+
</plugins>
43+
</build>
44+
</project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--- RCPTT testcase ---
2+
Format-Version: 1.0
3+
Element-Name: Project Settings
4+
Element-Type: projectMetadata
5+
Element-Version: 2.0
6+
Id: _A_5OgIe9Ee2DibE_7T1Sqw
7+
Runtime-Version: 2.5.4.202210020716
8+
Save-Time: 12/29/22, 10:09 PM
9+

pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<name>Maven Integration for Eclipse (root)</name>
2626

2727
<properties>
28+
<rcptt-maven-version>2.5.4</rcptt-maven-version>
2829
<tychoDefaultTestArgLine>-Xmx800m</tychoDefaultTestArgLine>
2930
<tycho.testArgLine>${tychoDefaultTestArgLine}</tycho.testArgLine>
3031
<tycho.surefire.timeout>900</tycho.surefire.timeout>
@@ -91,6 +92,9 @@
9192

9293
<!-- products -->
9394
<module>products</module>
95+
96+
<!-- UI/Integration tests -->
97+
<module>org.eclipse.m2e.rcptt.tests</module>
9498
</modules>
9599

96100
<dependencies>

0 commit comments

Comments
 (0)