项目
在 GitHub 查看
benahm/TestDataFactory
关于
The ultimate Apex Test Data Factory 🏭
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Apex Test Data Factory

“ The ultimate Apex Test Data Factory ” :factory: :ok_hand:
Generate & insert an sObject with all the required fields & relationships auto-filled
Contact con = (Contact)TestDataFactory.createSObject('Contact');
Inserted data*:
Contact:{Id='0036E00000R4nG0QAJ', Lastname:'test0'}
Assign values to fields of the main sObject and the related sObjects
Contact con = (Contact)TestDataFactory.createSObject('Contact', new Map<String,Object>{
'Email' => '[email protected]',
'Account.Description' => 'Text for the Description field on the Account'
});
Inserted data*:
Contact:{Id='0036E00000R55chQAB', Lastname:'test0', Email:'[email protected]', AccountId='0016E00000Z6bC7QAJ'}
Account:{Id='0016E00000Z6bC7QAJ', Name='test0', Description='Text for the Description field on the Account'}
* in a non-customized org
Install :
Get the TestDataFactory class by installing the TestDataFactory Unlocked Package 🔓📦 in your org using the UI or by running the following sfdx command
sfdx force:package:install --wait 10 --publishwait 10 --package 04t1n000002WsK5AAK -r -u AliasOfYourOrg
More :
Releases 📦
License 🔰
Apache 2.0
探索相关项目
加载中…