src.main.kotlin.com.gabrielfeo.develocity.api.TestsApi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of develocity-api-kotlin Show documentation
Show all versions of develocity-api-kotlin Show documentation
A library to use the Develocity API in Kotlin
The newest version!
package com.gabrielfeo.develocity.api
import com.gabrielfeo.develocity.api.internal.infrastructure.CollectionFormats.*
import retrofit2.http.*
import retrofit2.Response
import okhttp3.RequestBody
import com.squareup.moshi.Json
import com.gabrielfeo.develocity.api.model.ApiProblem
import com.gabrielfeo.develocity.api.model.TestCasesQuery
import com.gabrielfeo.develocity.api.model.TestContainersQuery
import com.gabrielfeo.develocity.api.model.TestsResponse
import com.gabrielfeo.develocity.api.model.*
@JvmSuppressWildcards
interface TestsApi {
/**
* Get a list of test cases.
* Retrieves the list of test cases of a single container.
* Responses:
* - 200: A list of test cases.
* - 400: The request cannot be fulfilled due to a problem.
* - 500: The server encountered an unexpected error.
*
* @param container Must be the fully qualified name of the test container to query. May not contain any wildcards.
* @param testOutcomes Allows restricting the search to tests that had at least one instance of the given outcome.
* @param limit The maximum number of test outcomes to query. (optional, default to 100)
* @param query A query for filtering tests, written in the Develocity advanced search query language See: https://gradle.com/help/advanced-search
* @param include Controls which optional fields are included in the response. (optional)
* @return [TestsResponse]
*/
@GET("api/tests/cases")
suspend fun getTestCases(@Query("container") container: kotlin.String, @Query("testOutcomes") testOutcomes: kotlin.collections.List, @Query("limit") limit: kotlin.Int? = 100, @Query("query") query: kotlin.String, @Query("include") include: kotlin.collections.List? = null): TestsResponse
/**
* Get a list of test containers.
* Returns the list of test containers.
* Responses:
* - 200: A list of test containers.
* - 400: The request cannot be fulfilled due to a problem.
* - 500: The server encountered an unexpected error.
*
* @param container Allows restricting the search to parts of the test container hierarchy. You can use wildcards to match a specific subpackage. (default to "*")
* @param testOutcomes Allows restricting the search to tests that had at least one instance of the given outcome.
* @param query A query for filtering tests, written in the Develocity advanced search query language See: https://gradle.com/help/advanced-search
* @param include Controls which optional fields are included in the response. (optional)
* @return [TestsResponse]
*/
@GET("api/tests/containers")
suspend fun getTestContainers(@Query("container") container: kotlin.String = "*", @Query("testOutcomes") testOutcomes: kotlin.collections.List, @Query("query") query: kotlin.String, @Query("include") include: kotlin.collections.List? = null): TestsResponse
}