{"id":15108398,"url":"https://github.com/google/cmockery","last_synced_at":"2025-10-08T20:44:13.999Z","repository":{"id":39175557,"uuid":"47639371","full_name":"google/cmockery","owner":"google","description":"A lightweight library to simplify and generalize the process of writing unit tests for C applications.","archived":false,"fork":false,"pushed_at":"2020-05-28T15:20:07.000Z","size":435,"stargazers_count":1080,"open_issues_count":36,"forks_count":369,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-10-02T13:38:14.758Z","etag":null,"topics":["c","cmockery","embedded-systems","mocking","mocks","testing","tests","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/google.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","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":"2015-12-08T17:55:32.000Z","updated_at":"2025-09-30T03:21:20.000Z","dependencies_parsed_at":"2022-07-12T17:48:07.285Z","dependency_job_id":null,"html_url":"https://github.com/google/cmockery","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/google/cmockery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcmockery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcmockery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcmockery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcmockery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/cmockery/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fcmockery/sbom","scorecard":{"id":436612,"data":{"date":"2025-08-11","repo":{"name":"github.com/google/cmockery","commit":"399faa2654b7da1940bf6c0d74f14468b7059512"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.8,"checks":[{"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":"Code-Review","score":9,"reason":"Found 15/16 approved changesets -- score normalized to 9","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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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":"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":"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/google/.github/SECURITY.md:1","Info: Found linked content: github.com/google/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/google/.github/SECURITY.md:1","Info: Found text in security policy: github.com/google/.github/SECURITY.md:1"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 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"}},{"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"}}]},"last_synced_at":"2025-08-19T04:50:04.426Z","repository_id":39175557,"created_at":"2025-08-19T04:50:04.426Z","updated_at":"2025-08-19T04:50:04.426Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278174338,"owners_count":25942468,"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-03T02:00:06.070Z","response_time":53,"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":["c","cmockery","embedded-systems","mocking","mocks","testing","tests","unit-testing"],"created_at":"2024-09-25T22:01:41.626Z","updated_at":"2025-10-08T20:44:13.971Z","avatar_url":"https://github.com/google.png","language":"Shell","readme":"# Cmockery Unit Testing Framework\n\n[![Build Status][travis-badge]][travis-url]\n\n[travis-badge]: https://travis-ci.org/google/cmockery.svg?branch=master\n[travis-url]: https://travis-ci.org/google/cmockery\n\n### Contents\n\n * [Overview](#Overview)\n * [Building](#Building)\n * [Motivation](#Motivation)\n * [Community](#Community)\n\nCmockery is a lightweight library that is used to author C unit tests.\n\n## \u003ca name=\"Overview\"\u003e\u003c/a\u003eOverview\n\nCmockery tests are compiled into stand-alone executables and linked with\nthe Cmockery library, the standard C library, and the module being tested.  Any\nsymbols external to the module being tested should be mocked - replaced with\nfunctions that return values determined by the test - within the test\napplication.  Even though significant differences may exist between the target\nexecution environment of a code module and the environment used to test the\ncode, the unit testing is still valid since its goal is to test the logic of a\ncode modules at a functional level and not necessarily all of its interactions\nwith the target execution environment.\n\nIt may not be possible to compile a module into a test application without\nsome modification; therefore, the preprocessor symbol `UNIT_TESTING` should\nbe defined when Cmockery unit test applications are compiled so code within the\nmodule can be conditionally compiled for tests.\n\nMore detailed information about the mechanics of writing tests with Cmockery can\nbe found in [`docs/user_guide.md`](docs/user_guide.md).\n\n## Building\n\nTo compile the Cmockery library and example applications on Linux, run:\n\n~~~\n$ ./configure\n$ make\n~~~\n\nTo compile on Windows, run:\n\n~~~\n\u003e vsvars.bat\n\u003e cd windows\n\u003e nmake\n~~~\n\nThis code has been tested on Linux (Ubuntu) and Windows using VC++7 and VC++8.\n\n## \u003ca name=\"Motivation\"\u003e\u003c/a\u003eMotivation\n\nThere are a variety of C unit testing frameworks available; however, many of\nthem are fairly complex and require the latest compiler technology.  Some\ndevelopment requires the use of old compilers which makes it difficult to\nuse some unit testing frameworks.  In addition, many unit testing frameworks\nassume the code being tested is an application or module that is targeted to\nthe same platform that will ultimately execute the test.  Because of this\nassumption, many frameworks require the inclusion of standard C library headers\nin the code module being tested, which may collide with the custom or\nincomplete implementation of the C library utilized by the code under test.\n\nCmockery only requires a test application is linked with the standard C\nlibrary which minimizes conflicts with standard C library headers.  Also,\nCmockery tries avoid the use of some of the newer features of C compilers.\n\nThis results in Cmockery being a relatively small library that can be used\nto test a variety of exotic code.  If a developer wishes to simply test an\napplication with the latest compiler, then other unit testing frameworks may be\npreferable.\n\n## Community\n\nIf you have questions about Cmockery, use the following resources:\n\n* Stack Overflow: use the\n  [`cmockery`](https://stackoverflow.com/questions/tagged/cmockery) tag\n* Mailing list: **cmockery (at) googlegroups.com**\n  ([archives](https://groups.google.com/group/cmockery))\n\n  To join with a Google account, use the\n  [web UI](https://groups.google.com/forum/#!forum/cmockery/join); to\n  subscribe/unsubscribe with an arbitrary email address, send an email to:\n\n  * cmockery+subscribe (at) googlegroups.com\n  * cmockery+unsubscribe (at) googlegroups.com\n\n## License\n\nCmockery is licensed under the Apache 2.0 license; please see\n[`LICENSE.txt`](LICENSE.txt) for details.\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fcmockery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fcmockery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fcmockery/lists"}