---
title: "Get test performance-related metrics of a Maven build."
method: GET
path: "/api/builds/{id}/maven-test-performance"
tags: ["Builds", "GradleEnterprise", "Develocity"]
---

# Get test performance-related metrics of a Maven build.

`GET /api/builds/{id}/maven-test-performance`

## Request

- Base URL: `https://develocity.example.com`
- URL: `https://develocity.example.com/api/builds/{id}/maven-test-performance`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/develocity/apis/develocity-api/docs/api/builds/:id/maven-test-performance/get.ts> (a function with typed inputs; its response is checked against the schema)

This model is Maven specific and cannot be requested for another build tool.

## Response `200`

Test performance-related metrics of a Maven build.

- MavenTestPerformance: Test performance metrics of a Maven build.
  - `tests` BuildTestPerformanceTests, required: Test-related data of a build.
    - `testClassesCount` integer, required: Number of test classes of a build.
  - `serialTestGoalsExecutionTime` integer, required: The sum of the serial execution times in millis of test goals run in the build.
  - `testAcceleration` TestPerformanceBuildTestAcceleration, required: Test acceleration data of a build.
    - `predictiveTestSelection` TestPerformanceBuildPredictiveTestSelection, required: Predictive Test Selection related data of a build.
      - `usage` TestPerformanceBuildPredictiveTestSelectionUsage, required: Groups PTS usage data (build level).
        - `status` 'unavailable' | 'disabled' | 'enabled', required: Develocity extension status of a build / work unit: * `unavailable` - Feature status is unknown (e.g. for older Gradle plugin / Maven extension versions) or feature could not be used due to an unexpected error * `disabled` - The extension was enabled on none of the tasks in the build / for the task in question * `enabled` - The extension was enabled on at least one of the tasks in the build / for the task in question**
        - `selectionMode` 'relevant' | 'remaining', required: Develocity PTS selection mode of a build: * `relevant` - PTS selects only relevant tests (default) * `remaining` - PTS runs alls remaining tests
        - `wallClockSavings` integer, nullable, required: The wall-clock savings in milliseconds, which can be negative. Negative values indicate that it took more time to make the Predictive Test Selection request, than it would have taken to directly execute the tests.
        - `serialTimeSavings` integer, nullable, required: The serial time savings in milliseconds. This is the sum of test duration estimates from not selected test classes.
      - `simulation` TestPerformanceBuildPredictiveTestSelectionSimulation: Groups data from the three PTS simulation profiles (build level).
        - `conservative` TestPerformanceBuildPredictiveTestSelectionSimulationData, required: Data related to a Predictive Test Selection simulation (build level).
          - `wallClockSavingsPotential` integer, required: The PTS wallclock savings potential in milliseconds.
          - `serialTimeSavingsPotential` integer, required: The PTS serial time savings potential in milliseconds.
          - `workUnitFailuresPredictedCount` integer, required: The number of predicted task failures.
          - `workUnitFailuresMissedCount` integer, required: The number of task failures that were missed in the prediction.
          - `avoidableTestClassesCount` integer, required: The number test classes that can be avoided by PTS.
          - `unavoidableTestClassesCount` integer, required: The number of test classes that cannot be avoided by PTS.
          - `testClassesCountSelectedDueToInsufficientData` integer, required: The number of test classes that were selected because of insufficient data.
        - `standard` TestPerformanceBuildPredictiveTestSelectionSimulationData, required: Data related to a Predictive Test Selection simulation (build level).
          - `wallClockSavingsPotential` integer, required: The PTS wallclock savings potential in milliseconds.
          - `serialTimeSavingsPotential` integer, required: The PTS serial time savings potential in milliseconds.
          - `workUnitFailuresPredictedCount` integer, required: The number of predicted task failures.
          - `workUnitFailuresMissedCount` integer, required: The number of task failures that were missed in the prediction.
          - `avoidableTestClassesCount` integer, required: The number test classes that can be avoided by PTS.
          - `unavoidableTestClassesCount` integer, required: The number of test classes that cannot be avoided by PTS.
          - `testClassesCountSelectedDueToInsufficientData` integer, required: The number of test classes that were selected because of insufficient data.
        - `fast` TestPerformanceBuildPredictiveTestSelectionSimulationData, required: Data related to a Predictive Test Selection simulation (build level).
          - `wallClockSavingsPotential` integer, required: The PTS wallclock savings potential in milliseconds.
          - `serialTimeSavingsPotential` integer, required: The PTS serial time savings potential in milliseconds.
          - `workUnitFailuresPredictedCount` integer, required: The number of predicted task failures.
          - `workUnitFailuresMissedCount` integer, required: The number of task failures that were missed in the prediction.
          - `avoidableTestClassesCount` integer, required: The number test classes that can be avoided by PTS.
          - `unavoidableTestClassesCount` integer, required: The number of test classes that cannot be avoided by PTS.
          - `testClassesCountSelectedDueToInsufficientData` integer, required: The number of test classes that were selected because of insufficient data.
    - `testDistribution` TestPerformanceBuildTestDistribution, required: Test Distribution related data of a build.
      - `usageStatus` 'unavailable' | 'disabled' | 'enabled', required: Develocity extension status of a build / work unit: * `unavailable` - Feature status is unknown (e.g. for older Gradle plugin / Maven extension versions) or feature could not be used due to an unexpected error * `disabled` - The extension was enabled on none of the tasks in the build / for the task in question * `enabled` - The extension was enabled on at least one of the tasks in the build / for the task in question**
      - `wallClockSavings` integer, nullable, required: The wall-clock savings in milliseconds, which can be negative. Negative values indicate that it took more time to make the Test Distribution request, than it would have taken to directly execute the tests.
    - `wallClockSavings` integer, nullable, required: The wall-clock savings in milliseconds, which can be negative. Negative values indicate that it took more time to make the test acceleration requests, than it would have taken to directly execute the tests.
  - `testGoals` TestPerformanceGoal[], required
    - `goalPath` string, required: The path of the test goal
    - `goalType` string, required: The fully qualified name of the goal type
    - `wallClockExecutionTime` integer, required: The total execution time of the test goal in millis. This is the time elapsed between the start and end of the entire test goal.
    - `serialExecutionTime` integer, required: The serial execution time of the test goal in millis. This is the sum of all serial test class durations and includes the setup and cleanup durations of the test goal.
    - `tests` WorkUnitTestPerformanceTests, required: Test-related data of a task/goal.
      - `failedTestClassesCount` integer, required: Number of failed test classes of a task/goal.
      - `testClassesCount` integer, required: Number of test classes of a task/goal.
    - `testAcceleration` TestPerformanceWorkUnitTestAcceleration, required: Test acceleration data of a work unit.
      - `predictiveTestSelection` TestPerformanceWorkUnitPredictiveTestSelection, required: Predictive Test Selection related data of a work unit.
        - `usage` TestPerformanceWorkUnitPredictiveTestSelectionUsage, required: Predictive Test Selection related data of a work unit.
          - `status` 'unavailable' | 'disabled' | 'enabled', required: Develocity extension status of a build / work unit: * `unavailable` - Feature status is unknown (e.g. for older Gradle plugin / Maven extension versions) or feature could not be used due to an unexpected error * `disabled` - The extension was enabled on none of the tasks in the build / for the task in question * `enabled` - The extension was enabled on at least one of the tasks in the build / for the task in question**
          - `selectionMode` 'relevant' | 'remaining', required: Develocity PTS selection mode of a build: * `relevant` - PTS selects only relevant tests (default) * `remaining` - PTS runs alls remaining tests
          - `wallClockSavings` integer, nullable, required: The wall-clock savings in milliseconds, which can be negative. Negative values indicate that it took more time to make the Predictive Test Selection request, than it would have taken to directly execute the tests.
          - `serialTimeSavings` integer, nullable, required: The serial time savings in milliseconds. This is the sum of test duration estimates from not selected test classes.
          - `nonSelectedTestClassesCount` integer, nullable, required: The number of test classes that have not been selected by Predictive Test Selection. Null if Predictive Test Selection was disabled / unavailable.
        - `simulation` TestPerformanceWorkUnitPredictiveTestSelectionSimulation: Groups data from the three PTS simulation profiles (task/goal level).
          - `conservative` TestPerformanceWorkUnitPredictiveTestSelectionSimulationData, required: Data related to a Predictive Test Selection simulation (task/goal level).
            - `wallClockSavingsPotential` integer, required: The PTS wallclock savings potential in milliseconds.
            - `serialTimeSavingsPotential` integer, required: The PTS serial time savings potential in milliseconds.
            - `avoidableTestClassesCount` integer, required: The number test classes that can be avoided by PTS.
            - `unavoidableTestClassesCount` integer, required: The number of test classes that cannot be avoided by PTS.
            - `testClassesCountSelectedDueToInsufficientData` integer, required: The number of test classes that were selected because of insufficient data.
            - `failedTestClassesPredictedCount` integer, required: The number of test classes with failed prediction.
          - `standard` TestPerformanceWorkUnitPredictiveTestSelectionSimulationData, required: Data related to a Predictive Test Selection simulation (task/goal level).
            - `wallClockSavingsPotential` integer, required: The PTS wallclock savings potential in milliseconds.
            - `serialTimeSavingsPotential` integer, required: The PTS serial time savings potential in milliseconds.
            - `avoidableTestClassesCount` integer, required: The number test classes that can be avoided by PTS.
            - `unavoidableTestClassesCount` integer, required: The number of test classes that cannot be avoided by PTS.
            - `testClassesCountSelectedDueToInsufficientData` integer, required: The number of test classes that were selected because of insufficient data.
            - `failedTestClassesPredictedCount` integer, required: The number of test classes with failed prediction.
          - `fast` TestPerformanceWorkUnitPredictiveTestSelectionSimulationData, required: Data related to a Predictive Test Selection simulation (task/goal level).
            - `wallClockSavingsPotential` integer, required: The PTS wallclock savings potential in milliseconds.
            - `serialTimeSavingsPotential` integer, required: The PTS serial time savings potential in milliseconds.
            - `avoidableTestClassesCount` integer, required: The number test classes that can be avoided by PTS.
            - `unavoidableTestClassesCount` integer, required: The number of test classes that cannot be avoided by PTS.
            - `testClassesCountSelectedDueToInsufficientData` integer, required: The number of test classes that were selected because of insufficient data.
            - `failedTestClassesPredictedCount` integer, required: The number of test classes with failed prediction.
      - `testDistribution` TestPerformanceWorkUnitTestDistribution, required: Test Distribution related data of a work unit.
        - `usageStatus` 'unavailable' | 'disabled' | 'enabled', required: Develocity extension status of a build / work unit: * `unavailable` - Feature status is unknown (e.g. for older Gradle plugin / Maven extension versions) or feature could not be used due to an unexpected error * `disabled` - The extension was enabled on none of the tasks in the build / for the task in question * `enabled` - The extension was enabled on at least one of the tasks in the build / for the task in question**
        - `wallClockSavings` integer, nullable, required: The wall-clock savings in milliseconds, which can be negative. Negative values indicate that it took more time to make the Test Distribution request, than it would have taken to directly execute the tests.
        - `remoteTestClassesCount` integer, nullable: The number of test classes that have been executed remotely by Test Distribution. Null if Test Distribution was disabled / unavailable.
      - `wallClockSavings` integer, nullable, required: The wall-clock savings in milliseconds, which can be negative. Negative values indicate that it took more time to make the test acceleration requests, than it would have taken to directly execute the tests.

## Other responses

- `400`: The request cannot be fulfilled due to a problem.
- `404`: The referenced resource either does not exist or the permissions to know about it are missing.
- `500`: The server encountered an unexpected error.
- `503`: The server is not ready to handle the request.

---

[API](https://skmtc.dev/develocity/apis/develocity-api.md) - [All operations](https://skmtc.dev/develocity/apis/develocity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/develocity/apis/develocity-api/revisions/b49835fbf065?raw)
