{"id":37459511,"url":"https://github.com/topicusoverheid/java-factory-bot","last_synced_at":"2026-01-16T07:02:04.938Z","repository":{"id":57738084,"uuid":"125115608","full_name":"topicusoverheid/java-factory-bot","owner":"topicusoverheid","description":"Library for creating objects as test data, inspired by the popular FactoryBot for ruby","archived":false,"fork":false,"pushed_at":"2018-09-11T09:10:46.000Z","size":164,"stargazers_count":23,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-24T06:01:59.424Z","etag":null,"topics":["factory-bot","fixture-data","java","tests"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","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/topicusoverheid.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":"2018-03-13T21:14:57.000Z","updated_at":"2024-09-12T20:07:16.000Z","dependencies_parsed_at":"2022-08-25T18:52:55.653Z","dependency_job_id":null,"html_url":"https://github.com/topicusoverheid/java-factory-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/topicusoverheid/java-factory-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topicusoverheid%2Fjava-factory-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topicusoverheid%2Fjava-factory-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topicusoverheid%2Fjava-factory-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topicusoverheid%2Fjava-factory-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/topicusoverheid","download_url":"https://codeload.github.com/topicusoverheid/java-factory-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topicusoverheid%2Fjava-factory-bot/sbom","scorecard":{"id":894619,"data":{"date":"2025-08-18","repo":{"name":"github.com/topicusoverheid/java-factory-bot","commit":"bfb3d571a90211508ea09d2dad6a404d352acc5e"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":1.6,"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/14 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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"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/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"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/40576783fda6698350fcbbeaea760ff827433034/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 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-qg25-hgjv-cg9q","Warn: Project is vulnerable to: GHSA-rcjj-h6gh-jf3r","Warn: Project is vulnerable to: GHSA-xphj-m9cc-8fmq","Warn: Project is vulnerable to: GHSA-3mc7-4q67-w48m","Warn: Project is vulnerable to: GHSA-98wm-3w3q-mw94","Warn: Project is vulnerable to: GHSA-9w3m-gqgf-c4p9","Warn: Project is vulnerable to: GHSA-c4r9-r8fh-9vj2","Warn: Project is vulnerable to: GHSA-hhhw-99gj-p3c3","Warn: Project is vulnerable to: GHSA-mjmj-j48q-9wg2","Warn: Project is vulnerable to: GHSA-rvwf-54qp-4r6v","Warn: Project is vulnerable to: GHSA-w37g-rhq8-7m4j"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T13:13:31.893Z","repository_id":57738084,"created_at":"2025-08-24T13:13:31.893Z","updated_at":"2025-08-24T13:13:31.893Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":["factory-bot","fixture-data","java","tests"],"created_at":"2026-01-16T07:02:04.853Z","updated_at":"2026-01-16T07:02:04.920Z","avatar_url":"https://github.com/topicusoverheid.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# java-factory-bot\n\n[![Build Status](https://travis-ci.org/topicusoverheid/java-factory-bot.svg?branch=master)](https://travis-ci.org/topicusoverheid/java-factory-bot)\n\nA library for creating objects as test data, with support for persisting the objects in a database.\n\nUsing factories, creating default sane test objects is simple, while individual attibutes can easily be tweaked.\nCombining these with [java-faker](https://github.com/DiUS/java-faker) allows to boost your tests, or seed your database\nfor demo and testing purposes.\n\nThis library is inspired by [factory_bot](https://github.com/thoughtbot/factory_bot), a popular gem for ruby.\n\n## Example\n\nGiven a model for an `Article` and a `User` (getters and setters are omitted):\n\n```java\n@Data\npublic class Article {\n    private String title;\n    private String content;\n    private Date creationDate;\n    private User author;\n}\n\n@Data\npublic class User {\n    private String username;\n    private String firstName;\n    private String lastName;\n    private String email;\n}\n```\n\nwe can define factories like\n\n```groovy\nclass ArticleFactory extends Factory\u003cArticle\u003e {\n    Map\u003cString, Attribute\u003e attributes = [\n            title       : value { faker.lorem().sentence() },\n            content     : value { faker.lorem().paragraph() },\n            creationDate: value { faker.date().past(20, TimeUnit.DAYS) },\n            author      : hasOne(UserFactory)\n    ]\n}\n\nclass UserFactory extends Factory\u003cUser\u003e {\n    Map\u003cString, Attribute\u003e attributes = [\n            username : value { faker.name().username() },\n            firstName: value { faker.name().firstName() },\n            lastName : value { faker.name().lastName() },\n            email    : value { \"${get(\"firstName\")}.${get(\"lastName\")}@example.com\" }\n    ]\n}\n```\n\nand create objects using\n\n```java\nArticle article = new ArticleFactory().build()\n```\n\nwhich generates an article with default random but sane attributes. Individual attributes or relations can be overriden\nby passing them in a map:\n\n```groovy\nArticle article = new ArticleFactory().build([title: \"Foo\", user: [username: \"johndoe\"]])\n```\n\nFor documentation and more examples, visit the [wiki](https://github.com/topicusoverheid/java-factory-bot/wiki).\n\n## Installation\n\n### Maven\n\nAdd the following to your dependencies:\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003enl.topicus.overheid\u003c/groupId\u003e\n        \u003cartifactId\u003ejava-factory-bot\u003c/artifactId\u003e\n        \u003cversion\u003e0.2.0\u003c/version\u003e\n        \u003cscope\u003etest\u003c/scope\u003e\n    \u003c/dependency\u003e\n\n### Gradle\n\nAdd the following line to the dependency section of `build.gradle`\n\n    compile \"nl.topicus.overheid:java-factory-bot:0.2.0\"\n\n## Building\n\nExecute `./mvnw install` to build and test the library.\n\n### Source and javadoc\n\nTo generate jars containing the source and javadoc, enable the `source` profile. Example:\n\n    ./mvnw install -P source\n\n### Deploy\n\nTo deploy the library to maven central, enable the `release` and `source` profiles and perform the `deploy` goal:\n\n    ./mvnw clean install deploy -P source -P release\n\n## Licence\n\nThis library is released under the Apache 2.0 licence, which you can find [here](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopicusoverheid%2Fjava-factory-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftopicusoverheid%2Fjava-factory-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopicusoverheid%2Fjava-factory-bot/lists"}