It’s always such a satisfying feeling to reach 100% code coverage on every trigger and class in my developer sandbox. I think I’ll sit back for a few minutes and relish this moment, because it’s sure to change by this afternoon.
Spending my Saturday morning reading more about force.com sandboxes, and even though I work with them every day, I’m picking up some cool ideas — like creating inactive users in the production org, and activating them in a sandbox to do development work. That way I’ll know who did what.
Try as I might, I just can’t get myself to stay away from TextMate in favor of BBEdit. TextMate is like a long, lost friend every time I come back, and my productivity jumps incredibly. Using BBEdit, I feel slow and clumsy in just about everything I do.
I considered doing a “2012 in review” post, but the fact of the matter is, there wasn’t much to review. I only made 7 posts in 2012, 4 of which were quick link-back one-liners. So that leaves just 3 real posts made in the past year. Pathetic…
Okay, I admit it. I’ve pilfered someone else’s code for a Salesforce project. It works flawlessly, but since I don’t totally understand what the code is doing, I’m having a hard time writing a test case for code coverage. Let this be a lesson (mostly for me) to not pilfer unless you completely understand the code.
Using TSQL to select random rows for a test data set in existing production data, I use the following:
SELECT TOP 100 * FROM db.dbo.table WHERE something = 'something' ORDER BY NEWID()
ORDER BY NEWID() selects random values each time. I use this to pull Account & Contact information out of a Salesforce.com production org to load into a developer sandbox to have test data.