You need to sign in to do that
Don't have an account?
Shanke_Paudel
Code Coverage
I can i associate a apex class with a apext test class?
My class
public class NewContact{
public void getopportunity(){
}
}
Test Class
@isTest
public class NewContactTest{
@isTest static void Testgetopportunity() {
}
}
in force.ide i do see none with Code coverage tab.
Regard's
Shanker Paudel
Test Class
@isTest
public class NewContactTest{
static void Testgetopportunity() {
//insert sample opp records here
NewContact nc=new NewContact();
test.starttest();
nc.getOpportunity();
test.stoptest();
}
}
Hi,
Test Class make private
@isTest
private class NewContactTest{
static void Testgetopportunity() {
test.starttest();
NewContact newcon=new NewContact();
newcon.getOpportunity();
test.stoptest();
}
}
Hi,
You can refer this link for test class
http://abhithetechknight.blogspot.in/2013/10/salesforce-test-class-basics.html
To check you code coverage after running test class, you'll see a button "Developer Console" click on that you can then see the code coverage
Hit kudos and Mark as a solution if this solution helper you
Hi,
You can refer this link for test class
http://abhithetechknight.blogspot.in/2013/10/salesforce-test-class-basics.html
To check you code coverage after running test class, you'll see a button "Developer Console" click on that you can then see the code coverage
Hit kudos and Mark as a solution if this solution helped you