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
devloper sfdcdevloper sfdc 

Problem in test class i am getting only 36% code coverage

Hi Salesforce Expert,

We are getting only 36% code coverage in our apex class. my Apex trigger  please help me apex code is here-


 
trigger EmailSendToOwnerUpdate on Case (before update) {
    // this is a list for storing email for settoAddress 
    List<String>toAddress =new List<String>();
    // this is a list for storing email for setccAddress 
    List<String>CCAddress =new List<String>();
    
    List<contact> lstcont=[select id ,Email,name,phone from contact];
    Map<String,String> mapContact=new Map<String,String>();
    list<String> ccAddresslst=new List<String>();
    map<string,String> mapuser=new map<string,string>();    
    
    String ownerName=''; 
    String baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
    
    //for getting user email and store in map where user id is key and email is value
    for(User u:[select id, name, Email from user]) 
    {
        mapuser.put(u.id,u.email);
    }
    
    //for getting Contact name  and store in map where  id is key and name is value
    for(contact con:lstcont)
    {
        mapContact.put(con.id,con.name);
    }
    
    
    
    for(case cs:trigger.new)
    {
        if(cs.total_attachments__c>=1)
        {
            case oldcase=Trigger.oldMap.get(cs.id);
            if(oldcase.OwnerId!=cs.OwnerId)
            {
                if(string.valueOf(cs.OwnerId).startsWith('005'))
                {
                    toAddress.add(mapuser.get(cs.OwnerId));  
                    ownerName=Getqueuemember.getOwnername(cs.OwnerId);
                }
                
                else{ 
                    CCAddress=Getqueuemember.getEmailfromuser(cs.OwnerId);
                    ownerName=Getqueuemember.getqueueOwnername(cs.OwnerId);
                }
                
                
                List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>();
                List<Attachment> attlist=[select Name, Body, BodyLength from Attachment where ParentId = :cs.id ];
                for (Attachment a :attlist){
                    
                    Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();
                    
                    efa.setFileName(a.Name);
                    efa.setBody(a.Body);
                    fileAttachments.add(efa);
                }
                
                
                String Subject='Apex template Ticket #'+cs.CaseNumber+' has been assigned to  '+' '+ownerName;
                
                
                
                try{
                    
                    EmailTemplate et = [SELECT Id,Subject, Body FROM EmailTemplate WHERE DeveloperName ='Sebastian_page'];
                    Messaging.SingleEmailMessage semail = new Messaging.SingleEmailMessage();
                    
                    
                    
                    semail.setSubject(Subject); 
                    semail.setSenderDisplayName('Salesforce Support'); 
                    semail.setTargetObjectId(cs.ContactId);
                    //semail.setTemplateId(et.id);
                    semail.setCcAddresses(CCAddress);
                    semail.setToAddresses(toAddress); 
                    
                    semail.setHtmlBody('***THIS IS A SYSTEM GENERATED MESSAGE! DO NOT REPLY!***<br/><br/>Please be advised that the following SalesForce ticket has been assigned to  '+ownerName+'<br/><br/> Ticket #:'+cs.CaseNumber+
                                       '<br/>Subject:'+cs.subject+'<br/><br/>Contact Name: '+mapContact.get(cs.Contactid)+'<br/>Contact Phone (primary): '+Getqueuemember.r(cs.ContactPhone)+'<br/>Contact Mobile (primary): '+Getqueuemember.r(cs.ContactMobile)+
                                       '<br/> Contact Email:'+Getqueuemember.r(cs.ContactEmail)+'<br/><br/>Category: '+Getqueuemember.r(cs.Ticket_Category__c)+Getqueuemember.r(cs.Service_Category__c)+Getqueuemember.r(cs.Ticket_Category2__c)+               
                                       '<br/>Type: '+Getqueuemember.r(cs.Ticket_Type__c)+Getqueuemember.r(cs.Service_Type__c)+Getqueuemember.r(cs.Ticket_Type2__c)+                           
                                       '<br/>Item: '+Getqueuemember.r(cs.Ticket_Item__c)+Getqueuemember.r(cs.Service_Item__c)+Getqueuemember.r(cs.Ticket_Item2__c)+                   
                                       '<br/>Ticket Source: '+Getqueuemember.r(cs.Case_Source__c)+'<br/><br/><br/>Building: '+Getqueuemember.r(cs.building__c)+'<br/>Room: '+Getqueuemember.r(cs.Room_Number__c)+'<br/>Area Description: '+Getqueuemember.r(cs.Area_description__c)+
                                       '<br/><br/><br/>Click the appropriate link below to view the ticket directly:<br/><br/>Partner Portal Users: <a href='+baseUrl+'/'+cs.id+'>'+baseUrl+'/'+cs.id+'</a><br/>BlackbeltHelp (Community Users): <a href='+Getqueuemember.getcommunityurl(cs.AccountId)+cs.id+
                                       '>'+Getqueuemember.getcommunityurl(cs.AccountId)+cs.id+'</a><br/><br/>Description:'+cs.Description+'<br/><br/>Internal Notes: '+Getqueuemember.r(cs.Internal_Notes__c)); 
                    semail.setFileAttachments(fileAttachments);     
                    semail.setWhatId(cs.id);
                    Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail}); 
                }
                catch(exception e)    
                {}
                
            }
        }
    }
}


