TestRailClient

class TestRailClient(    val baseUrl: Url,     val authentication: BasicAuthCredentials,     val client: HttpClient = HttpClient() { install(ContentNegotiation) { json( Json { prettyPrint = true isLenient = true ignoreUnknownKeys = true }, ) } install(Auth) { basic { credentials { authentication } } } })

Constructors

Link copied to clipboard
fun TestRailClient(    baseUrl: Url,     authentication: BasicAuthCredentials,     client: HttpClient = HttpClient() { install(ContentNegotiation) { json( Json { prettyPrint = true isLenient = true ignoreUnknownKeys = true }, ) } install(Auth) { basic { credentials { authentication } } } })

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
inline suspend fun <T> get(path: String): T
Link copied to clipboard
suspend fun getAttachment(id: String): ByteArray
Link copied to clipboard
suspend fun getAttachmentsForCase(caseId: Long): AttachmentsForCase
Link copied to clipboard
suspend fun getAttachmentsForSuite(suiteId: Long): String
Link copied to clipboard
suspend fun getCase(id: Long): Case
Link copied to clipboard
suspend fun getCases(projectId: Long, suiteId: Long): Cases
Link copied to clipboard
suspend fun getCaseString(id: Long): String
Link copied to clipboard
suspend fun getSections(projectId: Long, suiteId: Long): Sections
Link copied to clipboard
suspend fun getSectionsStr(projectId: Long, suiteId: Long): String
Link copied to clipboard
suspend fun getSuite(suiteId: Long): Suite
Link copied to clipboard
fun Case.url(): String

Properties

Link copied to clipboard
val API_PREFIX: String
Link copied to clipboard
val authentication: BasicAuthCredentials
Link copied to clipboard
val baseUrl: Url
Link copied to clipboard
val client: HttpClient

Extensions

Link copied to clipboard
suspend fun TestRailClient.downloadCase(    caseId: Long,     sectionHelper: SectionHelper,     outputDirectory: File,     overwrite: Boolean = false)
Link copied to clipboard
suspend fun TestRailClient.downloadEverything(    sectionIds: List<Long> = listOf(49388, 50008),     projectId: Long = TestRailClient.SE_PROJECT_ID,     suiteId: Long = TestRailClient.SE_SUITE_ID,     overwrite: Boolean = false,     ignoredParentSections: Set<Long> = SectionHelper.DEFAULT_IGNORED_SECTIONS,     testCaseDirectory: File = File("./src/jvmTest/resources/testrail/features/"),     mapDirectory: File = File("./src/jvmTest/resources/testrail/maps")): Map<Long, File>
Link copied to clipboard
suspend fun TestRailClient.downloadMaps(suiteId: Long, destination: File): List<String>?
Link copied to clipboard
suspend fun TestRailClient.downloadSection(    sectionId: Long,     suiteId: Long = TestRailClient.SE_SUITE_ID,     projectId: Long = TestRailClient.SE_PROJECT_ID,     sectionHelper: SectionHelper,     overwrite: Boolean = false,     excludingTags: Set<String> = setOf("ignore", "duplicate", "creative", "difficult", "todo"),     testCaseDirectory: File = File("./src/jvmTest/resources/features/testrail-2/"))
Link copied to clipboard
suspend fun TestRailClient.sectionHelper(    projectId: Long = TestRailClient.SE_PROJECT_ID,     suiteId: Long = TestRailClient.SE_SUITE_ID,     ignoredSections: Set<Long> = setOf(49384L, 49385L, 49386L)): SectionHelper