{"id":17065983,"url":"https://github.com/lachlanmckee/timber-junit-rule","last_synced_at":"2025-10-09T02:22:16.340Z","repository":{"id":49470002,"uuid":"111315175","full_name":"LachlanMcKee/timber-junit-rule","owner":"LachlanMcKee","description":"A highly configurable JUnit Rule that outputs Timber logs to standard output","archived":false,"fork":false,"pushed_at":"2021-06-16T23:53:08.000Z","size":90,"stargazers_count":44,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-11T05:03:12.800Z","etag":null,"topics":["android","java","junit","junit-test","logging","testing","timber","timber-junit-rule","timber-logs","timber-tree"],"latest_commit_sha":null,"homepage":"","language":"Java","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/LachlanMcKee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-19T17:06:56.000Z","updated_at":"2024-10-27T01:47:29.000Z","dependencies_parsed_at":"2022-08-24T14:39:25.255Z","dependency_job_id":null,"html_url":"https://github.com/LachlanMcKee/timber-junit-rule","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/LachlanMcKee/timber-junit-rule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LachlanMcKee%2Ftimber-junit-rule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LachlanMcKee%2Ftimber-junit-rule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LachlanMcKee%2Ftimber-junit-rule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LachlanMcKee%2Ftimber-junit-rule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LachlanMcKee","download_url":"https://codeload.github.com/LachlanMcKee/timber-junit-rule/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LachlanMcKee%2Ftimber-junit-rule/sbom","scorecard":{"id":81937,"data":{"date":"2025-08-11","repo":{"name":"github.com/LachlanMcKee/timber-junit-rule","commit":"62ecdd1c7fc56c03c7b95fc8a9053d1a61836577"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":-1,"reason":"No tokens found","details":null,"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":"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/12 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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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 14 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-15T06:06:09.535Z","repository_id":49470002,"created_at":"2025-08-15T06:06:09.535Z","updated_at":"2025-08-15T06:06:09.535Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000781,"owners_count":26082906,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","java","junit","junit-test","logging","testing","timber","timber-junit-rule","timber-logs","timber-tree"],"created_at":"2024-10-14T11:05:32.732Z","updated_at":"2025-10-09T02:22:16.298Z","avatar_url":"https://github.com/LachlanMcKee.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Timber JUnit-Rule\n\nThis library provides a JUnit TestRule that plants a temporary Timber tree that pipes any logs sent via Timber to the standard System.out. Once a unit test has completed, the Timber tree is removed to avoid logging unintended test cases.\n\nThe rule is extremely useful for Android JUnit tests, as the Timber logs do not show without planting a tree.\n\n## Usage\nUsing the library is very straight forward. An example is as follows:\n\n```java\npublic class TestExample {\n    @Rule\n    public TimberTestRule timberTestRule = TimberTestRule.builder()\n            .minPriority(Log.ERROR)\n            .showThread(true)\n            .showTimestamp(false)\n            .onlyLogWhenTestFails(true)\n            .build();\n}\n```\n\nThere are also several factory methods which cover many common cases. These are:\n\n```java\npublic class TestExample {\n    @Rule\n    public TimberTestRule logAllAlwaysRule = TimberTestRule.logAllAlways();\n    @Rule\n    public TimberTestRule logAllOnFailuresRule = TimberTestRule.logAllWhenTestFails();\n    @Rule\n    public TimberTestRule logErrorsAlwaysRule = TimberTestRule.logErrorsAlways();\n    @Rule\n    public TimberTestRule logErrorsOnFailuresRule = TimberTestRule.logErrorsWhenTestFails();\n}\n```\n\n### Configuration\nAs seen in the example above, there are many ways to modify the output using the following behaviours:\n- The minimum log level to output.\n- Whether thread ids are shown.\n- Whether timestamps are shown.\n- Whether to always log, or only log when a unit test fails.\n\n## Download\nThis library is available on Maven, you can add it to your project using the following gradle dependencies:\n\n```gradle\ntestCompile 'net.lachlanmckee:timber-junit-rule:1.0.1'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flachlanmckee%2Ftimber-junit-rule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flachlanmckee%2Ftimber-junit-rule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flachlanmckee%2Ftimber-junit-rule/lists"}