I have two test methods and a static variable. I am setting the value of the variable in one test method and want to access this value in the second test method. Is this possible?? Is there any other solution to access it? Thanks in advance.
public static string oppId='';
static testMethod void testConvertToLoanApp() {
Test.startTest();
String e = PODetails_SF1ControllerClone.ConvertToLoanApp();
List<Opportunity> op = [SELECT id from Opportunity where Account.PANNumber__c =: 'AWEPT9807P' limit 1];
if(op.size() > 0){
oppId = op[0].id; //setting oppId here
}
static testMethod void testdomcpcheck(){
//oppId here is null always
Test.startTest();
PODetails_SF1ControllerClone.domcpcheck(oppId);
Test.stoptest();
}