{"id":24847500,"url":"https://github.com/mjstrasser/kotest-html-reporter","last_synced_at":"2025-07-02T11:41:22.127Z","repository":{"id":39907711,"uuid":"445743305","full_name":"mjstrasser/kotest-html-reporter","owner":"mjstrasser","description":"HTML test reporter for Kotest","archived":false,"fork":false,"pushed_at":"2024-01-29T08:33:32.000Z","size":12711,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T11:34:34.958Z","etag":null,"topics":["kotlin","testing"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mjstrasser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-08T06:32:08.000Z","updated_at":"2023-09-04T22:30:11.000Z","dependencies_parsed_at":"2023-11-07T02:23:41.766Z","dependency_job_id":"bbabcca8-5eec-42a8-a5a3-a3a0812cac83","html_url":"https://github.com/mjstrasser/kotest-html-reporter","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstrasser%2Fkotest-html-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstrasser%2Fkotest-html-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstrasser%2Fkotest-html-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjstrasser%2Fkotest-html-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjstrasser","download_url":"https://codeload.github.com/mjstrasser/kotest-html-reporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245632351,"owners_count":20647194,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kotlin","testing"],"created_at":"2025-01-31T11:29:49.324Z","updated_at":"2025-07-02T11:41:22.118Z","avatar_url":"https://github.com/mjstrasser.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kotest HTML Reporter\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Build](https://github.com/mjstrasser/kotest-html-reporter/actions/workflows/build.yml/badge.svg)](https://github.com/mjstrasser/kotest-html-reporter/actions/workflows/build.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/com.michaelstrasser/kotest-html-reporter?label=maven%20central)](https://central.sonatype.com/search?q=a:kotest-html-reporter)\n\nA [Kotest](https://kotest.io) [framework extension](https://kotest.io/docs/framework/extensions/extensions-introduction.html)\nfor reporting test results in a single HTML file.\n\n[This example](https://kotest-html-reporter.michaelstrasser.com) is the most recent report of the tests of Kotest HTML\nReporter itself. It deliberately includes failing tests to demonstrate how those are rendered in a report.\n\n## What is it?\n\nKotest HTML Reporter is intended to be used with meaningful test descriptions, in any Kotest style, to create useful\nspecifications of the software under test.\n\n### Feature: inline Markdown conversion\n\nKotest HTML Reporter converts inline Markdown in the names of specs and tests. It renders `code`,\n_italic_ and **bold** test as expected.\n\n### Feature: `description` extension property for specs\n\nThe `description` extension property for specs enables you to describe the class or feature that is being tested by a\nspec. For example:\n\n```kotlin\ninternal class DispatcherTest : DescribeSpec({\n    description(\n        \"\"\"\n        | The `Dispatcher` object is responsible for dispatching `LogEvent`s to zero\n        | or more sinks.\n    \"\"\".trimMargin()\n    )\n    describe(\"sinksFor() function\") {\n        describe(\"when no loggers are configured\") {\n            it(\"returns no sinks\") {\n                loggingConfiguration { }\n                Dispatcher.sinksFor(randomString(), randomLevel()) shouldHaveSize 0\n            }\n        }\n        // ...\n    }\n})\n```\n\nis rendered as:\n\n![Rendered description](rendered-description.png)\n\n## Quick start\n\nAdd Kotest HTML Reporter to your Gradle project.\n\n\u003e Kotest version 6 has some breaking changes and is supported by version 0.8 and above of this\n\u003e extension. If you are using an earlier version of Kotest (e.g. 5.9.1) then use version 0.7.3 of\n\u003e this extension.\n\n### Kotest versions below 6\n\n```kotlin\ndependencies {\n    // ...\n    testImplementation(\"io.kotest:kotest-runner-junit5:5.9.1\")\n    testImplementation(\"com.michaelstrasser:kotest-html-reporter:0.7.3\")\n}\n```\n\nConfigure Kotest to use HTML Reporter:\n\n```kotlin\nimport io.kotest.core.config.AbstractProjectConfig\nimport io.kotest.core.extensions.Extension\nimport mjs.kotest.HtmlReporter\n\n/** Create an HTML report for every test run. */\nobject KotestConfig : AbstractProjectConfig() {\n    override fun extensions(): List\u003cExtension\u003e = listOf(\n        HtmlReporter(),\n    )\n}\n```\n\n### Kotest versions 6 and above\n\n```kotlin\ndependencies {\n    // ...\n    testImplementation(\"io.kotest:kotest-runner-junit5:6.0.0.M4\")\n    testImplementation(\"com.michaelstrasser:kotest-html-reporter:0.8.0\")\n}\n```\n\nConfigure Kotest to use HTML Reporter like this:\n\n```kotlin\npackage com.thing\n\nimport io.kotest.core.config.AbstractProjectConfig\nimport io.kotest.core.extensions.Extension\nimport mjs.kotest.HtmlReporter\n\n/** Create an HTML report for every test run. */\nobject KotestConfig : AbstractProjectConfig() {\n    override val extensions: List\u003cExtension\u003e = listOf(\n        HtmlReporter(),\n    )\n}\n```\n\nPlace a `kotest.properties` file in your `src/test/resources` directory with a line that specifies\nthe fully qualified name of your configuration class or object:\n\n```properties\nkotest.framework.config.fqn=com.thing.KotestConfig\n```\n\n### Using snapshot builds\n\nIf you want to use snapshot builds of Kotest HTML Reporter, specify these in your Gradle build:\n\n```kotlin\nrepositories {\n    // ...\n    maven(\"https://central.sonatype.com/repository/maven-snapshots/\")\n}\n\n```\n\n```kotlin\ndependencies {\n    // ...\n    testImplementation(\"io.kotest:kotest-runner-junit5:6.0.0.M4\")\n    testImplementation(\"com.michaelstrasser:kotest-html-reporter:0.9.0-SNAPSHOT\")\n}\n```\n\n## Configuration options\n\nKotest HTML Reporter accepts these configuration options, here showing default values:\n\n```kotlin\nHtmlReporter(\n    outputDir = \"reports/kotest\",\n    reportFilename = \"kotest-report.html\",\n)\n```\n\n- `outputDir`: output directory, relative to Gradle build directory.\n- `reportFilename`: name of the HTML report file.\n\n### Environment variables\n\nThese environment variables affect the generated output.\n\n* `GIT_COMMIT`: Display the commit identifier of the build that generated the report.\n* `GIT_MESSAGE`: Display the commit message of the build that generated the report.\n* `TIMEZONE`: Display the timestamp using this timezone. The specified value is passed to the Java `ZoneId.of()` method.\n\nThis project’s [GitHub Actions build file](.github/workflows/build.yml#L19) shows an example of setting these variables.\n\n## Example report\n\nHere is an example report showing the table of contents and expansion of a stacktrace.\n\n![Example of rendered HTML Report](kotest-html-report-example.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjstrasser%2Fkotest-html-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjstrasser%2Fkotest-html-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjstrasser%2Fkotest-html-reporter/lists"}