{"id":17405037,"url":"https://github.com/jongpie/smarttestdatafactory","last_synced_at":"2026-02-07T15:03:45.822Z","repository":{"id":98193670,"uuid":"125753978","full_name":"jongpie/SmartTestDataFactory","owner":"jongpie","description":"A lightweight library for dynamically generating Sobject records \u0026 setting any required fields, based on the field's metadata ","archived":false,"fork":false,"pushed_at":"2019-01-28T02:19:15.000Z","size":12,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T00:59:41.089Z","etag":null,"topics":["apex","apex-test","apex-test-data-factory"],"latest_commit_sha":null,"homepage":"","language":"Apex","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/jongpie.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-18T18:14:12.000Z","updated_at":"2024-12-05T04:39:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"58c2dfe4-2e53-48ca-aa28-0e9a00e331b1","html_url":"https://github.com/jongpie/SmartTestDataFactory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jongpie/SmartTestDataFactory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongpie%2FSmartTestDataFactory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongpie%2FSmartTestDataFactory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongpie%2FSmartTestDataFactory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongpie%2FSmartTestDataFactory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jongpie","download_url":"https://codeload.github.com/jongpie/SmartTestDataFactory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jongpie%2FSmartTestDataFactory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29197666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T14:35:27.868Z","status":"ssl_error","status_checked_at":"2026-02-07T14:25:51.081Z","response_time":63,"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":["apex","apex-test","apex-test-data-factory"],"created_at":"2024-10-16T20:22:41.543Z","updated_at":"2026-02-07T15:03:45.793Z","avatar_url":"https://github.com/jongpie.png","language":"Apex","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Test Data Factory\r\n\u003cbr /\u003e\r\nAn Apex library for dynamically setting any required fields on an Sobject record, based on the field's metadata\r\n\u003cbr /\u003e\r\n\u003cbr /\u003e\r\n\u003ca href=\"https://githubsfdeploy.herokuapp.com\" target=\"_blank\"\u003e\r\n     \u003cimg alt=\"Deploy to Salesforce\" src=\"https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/deploy.png\"\u003e\r\n\u003c/a\u003e\r\n\r\n## Overview\r\nThis library simplifies the process of creating of test records in Salesforce. It can be leveraged in Apex unit tests to automatically set field values for any required field. This is useful when you need to insert records but the exact field values are not relevant to your tests.\r\n\r\n\u003e **Note**: Lookup \u0026 master-detail fields are **not** set by this library - you must set these fields yourself before you insert your record.\r\n\r\n## Usage\r\n1. **Create your Sobject** You can provide an empty record (`new Account()`), or you can set your own values for any field values that are important to your tests (`new Account(Type='Prospect')`).\r\n2. **Create a new instance of TestDataFactory by passing your record in the constructor** When you're ready, call populateRequiredFields() to set values for any null required fields.\r\n\r\n```\r\nAccount testAccount = new Account();\r\nnew TestDataFactory(testAccount).populateRequiredFields();\r\nSystem.assertNotEquals(null, testAccount.Name);\r\ninsert testAccount;\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongpie%2Fsmarttestdatafactory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjongpie%2Fsmarttestdatafactory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongpie%2Fsmarttestdatafactory/lists"}