> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# thundra-io/thundra-foresight

Thundra Foresight is a test monitoring tool that's powered by Thundra APM Agents that supports multiple runtimes, such as Java, NodeJS, and Python. This orb help you to monitor your unit, integration, and end-to-end tests with distributed tracing capabilities. It is currently supporting Java runtimes for your Maven and Gradle builds, for JUnit and Selenium frameworks. More runtime and test framework support are on the way to make it available for CircleCI users.

Python shell is also required to successfully run this orb at the moment.


## Commands

### gradle

Gradle Instrumentation


| Parameter | Type | Default | Description |
|---|---|---|---|
| `agent_version` | string |  | Use a specific version of the Thundra Agent |
| `apikey` | env_var_name | THUNDRA_APIKEY | Thundra's API Key |
| `plugin_version` | string |  | Use a specific version of the Gradle test plugin |
| `project_id` | env_var_name | THUNDRA_AGENT_TEST_PROJECT_ID | Thundra's Test Project ID |

### maven

Maven Instrumentation


| Parameter | Type | Default | Description |
|---|---|---|---|
| `agent_version` | string |  | Use a specific version of the Thundra Agent |
| `apikey` | env_var_name | THUNDRA_APIKEY | Thundra's API Key |
| `instrumenter_version` | string |  | Use a specific version of the Maven instrumentation script |
| `parent_pom_path` | string |  | Use if your parent pom is in somewhere other that ./pom.xml |
| `project_id` | env_var_name | THUNDRA_AGENT_TEST_PROJECT_ID | Thundra's Test Project ID |

## Examples

### use_gradle_command

Use Gradle command to integrate Thundra Foresight into your project and instrument your Gradle build. With this command, you can monitor your unit, integration, and end-to-end tests in your Gradle build with distributed tracing capabilities. Foresight is currently supporting JUnit and Selenium frameworks for Java runtime. However, making other frameworks such as TestNG available is in our roadmap.
Python shell is required to successfully run this command at the moment.


```yaml
version: '2.1'
orbs:
  thundra: thundra-io/thundra-foresight@1.0.0
jobs:
  gradle:
    docker:
      - image: cimg/openjdk:11.0
    steps:
      - checkout
      - thundra/gradle:
          apikey: THUNDRA_APIKEY
          project_id: THUNDRA_AGENT_TEST_PROJECT_ID
      - run:
          command: ./gradlew build --init-script $THUNDRA_GRADLE_INIT_SCRIPT_PATH
workflows:
  example:
    jobs:
      - gradle
```

### use_maven_command

Use Maven command to integrate Thundra Foresight into your project and instrument your Maven build. With this command, you can monitor your unit, integration, and end-to-end tests in your Maven build with distributed tracing capabilities. Foresight is currently supporting JUnit and Selenium frameworks for Java runtime. However, making other frameworks such as TestNG available is in our roadmap.
Python shell is required to successfully run this command at the moment.


```yaml
version: '2.1'
orbs:
  thundra: thundra-io/thundra-foresight@1.0.0
jobs:
  maven:
    docker:
      - image: cimg/openjdk:11.0
    steps:
      - checkout
      - thundra/maven:
          apikey: THUNDRA_APIKEY
          project_id: THUNDRA_AGENT_TEST_PROJECT_ID
      - run:
          command: mvn clean verify
workflows:
  example:
    jobs:
      - maven
```