function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
duke1duke1 

XMLDom and StartHere Test Coverage -- previous postings unclear

I have achieved 100% testing on my classes and trigger, but 0% for the system provided classes XMLDom and StartHere.  I have seen some ambiguous posts about this, but have not found source code I can download to simply test these classes.  Is there a simple solution to this issue.  This problem must come up for everyone who goes to deploy their first application; it seems logical for SalesForce to provide the test code if the classes are automatically included, so everyone doesn't have to solve the same problem over and over again.  Thanks for your help.

Best Answer chosen by Admin (Salesforce Developers) 
nnewbold-sfdcnnewbold-sfdc

Delete the start here page and the controller.  Issue should be resolved.

 

Those classes are just provided to get you started.  They do not provide core functionality.  You won't be corrupting ("screw up") your org by deleting them.

All Answers

nnewbold-sfdcnnewbold-sfdc

You can just delete them if you're not using them.  There's a new XML library built into Apex now, so there's no real need for that class.  The start here class is just for the splash page when you first login to the org.

duke1duke1

OK, I deleted XMLDom, but it won't allow me to delete StartHereController because it is used by Visualforce Page. Now I get an error when I run all tests because XMLDom is deleted!  What's the complete solution?  Thanks.

nnewbold-sfdcnnewbold-sfdc

For the StartHereController, you need to also delete the related page because it has a dependency.  What's the error from runAllTests?

duke1duke1

The error on run all tests is:

 

line -1, column -1: Previous load of class failed: startHereController: line 15, column 5: Invalid type: xmldom

 

Obviously, now it can't find xmldom because I deleted it.

 

If I now try to delete StartHereController, I get this message:

 

This apex class is referenced elsewhere in salesforce.com.
Visualforce Page

 

I don't want to screw up my whole installation of SalesForce.

nnewbold-sfdcnnewbold-sfdc

Delete the start here page and the controller.  Issue should be resolved.

 

Those classes are just provided to get you started.  They do not provide core functionality.  You won't be corrupting ("screw up") your org by deleting them.

This was selected as the best answer
duke1duke1

I managed to delete those pages and now it works fine.  Thanks for your help.