Skip to content

Commit

Permalink
Improve documentation to run integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
damien-urruty-sonarsource committed Mar 16, 2023
1 parent 79e3283 commit b040264
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ Execute from project base directory:

### Run integration tests

#### Prerequisites

Some integration tests load plugins relying on Node.js, so make sure the latest LTS version is installed and `node` is in the PATH.

mvn verify -f its/pom.xml -Dsonar.runtimeVersion=<SQ server version>
See [Running Integration Tests](its/README.md)

License
-------
Expand Down
25 changes: 25 additions & 0 deletions its/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Run integration tests

# Prerequisites

* Some integration tests load plugins relying on Node.js, so make sure the latest LTS version is installed and `node` is in the PATH.
* SonarQube ITs need Java 17 to run and SonarCloud ITs need Java 11

# First time configuration

1. Make sure your Developer Box is properly setup (see xtranet)
2. Configure Orchestrator settings as described [here](https://github.com/SonarSource/orchestrator#configuration). The Artifactory API key and GitHub token are the only mandatory options. The GH token is a Personal Access Token (classic) with the `repo` scope permission, and SSO properly configured
3. For SonarCloud ITs, make sure the `SONARCLOUD_IT_PASSWORD` env var is defined (you can find the value in our password management tool)
4. Run `mvn clean install` a first time from this `its` folder so that test resources are built (like custom plugins)

# Running ITs from IntelliJ

1. From the root folder of the repository, first build sonarlint-core with `mvn clean install`
2. Make sure the `its` profile is [activated in the Maven tool window](https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles)
3. Reload the project with the top left button of the Maven tool window
4. Open a test class and run it

# Running ITs from command line

1. From the root folder of the repository, first build sonarlint-core with `mvn clean install`
2. Run `mvn verify -f its/pom.xml -Dsonar.runtimeVersion=<SQ server version>`

0 comments on commit b040264

Please sign in to comment.