Why my SOSL returning no data during testing?? I created sample data, I saw it in log.I swear but why it return no data? Why? Why? The hair drop one by one...the wrinkle become finer and finer.She stay quietly facing her laptop.She did not notice that her age is multiplying hastily.. . . . Stop all the drama, let see the point here.The possibility why SOSL not returning data during Apex Test Execution is because Salesforce designed it that way! WHAT!!! Yes, to ensure test class run in predictable way they decide to not return data when you use SOSL. To ensure that test methods always behave in a predictable way, any Salesforce Object Search Language (SOSL) query that is added to an Apex test method returns an empty set of search results when the test method executes. If you do not want the query to return an empty list of results, you can use the Test.setFixedSearchResults system method to define a list of record IDs that are returned by the search. - more info.