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
Chinmay BhusariChinmay Bhusari 

Does creating different testmerhods evaluates each method as different test?

What is the efficient way to create poistive and negative tests? How to create dummy data in seperate class without the need of testing the dummy data class? 
Best Answer chosen by Chinmay Bhusari
bob_buzzardbob_buzzard
I doubt the physical size of the class would have any discernable effect on deployment.  The volume of tests would, as all tests are run when you deploy to production.  Lots of tests is a usually a good thing though, as it makes your code more robust.

All Answers

bob_buzzardbob_buzzard
You can create dummy data in a public test class, as described at:

https://developer.salesforce.com/releases/release/Winter12/Public+Test+Classes+in+Apex

Each testmethod equates to a single test in the numbers output by the Salesforce testing framework.  Its always best to create multiple test methods rather than a single monolithic test, as that way you exclude side effects from code executed earlier.
Chinmay BhusariChinmay Bhusari
Hi bob_buzzard,

Is there any ideal size for test classes and does having a larger size have side effects when deploying??
bob_buzzardbob_buzzard
I doubt the physical size of the class would have any discernable effect on deployment.  The volume of tests would, as all tests are run when you deploy to production.  Lots of tests is a usually a good thing though, as it makes your code more robust.
This was selected as the best answer
Chinmay BhusariChinmay Bhusari
Hi bob_buzzard,

Thanks for solving the query.

Regards,
Chinmay Bhusari