
//My controller
public class FilterPopupController {
public String query {get; set;}
public List<Custom__c> vs {get; set;}
public PageReference runQuery(){
try{
List<List<Custom__c>> searchResults=[FIND :query IN ALL FIELDS RETURNING Custom__c (id, name)];
vs=searchResults[0];
return null;
}catch(Exception e) {
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Ops!!! '));
return null;
}
}
}
//My test class
@isTest
private class FilterPopupTest {
public static testMethod void FilterPopupTest() {
PageReference pageRef = Page.LookupPopup;
Test.setCurrentPage(pageRef);
Custom__c c = new Custom__c();
c.Name = 'Name';
insert v;
String query;
Id [] fixedSearchResults= new Id[1];
fixedSearchResults[0] = '001x0000003G89h';
Test.setFixedSearchResults(fixedSearchResults);
List<List<SObject>> searchList = [FIND 'test'
IN ALL FIELDS RETURNING Custom(id, name)];
}
}

You're not testing the class at all, rather just running the same query again. Since you're not testing the class, you won't have any code coverage for that class. Instead, you need to construct your class (by calling the class's constructor) and then running the runQuery method. See the example below:
Note, you'll have to cover edge cases as well, such as when exceptions are thrown or no results returned.//My test class
@isTest
private class FilterPopupTest {
public static testMethod void FilterPopupTest() {
PageReference pageRef = Page.LookupPopup;
Test.setCurrentPage(pageRef);
Custom__c c = new Custom__c();
c.Name = 'Name';
insert v;
Test.startTest();
FilterPopupController ctrl = new FilterPopupController();
//Set the query member variable...
ctrl.query = 'Name';
ctrl.runQuery();
Test.stopTest();
System.assertEquals(1,ctrl.vs.size());
System.assertEquals(1,ctrl.vs.get(0).size());
}
}