And test class is 
 
@isTest
public class TestEmailSendToOwner {
    @isTest
    public Static void emailTest()
    {
       // create test account
        Account acc = TestUtilityController.getAccount('MassBay');
        insert acc;
        
        // create test contact
        Contact con = TestUtilityController.getContact('Test Last Name','testing@testing.com',acc.Id);
        insert con;
        
        // fill utility
        UtilityController.fillUtilities();
        UtilityController.isUtility = false;
        
        // Create test cases
        List<Case> listCase = new List<Case>();
        
        if(UtilityController.caseRecordType.containsKey('MassBayCC_Ticket')){
            String recordTypeId = UtilityController.caseRecordType.get('MassBayCC_Ticket').Id;   
                 
             
             Case csanew = TestUtilityController.getCase(recordTypeId,con.Id,acc.Id);
            csanew.status = 'Action - Automated Escalation';
            csanew.total_attachments__c=2;
            csanew.Ticket_Category2__c = 'Blackboard Learn - LMS';
            csanew.Ticket_Type2__c = 'Faculty/Staff';
            csanew.Ticket_Item2__c='Tutorial';
            listCase.add(csanew);
            
            insert listCase;
            Getqueuemember.getcommunityurl(acc.id);
            Getqueuemember.getEmailfromuser(listCase[0].ownerId);
            Getqueuemember.getOwnername(listCase[0].ownerId);
            Getqueuemember.r(csanew.Ticket_Category2__c);
        
    }

}
}

User-added image

