function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
FuguSailorFuguSailor 

SOSL testing

I'd like to test SOSL to get familiar with what I can do with it but when I put a query in the developer console, it doesn't seem to pass the parsing rules. How do I test SOSL queries before I build them in my Apex code?

Best Answer chosen by Admin (Salesforce Developers) 
Cory CowgillCory Cowgill

You can build Unit Tests to test SOSL.

 

Here is a blog post I did about it a while back.

 

http://corycowgill.blogspot.com/2012/01/executing-sosl-in-unit-tests.html

All Answers

Cory CowgillCory Cowgill

You can build Unit Tests to test SOSL.

 

Here is a blog post I did about it a while back.

 

http://corycowgill.blogspot.com/2012/01/executing-sosl-in-unit-tests.html

This was selected as the best answer
FuguSailorFuguSailor

That seems rather painful. I have to set up logging, imbed a bunch of debug statements then review the log. It would be nice if the query editor in the developer console cound support SOSL. It sure would improve things and speed development.