You need to sign in to do that
Don't have an account?

Testing Already Started ....?
@isTest
public class govenerLimit {
public static testMethod void main(){
for(integer i =0 ; i<101 ; i++){
test.startTest();
list<student__c> sts = [select name from student__c];
test.stopTest();
}
}
}
//----------- above code execute Successfully .
@isTest
public class govenerLimit
public static testMethod void main(){
for(integer i =0 ; i<101 ; i++){
test.startTest();
list<student__c> sts = [select name from student__c];
test.stopTest();
}
test.startTest();
list<faculty__c> facs = [select name from faculty__c];
test.stopTest();
}
} // -------- But this code gives msg-------- "Testing Already Started" --------- why ?
https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_test.htm#apex_System_Test_startTest
you have to create two test methods instead of one. also I am not sure why you want to call the test.startTest() inside for loop