code which is not covering is below here--
if(string.valueOf(cs.OwnerId).startsWith('005'))
                {
                    toAddress.add(mapuser.get(cs.OwnerId));  
                    ownerName=Getqueuemember.getOwnername(cs.OwnerId);
                }
                
                else{ 
                    CCAddress=Getqueuemember.getEmailfromuser(cs.OwnerId);
                    ownerName=Getqueuemember.getqueueOwnername(cs.OwnerId);
                }
                
                
                List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>();
                List<Attachment> attlist=[select Name, Body, BodyLength from Attachment where ParentId = :cs.id ];
                for (Attachment a :attlist){
                    
                    Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();
                    
                    efa.setFileName(a.Name);
                    efa.setBody(a.Body);
                    fileAttachments.add(efa);
                }
                
                
                String Subject='Apex template Ticket #'+cs.CaseNumber+' has been assigned to  '+' '+ownerName;
                
                
                
                try{
                    
                    EmailTemplate et = [SELECT Id,Subject, Body FROM EmailTemplate WHERE DeveloperName ='Sebastian_page'];
                    Messaging.SingleEmailMessage semail = new Messaging.SingleEmailMessage();
                    
                    
                    
                    semail.setSubject(Subject); 
                    semail.setSenderDisplayName('Salesforce Support'); 
                    semail.setTargetObjectId(cs.ContactId);
                    //semail.setTemplateId(et.id);
                    semail.setCcAddresses(CCAddress);
                    semail.setToAddresses(toAddress); 
                    
                    semail.setHtmlBody('***THIS IS A SYSTEM GENERATED MESSAGE! DO NOT REPLY!***<br/><br/>Please be advised that the following SalesForce ticket has been assigned to  '+ownerName+'<br/><br/> Ticket #:'+cs.CaseNumber+
                                       '<br/>Subject:'+cs.subject+'<br/><br/>Contact Name: '+mapContact.get(cs.Contactid)+'<br/>Contact Phone (primary): '+Getqueuemember.r(cs.ContactPhone)+'<br/>Contact Mobile (primary): '+Getqueuemember.r(cs.ContactMobile)+
                                       '<br/> Contact Email:'+Getqueuemember.r(cs.ContactEmail)+'<br/><br/>Category: '+Getqueuemember.r(cs.Ticket_Category__c)+Getqueuemember.r(cs.Service_Category__c)+Getqueuemember.r(cs.Ticket_Category2__c)+			   
                                       '<br/>Type: '+Getqueuemember.r(cs.Ticket_Type__c)+Getqueuemember.r(cs.Service_Type__c)+Getqueuemember.r(cs.Ticket_Type2__c)+						   
                                       '<br/>Item: '+Getqueuemember.r(cs.Ticket_Item__c)+Getqueuemember.r(cs.Service_Item__c)+Getqueuemember.r(cs.Ticket_Item2__c)+				   
                                       '<br/>Ticket Source: '+Getqueuemember.r(cs.Case_Source__c)+'<br/><br/><br/>Building: '+Getqueuemember.r(cs.building__c)+'<br/>Room: '+Getqueuemember.r(cs.Room_Number__c)+'<br/>Area Description: '+Getqueuemember.r(cs.Area_description__c)+
                                       '<br/><br/><br/>Click the appropriate link below to view the ticket directly:<br/><br/>Partner Portal Users: <a href='+baseUrl+'/'+cs.id+'>'+baseUrl+'/'+cs.id+'</a><br/>BlackbeltHelp (Community Users): <a href='+Getqueuemember.getcommunityurl(cs.AccountId)+cs.id+
                                       '>'+Getqueuemember.getcommunityurl(cs.AccountId)+cs.id+'</a><br/><br/>Description:'+cs.Description+'<br/><br/>Internal Notes: '+Getqueuemember.r(cs.Internal_Notes__c)); 
                    semail.setFileAttachments(fileAttachments);     
                    semail.setWhatId(cs.id);
                    Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail}); 
                }
                catch(exception e)	
                {}
                
            }
        }
    }
}

 
devloper sfdcdevloper sfdc
The object prefix is correct i am evaluating for user object which is start with 005 . this is case ownerId not is case id .
Christan G 4Christan G 4
Hi Developer, I noticed that you did use the correct prefix key after reviewing your code more thoroughly. I deleted my comment ahead of time but I guess you were able to see it lol. After reviewing it again, I think the if statement above all of this code is resulting to false which is why it is being ignored when testing. I am unable to see what that if statement condition is since it is cut off at the top but I think that is where your issue lies. Once that if statement evaluates to true, the rest of the code should execute and not be ignored.
Christan G 4Christan G 4
In the first comment, I was only viewing the pic. Now that I am able to see the full post on my computer, I can see the code you inputted. This line is resulting to false which is causing the rest of the code to be ignored and not tested: Line 34: if(oldcase.OwnerId!=cs.OwnerI) - Due to it being false, it seems the Owner is the same between for both the new and old record.
devloper sfdcdevloper sfdc
Please suggest me how cover 100% code covering of my apex trigger please guide me .
Christan G 4Christan G 4
Well first, is it required for the owner of the old record to not be the same as the owner of the new record? If not, you can simply change the operator within that line of code to == and run the test class again. The result of the code should execute unless another if statement afterwards results to false. If you do make this change, tell me your results afterwards.
Christan G 4Christan G 4
If it is required, I have a few other ways you can achieve 100% after reviewing your code further.
devloper sfdcdevloper sfdc
yes it is required please tell me how to achieve 100% code coverage .
Christan G 4Christan G 4
Okay for this situation, I would copy and paste the entire code in your Apex Trigger (Lines 02 to Line 95) into an Apex Class and make it be a method. I suggest calling the Apex Class: CaseTriggerHelper so that it is easy to identify. In this class, create a public static void method called emailSender or whatever you prefer. In its parameters though state (List <Case> newCases, Map <ID,Case> oldCaseMap). For more info, please view the changes I have made below. Note I didn't get a chance to test this code so there may be a missing parathesis somewhere. Apology in advance.

