Skip to content

Setup TestLens

Actions
Performs TestLens setup
v1.7.1
Latest
Star (5)

GitHub Action for TestLens

Tip

If you have any questions or feedback, feel free to open an issue.

The setup-testlens action connects a Maven or Gradle build to TestLens.

Prerequisites

The TestLens GitHub App needs to be installed on the repository.

Important

TestLens is currently in private beta. Therefore, an extra step is required to onboard a new GitHub organization. If you’re interested in trying out TestLens, please contact us via the website.

Setup for Gradle

For Gradle, the action should be added right after the setup-gradle action in all workflow files that should be instrumented:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-java@v5
        with:
          distribution: temurin
          java-version: 8 # or later
      - uses: gradle/actions/setup-gradle@v5
      - uses: testlens-app/setup-testlens@v1
      - run: ./gradlew build

The action writes a Gradle init script that instruments all Test tasks.

Setup for Maven

For Maven, the action needs to be added before the first call to mvn that should be instrumented. We recommend adding it right after actions/setup-java or a similar action that ensures the required version of Java is available.

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-java@v5
        with:
          distribution: temurin
          java-version: 8 # or later
      - uses: testlens-app/setup-testlens@v1
      - run: mvn verify

The action expects the root parent POM to be present in the root directory of the repository. It alters the POM by adding a profile that instruments all executions of the maven-surefire-plugin and maven-failsafe-plugin.

Setup TestLens is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Performs TestLens setup
v1.7.1
Latest

Setup TestLens is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.