Skip to content

Commit

Permalink
Better support local execution of tycho-integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Mar 2, 2025
1 parent 1070c0d commit 8dfbfd5
Show file tree
Hide file tree
Showing 5 changed files with 384 additions and 311 deletions.
15 changes: 13 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ and the minimal reproducer project to Tycho's [issue tracker](https://github.com

### Prerequisites

Java 17 and Maven 3.9.0, or newer.
Java 17 and Maven 3.9.9, or newer.

If your Internet connection uses a proxy, make sure that you have the proxy configured in your [Maven settings.xml](https://maven.apache.org/settings.html).

Expand Down Expand Up @@ -114,7 +114,18 @@ $ mvn clean verify -f tycho-its/pom.xml -Dtest=MyTestClass
```
from the command line, replacing `MyTestClass` with the test class to run (without `.java`).

_Background information on the Tycho integration tests_
#### Running tests from the IDE

Tycho integration tests should also work from within the IDE, but we make some assumptions, e.g. that the standard maven is suitable.

If not you can specify a location to a compatible maven or found from a previous CLI run, if that do not work you can specify

```
-Dtycho.testSettings=<if you need special settings file>
-Dtychodev-maven.home=<path to a compatible maven>
```

#### Background information on the Tycho integration tests

The integration tests trigger sample builds that use Tycho. These builds expect that Tycho has been installed in the local Maven repository. This is why you need to build Tycho through a `mvn install` before you can run the integration tests.

Expand Down
22 changes: 22 additions & 0 deletions tycho-its/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@
<it.cliOptions>${it.cliOptions}</it.cliOptions>
</systemPropertyVariables>
<forkCount>${itest-forkcount}</forkCount>
<!-- see https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html#surefire-extensions-and-reports-configuration-for-displayname -->
<statelessTestsetReporter
implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter">
<usePhrasedTestSuiteClassName>true</usePhrasedTestSuiteClassName>
<usePhrasedTestCaseClassName>true</usePhrasedTestCaseClassName>
<usePhrasedTestCaseMethodName>true</usePhrasedTestCaseMethodName>
</statelessTestsetReporter>
<consoleOutputReporter
implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5ConsoleOutputReporter">
<usePhrasedFileName>true</usePhrasedFileName>
</consoleOutputReporter>
<statelessTestsetInfoReporter
implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoReporter">
<usePhrasedClassNameInRunning>true</usePhrasedClassNameInRunning>
<usePhrasedClassNameInTestCaseSummary>true</usePhrasedClassNameInTestCaseSummary>
</statelessTestsetInfoReporter>
</configuration>
</plugin>
</plugins>
Expand Down Expand Up @@ -173,6 +189,12 @@
<version>${junit5.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite-engine</artifactId>
<version>1.12.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
Expand Down
Loading

0 comments on commit 8dfbfd5

Please sign in to comment.