Apex Class:
public class CaseTriggerHelper  {

public static void emailSender(List <Case> updtCases, Map <ID,Case> oldCasesMap) {
    // this is a list for storing email for settoAddress 
    List<String>toAddress =new List<String>();
    // this is a list for storing email for setccAddress 
    List<String>CCAddress =new List<String>();
    
    List<contact> lstcont=[select id ,Email,name,phone from contact];
    Map<String,String> mapContact=new Map<String,String>();
    list<String> ccAddresslst=new List<String>();
    map<string,String> mapuser=new map<string,string>();    
    
    String ownerName=''; 
    String baseUrl = URL.getSalesforceBaseUrl().toExternalForm();
    
    //for getting user email and store in map where user id is key and email is value
    for(User u:[select id, name, Email from user]) 
    {
        mapuser.put(u.id,u.email);
    }
    
    //for getting Contact name  and store in map where  id is key and name is value
    for(contact con:lstcont)
    {
        mapContact.put(con.id,con.name);
    }
    
    
    //Change Trigger.new with udtCases
    for(case cs:updtCases)
    {
        if(cs.total_attachments__c>=1)
        {
            //Changed Trigger.oldMap with oldCasesMap
            case oldcase=oldCasesMap.get(cs.id);
            if(oldcase.OwnerId!=cs.OwnerId)
            {
                if(string.valueOf(cs.OwnerId).startsWith('005'))
                {
                    toAddress.add(mapuser.get(cs.OwnerId));  
                    ownerName=Getqueuemember.getOwnername(cs.OwnerId);
                }
                
                else{ 
                    CCAddress=Getqueuemember.getEmailfromuser(cs.OwnerId);
                    ownerName=Getqueuemember.getqueueOwnername(cs.OwnerId);
                }
                
                
                List<Messaging.Emailfileattachment> fileAttachments = new List<Messaging.Emailfileattachment>();
                List<Attachment> attlist=[select Name, Body, BodyLength from Attachment where ParentId = :cs.id ];
                for (Attachment a :attlist){
                    
                    Messaging.Emailfileattachment efa = new Messaging.Emailfileattachment();
                    
                    efa.setFileName(a.Name);
                    efa.setBody(a.Body);
                    fileAttachments.add(efa);
                }
                
                
                String Subject='Apex template Ticket #'+cs.CaseNumber+' has been assigned to  '+' '+ownerName;
                
                
                
                try{
                    
                    EmailTemplate et = [SELECT Id,Subject, Body FROM EmailTemplate WHERE DeveloperName ='Sebastian_page'];
                    Messaging.SingleEmailMessage semail = new Messaging.SingleEmailMessage();
                    
                    
                    
                    semail.setSubject(Subject); 
                    semail.setSenderDisplayName('Salesforce Support'); 
                    semail.setTargetObjectId(cs.ContactId);
                    //semail.setTemplateId(et.id);
                    semail.setCcAddresses(CCAddress);
                    semail.setToAddresses(toAddress); 
                    
                    semail.setHtmlBody('***THIS IS A SYSTEM GENERATED MESSAGE! DO NOT REPLY!***<br/><br/>Please be advised that the following SalesForce ticket has been assigned to  '+ownerName+'<br/><br/> Ticket #:'+cs.CaseNumber+
                                       '<br/>Subject:'+cs.subject+'<br/><br/>Contact Name: '+mapContact.get(cs.Contactid)+'<br/>Contact Phone (primary): '+Getqueuemember.r(cs.ContactPhone)+'<br/>Contact Mobile (primary): '+Getqueuemember.r(cs.ContactMobile)+
                                       '<br/> Contact Email:'+Getqueuemember.r(cs.ContactEmail)+'<br/><br/>Category: '+Getqueuemember.r(cs.Ticket_Category__c)+Getqueuemember.r(cs.Service_Category__c)+Getqueuemember.r(cs.Ticket_Category2__c)+               
                                       '<br/>Type: '+Getqueuemember.r(cs.Ticket_Type__c)+Getqueuemember.r(cs.Service_Type__c)+Getqueuemember.r(cs.Ticket_Type2__c)+                           
                                       '<br/>Item: '+Getqueuemember.r(cs.Ticket_Item__c)+Getqueuemember.r(cs.Service_Item__c)+Getqueuemember.r(cs.Ticket_Item2__c)+                   
                                       '<br/>Ticket Source: '+Getqueuemember.r(cs.Case_Source__c)+'<br/><br/><br/>Building: '+Getqueuemember.r(cs.building__c)+'<br/>Room: '+Getqueuemember.r(cs.Room_Number__c)+'<br/>Area Description: '+Getqueuemember.r(cs.Area_description__c)+
                                       '<br/><br/><br/>Click the appropriate link below to view the ticket directly:<br/><br/>Partner Portal Users: <a href='+baseUrl+'/'+cs.id+'>'+baseUrl+'/'+cs.id+'</a><br/>BlackbeltHelp (Community Users): <a href='+Getqueuemember.getcommunityurl(cs.AccountId)+cs.id+
                                       '>'+Getqueuemember.getcommunityurl(cs.AccountId)+cs.id+'</a><br/><br/>Description:'+cs.Description+'<br/><br/>Internal Notes: '+Getqueuemember.r(cs.Internal_Notes__c)); 
                    semail.setFileAttachments(fileAttachments);     
                    semail.setWhatId(cs.id);
                    Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail}); 
                }
                catch(exception e)    
                {}
                
            }
        }
    }
}

