18
Spring’16 Simon Lawrence Bristol Developer User Group

Spring’16 Developer Highlights

Embed Size (px)

Citation preview

Spring’16Simon Lawrence

Bristol Developer User Group

Time for some new tools!December 17th 2015

Started rolling out pre-releases previews

Including 396 page release notes

January 8th-9th 2016

Sandboxes upgrades

February 5th - February 13th 2016

Production instance upgrades

My Developer HighlightsSetCreatedDateTest Suites/SlayerGlobal PicklistsAPI Improvements

Set Created DatePreviously CreatedDate was a read only field

Caused problems when testing logic on the “age” of a record

All test records created within the same fraction of a second

111 votes on IdeasExchange

Set Created DateNow, you can set CreatedDate to be any date you like on a record

Insert the record, and then call:

Test.setCreatedDate(recordId, createdDatetime);

Set Created Date

Test SuitesCreate a suite of commonly run tests

From the Developer console Test > Suite Manager > Edit Suite

Up to 200 test classes

Test Suites

Test SlayerTell Salesforce to kill test runs that are failing miserably

Set a threshold in the Developer consoleThis is the number of tests that can fail before the test is halted

Enter -1 to disable this feature, or leave it blank

The range of values is 0 - 1,000,000

Remember to set it each time you run your tests

Test SlayerWhen starting a new Test Run - Click “Settings”

Global PicklistsReuse a single list of valuesManage recurring picklists in one placeKeep picklist data consistantRestrict ability to create values All users see all available options

Global Picklists

Global Picklists

Global Picklists

API EnhancementsFormatting for number, date, time, and currency fields in SELECT

clauses

Automatically and actually respect the user’s locale

Test.startTest() and Test.stopTest() now work!

API EnhancementsFormatting for number, date, time, and currency fields in SELECT

clauses

Automatically and actually respect the user’s locale

Test.startTest() and Test.stopTest() now work!

In Salesforce’s own words

“code enclosed by the Test.startTest() and Test.stopTest() methods now reliably receives its own block of governor limits”

Time for a quiz!

Thank you