Salesforce Fact #100 | Sharing variable in test class
Suppose, we want to use a variable in all the test methods of a test class. So, we can define a static variable and use that in the test methods. But the point is, every testMethod begins with a new scope i.e. whatever changes made to the variable in the previous test method is not stored.
Attached is the screenshot.
Comments
Post a Comment