{"id":17643798,"url":"https://github.com/vanniktech/junit-rules","last_synced_at":"2026-03-04T20:03:58.085Z","repository":{"id":37412573,"uuid":"99514897","full_name":"vanniktech/junit-rules","owner":"vanniktech","description":"A set of handy junit rules.","archived":false,"fork":false,"pushed_at":"2026-03-03T17:14:20.000Z","size":833,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-03T21:14:05.379Z","etag":null,"topics":["junit","junit-rule","junit4","testing"],"latest_commit_sha":null,"homepage":"http://vanniktech.com","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/vanniktech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/funding.yml","license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["vanniktech"]}},"created_at":"2017-08-06T21:42:43.000Z","updated_at":"2026-02-10T17:52:11.000Z","dependencies_parsed_at":"2023-09-26T14:00:07.376Z","dependency_job_id":"c020e2e2-8d09-4fc9-b564-728e50b0c8a1","html_url":"https://github.com/vanniktech/junit-rules","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/vanniktech/junit-rules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fjunit-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fjunit-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fjunit-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fjunit-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanniktech","download_url":"https://codeload.github.com/vanniktech/junit-rules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fjunit-rules/sbom","scorecard":{"id":448211,"data":{"date":"2025-08-11","repo":{"name":"github.com/vanniktech/junit-rules","commit":"e7be6887d60174cc4a59ae0e1e4d46aa27baa041"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/1 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":"Maintained","score":10,"reason":"18 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-release.yml:1","Warn: no topLevel permission defined: .github/workflows/publish-snapshot.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":"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/build.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/vanniktech/junit-rules/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vanniktech/junit-rules/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/vanniktech/junit-rules/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/vanniktech/junit-rules/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vanniktech/junit-rules/publish-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-release.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/vanniktech/junit-rules/publish-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-snapshot.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/vanniktech/junit-rules/publish-snapshot.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-snapshot.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/vanniktech/junit-rules/publish-snapshot.yml/master?enable=pin","Info:   2 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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":"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish-snapshot.yml:9"],"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":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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-19T07:27:07.151Z","repository_id":37412573,"created_at":"2025-08-19T07:27:07.151Z","updated_at":"2025-08-19T07:27:07.151Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30091585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T19:41:02.502Z","status":"ssl_error","status_checked_at":"2026-03-04T19:40:05.550Z","response_time":59,"last_error":"SSL_read: 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":["junit","junit-rule","junit4","testing"],"created_at":"2024-10-23T09:42:55.282Z","updated_at":"2026-03-04T20:03:58.063Z","avatar_url":"https://github.com/vanniktech.png","language":"Kotlin","readme":"junit-rules\n===========\n\nA set of handy junit rules.\n\n## JUnit 4\n\n```groovy\ntestImplementation 'com.vanniktech:junit4-rules:0.3.0'\ntestImplementation 'com.vanniktech:junit4-rules:0.4.0-SNAPSHOT'\n```\n\n### DefaultLocaleRule\n\nJUnit rule for taking control over the Locale.\n\n```java\n/** Creates the rule and will safely restore the default locale for each test. */\n@Rule public final DefaultLocaleRule defaultLocaleRule = new DefaultLocaleRule();\n```\n\n```java\n/** Creates the rule and will set the preferred locale for each test. */\n@Rule public final DefaultLocaleRule defaultLocaleRule = new DefaultLocaleRule(US);\n```\n\n### DefaultTimeZoneRule\n\nJUnit rule for taking control over the Timezone.\n\n```java\n/** Creates the rule and will safely restore the default timezone for each test. */\n@Rule public final DefaultTimeZoneRule defaultTimeZoneRule = new DefaultTimeZoneRule();\n```\n\n```java\n/** Creates the rule and will set the preferred timezone for each test. */\n@Rule public final DefaultTimeZoneRule defaultTimeZoneRule = new DefaultTimeZoneRule(TimeZone.getTimeZone(\"GMT-08:00\"));\n```\n\nFor more information have a look at the [tests](junit4-rules/src/test/java/com/vanniktech/junit4rules/).\n\n## JUnit 4 Android Integration\n\n```groovy\nandroidTestImplementation 'com.vanniktech:junit4-android-integration-rules:0.2.0'\nandroidTestImplementation 'com.vanniktech:junit4-android-integration-rules:0.3.0-SNAPSHOT'\n```\n\n### DemoModeRule\n\nJUnit rule for specifying some of the UI demo commands and customize some part of the Status as well as the Navigation bar. Thanks to [Hugo Visser](https://gist.github.com/hvisser/e716105f4e3cf2908ea463dbdb50679c) for this inspiration and sharing the initial piece.\n\n```java\n/** Creates the rule in default mode and shows you a clean status bar with half mobile data reception, 100% battery and an 11am clock. */\n@Rule public final DemoModeRule demoModeRule = new DemoModeRule();\n```\n\n```java\n/** Creates the rule and lets you specify all of your preferred certain options. Have a look at the documentation for more information. */\n@Rule public final DemoModeRule demoModeRule = new DemoModeRule(\n  notifications().visible(false),\n  network().wifi(true).mobileDataType(MOBILE_DATA_TYPE_E),\n  battery().level(11).plugged(false).powersave(true),\n  status().bluetooth(BLUETOOTH_MODE_CONNECTED).speakerphone(true),\n  clock().hhmm(\"1800\")\n)\n```\n\nFor more information have a look at the [tests](junit4-android-integration-rules/src/androidTest/java/com/vanniktech/junit4androidintegrationrules/).\n\n# License\n\nCopyright (C) 2017 Vanniktech - Niklas Baudy\n\nLicensed under the Apache License, Version 2.0\n","funding_links":["https://github.com/sponsors/vanniktech"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanniktech%2Fjunit-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanniktech%2Fjunit-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanniktech%2Fjunit-rules/lists"}