Apex Trigger:
trigger EmailSendToOwnerUpdate on Case (before update) {

CaseTriggerHelper.emailSender(Trigger.new,Trigger.oldMap);

}

Apex Test Class:
@isTest
public class TestEmailSendToOwner {
    @isTest
    public Static void emailTest()
    {
       // create test account
        Account acc = TestUtilityController.getAccount('MassBay');
        insert acc;
        
        // create test contact
        Contact con = TestUtilityController.getContact('Test Last Name','testing@testing.com',acc.Id);
        insert con;
        
        // fill utility
        UtilityController.fillUtilities();
        UtilityController.isUtility = false;
        
        // Create test cases
        List<Case> listCase = new List<Case>();
        
        if(UtilityController.caseRecordType.containsKey('MassBayCC_Ticket')){
            String recordTypeId = UtilityController.caseRecordType.get('MassBayCC_Ticket').Id;   
                 
             
             Case csanew = TestUtilityController.getCase(recordTypeId,con.Id,acc.Id);
            csanew.status = 'Action - Automated Escalation';
            csanew.total_attachments__c=2;
            csanew.Ticket_Category2__c = 'Blackboard Learn - LMS';
            csanew.Ticket_Type2__c = 'Faculty/Staff';
            csanew.Ticket_Item2__c='Tutorial';
            listCase.add(csanew);
            
//Added additional code here
System.test.startTest();

            insert listCase;

             List <Case> csList1 = [SELECT ID, Name, Owner FROM Cases]; //Will hold original records

             Map<Id,Case> csMap = new Mad <Id, Case>(csList1);

             List <Cases> updtCases = new List <Case>();

             for (Case oneCase : csList1) {

             //Input a user ID of someone other than yourself
             oneCase.Owner = '';
            updtCases.add(oneCase);

}
         
            update updtCases;

             List <Case> csList2 = [SELECT ID,Name, Owner,  FROM Cases]; //Will hold updated records

CaseTriggerHelper.emailSender(csList2, csMap);

System.Test.stopTest();



            Getqueuemember.getcommunityurl(acc.id);
            Getqueuemember.getEmailfromuser(listCase[0].ownerId);
            Getqueuemember.getOwnername(listCase[0].ownerId);
            Getqueuemember.r(csanew.Ticket_Category2__c);
        
    }

}
}

 
devloper sfdcdevloper sfdc
Hi Christan,

Thanks for help but we haven't got sucess in code coverage . Still we got 36% code coverage after changing apex code  acodring  you.
Christan G 4Christan G 4
Hmm very interesting. Are the same lines of code that you mentioned before still in red?

