+ Start a Discussion
Manj_SFDCManj_SFDC 

I have a list of reusable Test Classes , can I create an unmanaged package

I have a list of reusable Test Classes , I need to share them(only Test classes) with others so that they can use them in their orgs can I create an unmanaged package and share it.
Please suggest
Best Answer chosen by Manj_SFDC
Om PrakashOm Prakash
Hi Manj,
You can add those test classes in unmanaged package but you need to make sure that test classes are not using any existing apex class in test methods.
(i.e , If test classes are only used for insert dummy data then you can add.)
By default all related classes are get added in package when you will add a test classes manually in package.

Let me know if any query
 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Yes you can
Manj_SFDCManj_SFDC
Thanks Amit and will the test coverage matter ?
Om PrakashOm Prakash
Hi Manj,
You can add those test classes in unmanaged package but you need to make sure that test classes are not using any existing apex class in test methods.
(i.e , If test classes are only used for insert dummy data then you can add.)
By default all related classes are get added in package when you will add a test classes manually in package.

Let me know if any query
 
This was selected as the best answer
Manj_SFDCManj_SFDC
Thanks Om Prakash
Amit Chaudhary 8Amit Chaudhary 8
If test class contain @Test then no need of code coverage. Else you need
Manj_SFDCManj_SFDC
Thanks Amit