You need to sign in to do that
Don't have an account?
Rakesh Samal
How to write test class for soql query ??
This is my apex class: Anyone pls help. I am new to test classes
public class StudentMasterClass {
public static list<Student_Master__c> StudentMasterList {get;set;}
public StudentMasterClass()
{
StudentMasterList = [SELECT Name,Last_Name__c,Company__c,City__c,Phone__c FROM Student_Master__c];
}
}
public class StudentMasterClass {
public static list<Student_Master__c> StudentMasterList {get;set;}
public StudentMasterClass()
{
StudentMasterList = [SELECT Name,Last_Name__c,Company__c,City__c,Phone__c FROM Student_Master__c];
}
}
Try below code to cover the above class
If this information helps, please mark the answer as best. Thank you
I am written this one only. But after running the test it is showing nothing in apex class.
Do you mean the code coverage in the apex class? Which lines aren't being covered. Thanks
Look there is nothing
Can you logout,re- login and try to run test class and see if it fixes the issue?
Thank you
If you are still seeing the same behaviour, can you try "compile all classes".
Click path: Setup> Apex classes> Compile all classes link
Related: https://salesforce.stackexchange.com/questions/149949/compile-all-classes
If this information helps, please mark the answer as best. Thank you
Thanks for ur help. I already cleared that test class. There are many things which I wrote in those test class.