{"id":36704494,"url":"https://github.com/mike-neck/ktcheck","last_synced_at":"2026-01-12T11:41:26.396Z","repository":{"id":57742869,"uuid":"248736321","full_name":"mike-neck/ktcheck","owner":"mike-neck","description":"ktcheck is a test framework for Kotlin working on JUnit platform, with Given-When-Then style.","archived":false,"fork":false,"pushed_at":"2020-05-20T14:11:16.000Z","size":214,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-01-24T09:30:20.900Z","etag":null,"topics":["bdd-framework","junit-platform","kotlin","kotlin-testing","test","test-framework","testing"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mike-neck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-20T11:13:39.000Z","updated_at":"2020-07-29T11:42:30.000Z","dependencies_parsed_at":"2022-09-11T07:01:45.395Z","dependency_job_id":null,"html_url":"https://github.com/mike-neck/ktcheck","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mike-neck/ktcheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-neck%2Fktcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-neck%2Fktcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-neck%2Fktcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-neck%2Fktcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mike-neck","download_url":"https://codeload.github.com/mike-neck/ktcheck/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mike-neck%2Fktcheck/sbom","scorecard":{"id":645020,"data":{"date":"2025-08-11","repo":{"name":"github.com/mike-neck/ktcheck","commit":"d149f4fbaf3069dc05ca007cabfbda105ccb35be"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/mike-neck/ktcheck/test.yml/master?enable=pin","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T11:55:41.137Z","repository_id":57742869,"created_at":"2025-08-21T11:55:41.137Z","updated_at":"2025-08-21T11:55:41.137Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bdd-framework","junit-platform","kotlin","kotlin-testing","test","test-framework","testing"],"created_at":"2026-01-12T11:41:23.444Z","updated_at":"2026-01-12T11:41:26.389Z","avatar_url":"https://github.com/mike-neck.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ktcheck\nktcheck is a test framework for Kotlin working on JUnit platform, with Given-When-Then style.\n\n---\n\nInstall\n---\n\nUse maven or Gradle.\n\n### Maven\n\n`pom.xml`\n\n```xml\n\u003cproject\u003e\n  \u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroup\u003erun.ktcheck\u003c/group\u003e\n      \u003cartifactId\u003ektcheck\u003c/artifactId\u003e\n      \u003cversion\u003ev0.1.0\u003c/version\u003e\n    \u003c/dependency\u003e\n  \u003c/dependencies\u003e\n  \u003cbuild\u003e\n      \u003cplugins\u003e\n          \u003cplugin\u003e\n              \u003cartifactId\u003emaven-surefire-plugin\u003c/artifactId\u003e\n              \u003cversion\u003e2.22.2\u003c/version\u003e\n          \u003c/plugin\u003e\n          \u003cplugin\u003e\n              \u003cartifactId\u003emaven-failsafe-plugin\u003c/artifactId\u003e\n              \u003cversion\u003e2.22.2\u003c/version\u003e\n          \u003c/plugin\u003e\n      \u003c/plugins\u003e\n  \u003c/build\u003e\n\u003c/project\u003e\n```\n\n### Gradle\n\n`build.gradle`\n\n```groovy\ndependencies {\n  testImplementation 'run.ktcheck:ktcheck:v0.1.0'\n}\n\ntest {\n  useJUnitPlatform()\n}\n```\n\n`build.gradle.kts`\n\n```kotlin\ndependencies {\n  testImplementation(\"run.ktcheck:ktcheck:v0.1.0\")\n}\n\ntest {\n  useJUnitPlatform()\n}\n```\n\nUsage\n---\n\n### Via JUnit Platform\n\n#### 1. Import ktcheck API\n\nAfter creating new Kotlin file, add ktcheck APIs.(of course you can import via IDE's auto completion.)\n\n```kotlin\nimport run.ktcheck.KtCheck\nimport run.ktcheck.Given\n```\n\n#### 2. Create kotlin object, which implements `KtCheck`\n\n```kotlin\nobject YourTest: KtCheck\n```\n\n#### 3. Implement `KtCheck` with `Given` class using kotlin delegation property `by`.\n\n- In a `Given` phrase, write description and function which returns a condition object.\n- In a `When` phrase, write description and function which takes the condition object and returns an action result.\n- In a `Then` phrase, write description and function which takes the condition object and the action result, and returns an assertion result.\n\n```kotlin\nobject YourTest: KtCheck\nby Given(\"TimeService with fixed clock\", { TimeService(fixedClock) })\n    .When(\"get current time from TimeService#now\", { timeService -\u003e timeService.now() })\n    .Then(\"it should be fixed time\", { _, instant -\u003e instant shouldBe fixedInstant })\n```\n\nTo create `Assertion` object, use these functions.\n\n- `run.ktcheck.assertion.NoDep.shouldBe`\n- `run.ktcheck.assertion.NoDep.shouldNotBe`\n- `run.ktcheck.assertion.NoDep.should` and `run.ktcheck.assertion.Matcher`\n\nIf the condition object is not needed, a simple asserting function is available.\n\n- `run.ktcheck.assertion.NoDep.expect`\n- `run.ktcheck.assertion.NoDep.expectNull`\n- `run.ktcheck.assertion.NoDep.expectNotNull`\n\n```kotlin\nobject YourTest: KtCheck\nby Given(\"TimeService with fixed clock\", { TimeService(fixedClock) })\n    .When(\"get current time from TimeService#now\", { timeService -\u003e timeService.now() })\n    .Then(\"it should be fixed time\", expect(fixedInstant))\n```\n\n#### 4. Run test via JUnit Platform\n\n```shell session\n$ ./mvnw test\n```\n\n```shell session\n$ ./gradlew test\n```\n\n### From main program\n\n#### 1. Import ktcheck API\n\nAfter creating new Kotlin file, add ktcheck APIs.(of course you can import via IDE's auto completion.)\n\n```kotlin\nimport run.ktcheck.Given\n```\n\n#### 2. Create and run `KtCheck` object in main program from `Given` class.\n\n- Create `KtCheck` object in main program from `Given` class.\n- Run `KtCheck` using `runStandalone()` function.\n- If test fails, it will throws `Unsuccessful` exception.\n\n```kotlin\nimport java.time.Clock\nimport java.time.OffsetDateTime\nimport java.time.ZoneOffset\n\nfun main() {\n  val fixedInstant =  OffsetDateTime.of(2020, 1, 2, 15, 4, 5, 6, ZoneOffset.UTC).toInstant()\n  val fixedClock = Clock.fixed(fixedInstant, ZoneOffset.UTC)\n  val check = Given(\"TimeService with fixed clock\") { TimeService(fixedClock) }\n      .When(\"get current time from TimeService#now\") { timeService -\u003e timeService.now() }\n      .Then(\"it should be fixed time\") { _, instant -\u003e instant shouldBe fixedInstant }\n  check.runStandalone()\n}\n```\n\nproject dependencies\n---\n\n![dependencies](http://www.plantuml.com/plantuml/png/U05rZZ4Emo0CHNTEmGNOEdNeHL075Baf91W4pltxJOUaQZ8blETlVxzrQgwsChUGdpPqgy0OlnGtlMbQ1bkc7RXGuu3u7cb7JcBXh-joSCHpP1e2lyQdZQEukWPvbPQFEX4RNognK9TR6aoVncWjwzm3NUpTnbnNoXWBE0aB28MhSDfBtmfg_0KuTP96RX__jw1gjSU9rfLNsU4W4_65lDxx0VEMYMS0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike-neck%2Fktcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmike-neck%2Fktcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmike-neck%2Fktcheck/lists"}