Search

Saturday, 10 May 2014

Insert Related Test Data Quick and Easy

We all spend a lot of time making test data for our unit tests, especially when linking multiple objects together.
The function below shows you how you can create a json object, upload it as a StaticResource and then run the following code which will automatically create your test data, all objects linked together as expected.
Instead of it taking you hours making code to create test data this function will take less than 15 minutes and all you will need is around 3 lines of code to upload as much data as you like.
You can also use the same function to prime your sandboxes with specific data that it needs to operate correctly, or your training and test environments with data to fullfil the operations your users need to do.



There are a few additional changes I do want to make to the code, but overall the code works fine

Code will be uploaded soon

No comments:

Post a Comment

Note: only a member of this blog may post a comment.