In the additional test code I gave yesterday, I noticed that there were some errors. For example, I mentioned Owner instead of OwnerID which I fixed in the code below. I also noticed some other discrepancies which I fixed below. Another thing I also noticed is we didn't create any test attachments for the test cases we created. I know it was stated that the total attachments equals 2 but when your code run the SOQL: List<Attachment> attlist=[select Name, Body, BodyLength from Attachment where ParentId = :cs.id ]; I believe it will return a null result. Definitely something we have to test. With that being said, with the fixes to the code I made below, can you tell me if the changes I made increased the test code percentage? It may not be 100% yet but I just want to ensure that we are in the right direction with these changes since there a lot of moving parts to it. Sorry again for the error and typos earlier.

Apex Test Class (Corrected):
@isTest
public class TestEmailSendToOwner {
    @isTest
    public Static void emailTest()
    {

       //Created test users
       List <User> usrTestList = new List <User>();

       for (Integer i = 0; i < 2; i++) {
            
       //Created 2 test users just to ensure that OwnerID is different between Cases
        usrTestList.add(new User(LastName = 'LastName Test'+ i,
                                  Alias = 'Usr'+i,
                                  Email = 'Classtestuser'+ i +'@curious-fox.com',
                                  Username = 'Classtestuser' + i +'@test.com',
                                  CommunityNickname = 'ClassTestUser'+ i,
                                  ProfileId = [SELECT Id from Profile WHERE Name = 'Standard User' LIMIT 1].id,
                                  FirstName = 'Test',
                                  DateOfUser__c = '2/03/2020',
                                  TimeZoneSidKey = 'America/Los_Angeles', 
                                  LocaleSidKey = 'en_US',
                                  EmailEncodingKey = 'UTF-8', 
                                  LanguageLocaleKey = 'en_US'));    
            
        }

        insert usrTestList;

       // create test account
        Account acc = TestUtilityController.getAccount('MassBay');
        insert acc;
        
        // create test contact
        Contact con = TestUtilityController.getContact('Test Last Name','testing@testing.com',acc.Id);
        insert con;
        
        // fill utility
        UtilityController.fillUtilities();
        UtilityController.isUtility = false;
        
        // Create test cases
        List<Case> listCase = new List<Case>();
        
        if(UtilityController.caseRecordType.containsKey('MassBayCC_Ticket')){
            String recordTypeId = UtilityController.caseRecordType.get('MassBayCC_Ticket').Id;   
                 
             
            Case csanew = TestUtilityController.getCase(recordTypeId,con.Id,acc.Id);
           
            //Explicitly set the Owner ID for the Case
            csanew.OwnerID = usrTestList[0].id;
            csanew.status = 'Action - Automated Escalation';
            csanew.total_attachments__c=2;
            csanew.Ticket_Category2__c = 'Blackboard Learn - LMS';
            csanew.Ticket_Type2__c = 'Faculty/Staff';
            csanew.Ticket_Item2__c='Tutorial';
            listCase.add(csanew);
            
//Added additional code here
System.test.startTest();

            insert listCase;
 
             //Fixed Typo: Replaced 'Mad' with 'Map'
             Map<Id,Case> csMap = new Map <Id, Case>(listCase);

             List <Cases> updtCases = new List <Case>();

             for (Case oneCase : listCase) {

            
             oneCase.OwnerID = usrTestList[1].id;
             updtCases.add(oneCase);

}
         
            update updtCases;

CaseTriggerHelper.emailSender(updtCases, csMap);

System.Test.stopTest();



            Getqueuemember.getcommunityurl(acc.id);
            Getqueuemember.getEmailfromuser(listCase[0].ownerId);
            Getqueuemember.getOwnername(listCase[0].ownerId);
            Getqueuemember.r(csanew.Ticket_Category2__c);
        
    }

}
}

 
Sebastian PageSebastian Page
Hi Christan,

After some changes in your code we are got 86% code coverage . Thanks a lot Christan
Christan G 4Christan G 4
Awesome! I am happy we are making progress. Are you still striving to get 100% or is 86% sufficient for you? If you are still striving to get 100%, can you please provide a screenshot of all lines of code that weren't tested. Thanks in advance!