0

I have a test class for a trigger on a new custom object (Sample) that covers nearly 50% of the trigger in Sandbox, and is nearly identical to another trigger for a different (older) custom object (Project), which I am able to validate with >0% coverage. My Sample trigger throws a "0% coverage" error during validation/deployment, however the debug logs in production imply the trigger is being called as expected from the test class... I have no idea how to debug this, because the logs suggest this error shouldn't even be occurring. The code is long but straightforward, and the Project trigger is essentially the same thing (posting the object info to an external database). Any suggestions/help would be greatly appreciated!! Thanks in advance!

Trigger (removed update block to meet character limits...):

{trigger PasmaSampleToLims on Sample__c (after insert, after update) {

    if (!PasmaUtils.inFutureContext) {

        String sampleName           = ''; 
        String projectSfdcId        = ''; 
        String projectLimsId = '';
        String projectOrganism = '';
        String projectManager       = ''; 
        String projectSfdcLink      = '';
        String sampleId = '';
        String SFDC_Link            = ''; 

        datetime dt                 = system.date.today();
        String dateSubmitted        = ''; 
        String containerTypeName    = ''; 
        String containerTypeId      = ''; 
        String wellValue            = ''; 
        String sampleType           = ''; 
        String hmwDnaExtraction = '';
        String additionalSampleDetails = '';
        String customerSampleName = ''; 
        String customerSampleId     = ''; 
        Double shotgunLibraries     = 0; 
        String shotgunSeqPlatform = ''; 
        Double shotgunSeqQtyLanes  = 0; 
        Double chicagoLibraries  = 0;  
        String chicagoSeqPlatform =''; 
        Double chicagoSeqQtyLanes = 0; 
        Double hiCLibraries = 0;
        String hiCSeqPlatform   = ''; 
        Double hiCSeqQtyLanes   = 0;  
        Double shotgunLongLibraries = 0;
        String shotgunLongSeqPlatform = '';
        Double shotgunLongSeqQtyLanes = 0;
        String assemblies = '';
        Boolean pacBioLibrarySequencing = false;

        // Not available in LIMS-test yet.
        // 10X Genomics Library & Seq.
        Boolean x10xLibrarySequencing = false;
        // Selva Libraries.
        Double selvaLibraries   = 0;
        String selvaSeqPlatform = '';
        Double selvaSeqQtyLanes = 0;

        if (Trigger.isInsert) {
            System.debug('Inside the Sample Trigger');

            Map<Id, Sample__c> mpSmp = new Map<Id, Sample__c>(
            [SELECT Project__c, Project__r.LIMS_ID__c FROM Sample__c WHERE Id IN :Trigger.New]);

            for(Sample__c smp : Trigger.New){

                projectSfdcId = smp.Project__c;
                projectLimsId = mpSmp.get(smp.Id).Project__r.LIMS_ID__c;

                Project__c prj = [SELECT LIMS_ID__c, Project__c.Organism__c, Project__c.Project_Manager__c FROM Project__c WHERE Id = :projectSfdcId];
                projectOrganism = prj.Organism__c;
                projectManager = prj.Project_Manager__c;

                SFDC_Link = URL.getSalesforceBaseUrl().toExternalForm();
                sampleId = smp.Id;

                sampleName = smp.Name;
                sampleType = smp.Type__c;               
                hmwDnaExtraction = smp.HMW_DNA_Extraction__c;
                additionalSampleDetails = smp.Additional_Sample_Details__c;

                containerTypeName = smp.Container__c;
                containerTypeId = PasmaPushSample.findWellValue(containerTypeName)[0];
                wellValue = PasmaPushSample.findWellValue(containerTypeName)[1]; 

                if (smp.Date_Submitted__c  != null){
                     dt = smp.Date_Submitted__c;
                }

                String year = string.valueOf(dt.year()); 
                String month = string.valueOf(dt.month()); 
                if(month.length()==1){
                    month = '0' + month;
                }
                String day = string.valueOf(dt.day());
                if(day.length()==1){
                    day = '0' + day;
                }
                dateSubmitted = year + '-' + month + '-' + day;
                customerSampleName = smp.Customer_Sample_Name__c;
                customerSampleId = smp.Customer_Sample_ID__c;

                if (smp.Shotgun_Libraries__c == null) {
                    shotgunLibraries = 0;
                    shotgunSeqPlatform = '';
                    shotgunSeqQtyLanes = 0;
                }
                else {
                    shotgunLibraries = smp.Shotgun_Libraries__c;
                    shotgunSeqPlatform = smp.Shotgun_Seq_Platform__c;
                    shotgunSeqQtyLanes = smp.Shotgun_Seq_Qty_lanes__c;
                }

                if (smp.Chicago_Libraries__c == null) {
                    chicagoLibraries = 0;
                    chicagoSeqPlatform = '';
                    chicagoSeqQtyLanes = 0;
                }
                else {
                    chicagoLibraries = smp.Chicago_Libraries__c;
                    chicagoSeqPlatform = smp.Chicago_Seq_Platform__c;
                    chicagoSeqQtyLanes = smp.Chicago_Seq_Qty_lanes__c;
                }

                if (smp.HiC_Libraries__c == null) {
                    hiCLibraries = 0;
                    hiCSeqPlatform = '';
                    hiCSeqQtyLanes = 0;
                }
                else {
                    hiCLibraries = smp.HiC_Libraries__c;
                    hiCSeqPlatform = smp.HiC_Seq_Platform__c;
                    hiCSeqQtyLanes = smp.HiC_Seq_Qty_lanes__c;
                }

                if (smp.Shotgun_long_Libraries__c == null) {
                    shotgunLongLibraries  = 0;
                    shotgunLongSeqPlatform = '';
                    shotgunLongSeqQtyLanes = 0;
                }
                else {
                    shotgunLongLibraries  = smp.Shotgun_long_Libraries__c;
                    shotgunLongSeqPlatform = smp.Shotgun_long_Seq_Platform__c;
                    shotgunLongSeqQtyLanes = smp.Shotgun_long_Seq_Qty_lanes__c;
                }

                assemblies = smp.Assemblies__c;
                System.debug('assemblies = ' + assemblies);

                                System.debug('smp.pacBio_Library_Sequencing = ' + smp.PacBio_Library_Sequencing__c);
                pacBioLibrarySequencing = smp.PacBio_Library_Sequencing__c;

                x10xLibrarySequencing = smp.X10X_Library_and_Sequencing__c;
                if (smp.Selva_Libraries__c == null) {
                    selvaLibraries = 0;
                    selvaSeqPlatform = '';
                    selvaSeqQtyLanes = 0;
                }
                else {
                    selvaLibraries = smp.Selva_Libraries__c;
                    selvaSeqPlatform = smp.Selva_Seq_Platform__c;
                    selvaSeqQtyLanes = smp.Selva_Seq_Qty_lanes__c;
                }

            }

            PasmaPushSample.post(containerTypeId, containerTypeName, sampleName, projectLimsId, wellValue, dateSubmitted, 
                                   projectManager, sampleType, projectOrganism, hmwDnaExtraction, additionalSampleDetails, 
                                   customerSampleName, customerSampleId, shotgunLibraries, shotgunSeqPlatform, shotgunSeqQtyLanes,
                                   chicagoLibraries, chicagoSeqPlatform, chicagoSeqQtyLanes, hiCLibraries, hiCSeqPlatform, 
                                   hiCSeqQtyLanes, shotgunLongLibraries, shotgunLongSeqPlatform, shotgunLongSeqQtyLanes,
                                   selvaLibraries, selvaSeqPlatform, selvaSeqQtyLanes, assemblies, pacBioLibrarySequencing, x10xLibrarySequencing, sampleId);
            System.debug('Exiting the Sample trigger'); 
        }

    }
}
}

Test class (create new records for each object instead of hard-coding Id's):

{ @isTest (seeAllData=false)
public class PasmaSampleToLimsTest {

    public static List<Sample__c> sampleList;

    public static String sampleType;
    public static String containerTypeId;
    public static String sampleName;
    public static String hmwDnaExtraction;

    static void init() {
        sampleList = new List<Sample__c>();

        Account acc = new Account(Name = 'This is a new SAMPLE test account', Type = 'Academic', Region__c = 'Asia');
        insert acc;

        Contact con = new Contact(LastName = 'aelyman', Account = acc, Email = '[email protected]', LeadSource = 'Other', MailingStreet = '123 abc', MailingCity = 'smalltown', MailingPostalCode = '95060');
        insert con;

        RecordType[] rt = [SELECT r.Id, r.SobjectType, r.Name FROM RecordType r WHERE sobjecttype='Opportunity' and Name = 'Services'];
        Opportunity opp = new Opportunity(Name = 'TestOpp2', Contact__c = con.Id, Account = acc, Organism__c = 'Homo sapiens', Service_Project_Type__c = 'Assembly', LeadSource = 'Other', CloseDate = date.today(), StageName = 'Qualification', RecordTypeId = rt[0].Id);
        insert opp;

        Project__c project = new Project__c(Name = 'TestProj2', Opportunity__c = opp.Id, Sample_Type__c = 'Plant', Organism__c = 'Garnoderma', Scientific_Name__c = 'Garnoderma', Genome_Size_Mbp__c = 1000, Sequencing_Facility__c = 'External', Heterozygosity__c = 'Unknown', Repeat_Content__c = 'Unknown', Polyploid__c = 'No', Sex_Chromosome_Interest__c = 'No');
        insert project;

        System.debug('PasmaSampleToLimsTest: PROJECT inserted');

        sampleType = 'Tissue';
        containerTypeId = 'Tube';
        sampleName = 'TestSample';
        hmwDnaExtraction = 'Other';

        Sample__c sample = new Sample__c(Name = sampleName, Project__c = project.Id, Type__c = sampleType, Container__c = containerTypeId, HMW_DNA_Extraction__c = hmwDnaExtraction);
        sampleList.add(sample);

        System.debug(sampleList);        

        System.Test.setMock(HttpCalloutMock.class, new PasmaPushSampleMock());

    }


    static testMethod void testPasmaSampleToLims() {
        init();
        System.Test.startTest();
        insert sampleList;
        /*
        if (sampleList.size() > 0){
            try {
                insert sampleList;
                System.debug('Number of samples inserted: ' + sampleList.size());
                System.debug('PasmaSampleToLimsTest: SAMPLE inserted');
            }

            catch(exception e) {
                System.debug('SampleList NOT inserted: ' + e);
            }
        }
*/
        if (sampleList.size() > 0) {
            update sampleList;
            System.debug('PasmaSampleToLimsTest: SAMPLE updated');
        }

        System.Test.stopTest();
    }

}
}

Relevant debug logs in production after validation change set (I removed the heap_allocate and statement_execute lines and bolded debug & other helpful lines):

15:03:32.795 (17818789194)|CODE_UNIT_FINISHED|Workflow:Opportunity
15:03:32.795 (17822048296)|DML_END|[25]
15:03:32.795 (17822147327)|USER_DEBUG|[27]|DEBUG|PasmaSampleToLimsTest: PROJECT inserted
15:03:32.795 (17822195299)|VARIABLE_ASSIGNMENT|[29]|PasmaSampleToLimsTest.sampleType|"Tissue"
15:03:32.795 (17822213707)|VARIABLE_ASSIGNMENT|[30]|PasmaSampleToLimsTest.containerTypeId|"Tube"
15:03:32.795 (17822227874)|VARIABLE_ASSIGNMENT|[31]|PasmaSampleToLimsTest.sampleName|"TestSample"
15:03:32.795 (17822239941)|VARIABLE_ASSIGNMENT|[32]|PasmaSampleToLimsTest.hmwDnaExtraction|"Other"
15:03:32.795 (17822395015)|VARIABLE_ASSIGNMENT|[34]|this.Name|"TestSample"|0x24516e88
15:03:32.795 (17822453505)|VARIABLE_ASSIGNMENT|[34]|this.Project__c|"a003600000XSRcZAAX"|0x24516e88
15:03:32.795 (17822476376)|VARIABLE_ASSIGNMENT|[34]|this.Type__c|"Tissue"|0x24516e88
15:03:32.795 (17822494118)|VARIABLE_ASSIGNMENT|[34]|this.Container__c|"Tube"|0x24516e88
15:03:32.795 (17822509860)|VARIABLE_ASSIGNMENT|[34]|this.HMW_DNA_Extraction__c|"Other"|0x24516e88
15:03:32.795 (17822541074)|VARIABLE_SCOPE_BEGIN|[34]|sample|Sample__c|true|false
15:03:32.795 (17822572982)|VARIABLE_ASSIGNMENT|[34]|sample|{"Name":"TestSample","Project__c":"a003600000XSRcZAAX","Type__c":"Tissue","Container__c":"Tube","HMW_DNA_Extraction__c":"Other"}|0x24516e88
15:03:32.795 (17822707497)|USER_DEBUG|[37]|DEBUG|(Sample__c:{Name=TestSample, Project__c=a003600000XSRcZAAX, Type__c=Tissue, Container__c=Tube, HMW_DNA_Extraction__c=Other})
15:03:32.795 (17822875431)|SYSTEM_METHOD_ENTRY|[1]|Type.Type()
15:03:32.795 (17822888124)|SYSTEM_METHOD_EXIT|[1]|Type
15:03:32.795 (17822924073)|VARIABLE_SCOPE_BEGIN|[4]|this|System.Type|true|false
15:03:32.795 (17822953944)|VARIABLE_ASSIGNMENT|[4]|this|{}|0x39ddbae0
15:03:32.795 (17822961165)|VARIABLE_SCOPE_BEGIN|[4]|apextype|java:common.apex.runtime.ApexObjectType|true|false
15:03:32.795 (17823101403)|VARIABLE_ASSIGNMENT|[4]|apextype|"System.HttpCalloutMock"|0x43ff5a8d
15:03:32.795 (17825177540)|METHOD_ENTRY|[2]|01p3600000JhThh|PasmaPushSampleMock.PasmaPushSampleMock()
15:03:32.795 (17825194590)|METHOD_EXIT|[2]|PasmaPushSampleMock
15:03:32.795 (17825227293)|CONSTRUCTOR_ENTRY|[41]|01p3600000JhThh|()|PasmaPushSampleMock
15:03:32.795 (17825256264)|VARIABLE_SCOPE_BEGIN|[2]|this|PasmaPushSampleMock|true|false
15:03:32.795 (17825280581)|VARIABLE_ASSIGNMENT|[2]|this|{}|0x6615a572
15:03:32.795 (17825306063)|CONSTRUCTOR_EXIT|[41]|01p3600000JhThh|()|PasmaPushSampleMock
15:03:32.795 (17825326893)|METHOD_ENTRY|[41]||System.Test.setMock(System.Type, Object)
15:03:32.795 (17825499687)|METHOD_EXIT|[41]||System.Test.setMock(System.Type, Object)
15:03:32.795 (17825508601)|METHOD_EXIT|[47]|01p3600000JhThj|PasmaSampleToLimsTest.init()
15:03:32.795 (17825522422)|METHOD_ENTRY|[48]||System.Test.startTest()
15:03:32.795 (17828253972)|METHOD_EXIT|[48]||System.Test.startTest()
15:03:32.795 (17828364024)|DML_BEGIN|[52]|Op:Insert|Type:Sample__c|Rows:1
15:03:32.795 (18118963207)|CODE_UNIT_STARTED|[EXTERNAL]|01q36000001l8i6|PasmaSampleToLims on Sample trigger event AfterInsert|__sfdc_trigger/PasmaSampleToLims
15:03:32.795 (18119216729)|VARIABLE_SCOPE_BEGIN|[1]|this|PasmaSampleToLims|true|false
15:03:32.795 (18119260375)|VARIABLE_ASSIGNMENT|[1]|this|{}|0x60968c03
15:03:32.795 (18120547779)|VARIABLE_SCOPE_BEGIN|[1]|this|PasmaSampleToLims|true|false
15:03:32.795 (18120572263)|VARIABLE_ASSIGNMENT|[1]|this|{}|0x60968c03
15:03:32.795 (18120600119)|VARIABLE_SCOPE_BEGIN|[4]|sampleName|String|false|false
15:03:32.795 (18120613044)|VARIABLE_ASSIGNMENT|[4]|sampleName|""
15:03:32.795 (18120620185)|VARIABLE_SCOPE_BEGIN|[5]|projectSfdcId|String|false|false
15:03:32.795 (18120628093)|VARIABLE_ASSIGNMENT|[5]|projectSfdcId|""
15:03:32.795 (18120633421)|VARIABLE_SCOPE_BEGIN|[6]|projectLimsId|String|false|false
15:03:32.795 (18120641963)|VARIABLE_ASSIGNMENT|[6]|projectLimsId|""
15:03:32.795 (18120648470)|VARIABLE_SCOPE_BEGIN|[7]|projectOrganism|String|false|false
15:03:32.795 (18120655961)|VARIABLE_ASSIGNMENT|[7]|projectOrganism|""
15:03:32.795 (18120661353)|VARIABLE_SCOPE_BEGIN|[8]|projectManager|String|false|false
15:03:32.795 (18120668383)|VARIABLE_ASSIGNMENT|[8]|projectManager|""
15:03:32.795 (18120671706)|STATEMENT_EXECUTE|[9]
15:03:32.795 (18120673815)|VARIABLE_SCOPE_BEGIN|[9]|projectSfdcLink|String|false|false
15:03:32.795 (18120680589)|VARIABLE_ASSIGNMENT|[9]|projectSfdcLink|""
15:03:32.795 (18120686377)|VARIABLE_SCOPE_BEGIN|[10]|sampleId|String|false|false
15:03:32.795 (18120693604)|VARIABLE_ASSIGNMENT|[10]|sampleId|""
15:03:32.795 (18120699480)|VARIABLE_SCOPE_BEGIN|[11]|SFDC_Link|String|false|false
15:03:32.795 (18120706188)|VARIABLE_ASSIGNMENT|[11]|SFDC_Link|""
15:03:32.795 (18120794084)|VARIABLE_SCOPE_BEGIN|[13]|dt|Datetime|false|false
15:03:32.795 (18120828390)|VARIABLE_ASSIGNMENT|[13]|dt|"2018-07-30T00:00:00.000Z"
15:03:32.795 (18120837826)|VARIABLE_SCOPE_BEGIN|[14]|dateSubmitted|String|false|false
15:03:32.795 (18120847718)|VARIABLE_ASSIGNMENT|[14]|dateSubmitted|""
15:03:32.795 (18120853785)|VARIABLE_SCOPE_BEGIN|[15]|containerTypeName|String|false|false
15:03:32.795 (18120862192)|VARIABLE_ASSIGNMENT|[15]|containerTypeName|""
15:03:32.795 (18120868870)|VARIABLE_SCOPE_BEGIN|[16]|containerTypeId|String|false|false
15:03:32.795 (18120876595)|VARIABLE_ASSIGNMENT|[16]|containerTypeId|""
15:03:32.795 (18120882691)|VARIABLE_SCOPE_BEGIN|[17]|wellValue|String|false|false
15:03:32.795 (18120890769)|VARIABLE_ASSIGNMENT|[17]|wellValue|""
15:03:32.795 (18120894039)|STATEMENT_EXECUTE|[18]
15:03:32.795 (18120896179)|VARIABLE_SCOPE_BEGIN|[18]|sampleType|String|false|false
15:03:32.795 (18120903066)|VARIABLE_ASSIGNMENT|[18]|sampleType|""
15:03:32.795 (18120908924)|VARIABLE_SCOPE_BEGIN|[19]|hmwDnaExtraction|String|false|false
15:03:32.795 (18120915930)|VARIABLE_ASSIGNMENT|[19]|hmwDnaExtraction|""
15:03:32.795 (18120921520)|VARIABLE_SCOPE_BEGIN|[20]|additionalSampleDetails|String|false|false
15:03:32.795 (18120928497)|VARIABLE_ASSIGNMENT|[20]|additionalSampleDetails|""
15:03:32.795 (18120932378)|STATEMENT_EXECUTE|[21]
15:03:32.795 (18120934634)|VARIABLE_SCOPE_BEGIN|[21]|customerSampleName|String|false|false
15:03:32.795 (18120942276)|VARIABLE_ASSIGNMENT|[21]|customerSampleName|""
15:03:32.795 (18120948081)|VARIABLE_SCOPE_BEGIN|[22]|customerSampleId|String|false|false
15:03:32.795 (18120954957)|VARIABLE_ASSIGNMENT|[22]|customerSampleId|""
15:03:32.795 (18120965051)|VARIABLE_SCOPE_BEGIN|[23]|shotgunLibraries|Double|false|false
15:03:32.795 (18120976313)|VARIABLE_ASSIGNMENT|[23]|shotgunLibraries|0.0
15:03:32.795 (18120980841)|STATEMENT_EXECUTE|[24]
15:03:32.795 (18120983195)|VARIABLE_SCOPE_BEGIN|[24]|shotgunSeqPlatform|String|false|false
15:03:32.795 (18120991172)|VARIABLE_ASSIGNMENT|[24]|shotgunSeqPlatform|""
15:03:32.795 (18120997894)|VARIABLE_SCOPE_BEGIN|[25]|shotgunSeqQtyLanes|Double|false|false
15:03:32.795 (18121006294)|VARIABLE_ASSIGNMENT|[25]|shotgunSeqQtyLanes|0.0
15:03:32.795 (18121013171)|VARIABLE_SCOPE_BEGIN|[26]|chicagoLibraries|Double|false|false
15:03:32.795 (18121021034)|VARIABLE_ASSIGNMENT|[26]|chicagoLibraries|0.0
15:03:32.795 (18121027195)|VARIABLE_SCOPE_BEGIN|[27]|chicagoSeqPlatform|String|false|false
15:03:32.795 (18121034775)|VARIABLE_ASSIGNMENT|[27]|chicagoSeqPlatform|""
15:03:32.795 (18121041395)|VARIABLE_SCOPE_BEGIN|[28]|chicagoSeqQtyLanes|Double|false|false
15:03:32.795 (18121048946)|VARIABLE_ASSIGNMENT|[28]|chicagoSeqQtyLanes|0.0
15:03:32.795 (18121056226)|VARIABLE_SCOPE_BEGIN|[29]|hiCLibraries|Double|false|false
15:03:32.795 (18121063964)|VARIABLE_ASSIGNMENT|[29]|hiCLibraries|0.0
15:03:32.795 (18121070260)|VARIABLE_SCOPE_BEGIN|[30]|hiCSeqPlatform|String|false|false
15:03:32.795 (18121077753)|VARIABLE_ASSIGNMENT|[30]|hiCSeqPlatform|""
15:03:32.795 (18121083926)|VARIABLE_SCOPE_BEGIN|[31]|hiCSeqQtyLanes|Double|false|false
15:03:32.795 (18121090901)|VARIABLE_ASSIGNMENT|[31]|hiCSeqQtyLanes|0.0
15:03:32.795 (18121098134)|VARIABLE_SCOPE_BEGIN|[32]|shotgunLongLibraries|Double|false|false
15:03:32.795 (18121106049)|VARIABLE_ASSIGNMENT|[32]|shotgunLongLibraries|0.0
15:03:32.795 (18121112375)|VARIABLE_SCOPE_BEGIN|[33]|shotgunLongSeqPlatform|String|false|false
15:03:32.795 (18121119483)|VARIABLE_ASSIGNMENT|[33]|shotgunLongSeqPlatform|""
15:03:32.795 (18121126004)|VARIABLE_SCOPE_BEGIN|[34]|shotgunLongSeqQtyLanes|Double|false|false
15:03:32.795 (18121132969)|VARIABLE_ASSIGNMENT|[34]|shotgunLongSeqQtyLanes|0.0
15:03:32.795 (18121139583)|VARIABLE_SCOPE_BEGIN|[35]|assemblies|String|false|false
15:03:32.795 (18121147416)|VARIABLE_ASSIGNMENT|[35]|assemblies|""
15:03:32.795 (18121154064)|VARIABLE_SCOPE_BEGIN|[36]|pacBioLibrarySequencing|Boolean|false|false
15:03:32.795 (18121176452)|VARIABLE_ASSIGNMENT|[36]|pacBioLibrarySequencing|false
15:03:32.795 (18121183912)|VARIABLE_SCOPE_BEGIN|[40]|x10xLibrarySequencing|Boolean|false|false
15:03:32.795 (18121195984)|VARIABLE_ASSIGNMENT|[40]|x10xLibrarySequencing|false
15:03:32.795 (18121203889)|VARIABLE_SCOPE_BEGIN|[42]|selvaLibraries|Double|false|false
15:03:32.795 (18121211672)|VARIABLE_ASSIGNMENT|[42]|selvaLibraries|0.0
15:03:32.795 (18121215673)|STATEMENT_EXECUTE|[43]
15:03:32.795 (18121218110)|VARIABLE_SCOPE_BEGIN|[43]|selvaSeqPlatform|String|false|false
15:03:32.795 (18121226535)|VARIABLE_ASSIGNMENT|[43]|selvaSeqPlatform|""
15:03:32.795 (18121233973)|VARIABLE_SCOPE_BEGIN|[44]|selvaSeqQtyLanes|Double|false|false
15:03:32.795 (18121241259)|VARIABLE_ASSIGNMENT|[44]|selvaSeqQtyLanes|0.0
15:03:32.795 (18123248881)|SOQL_EXECUTE_BEGIN|[52]|Aggregations:0|SELECT Project__c, Project__r.LIMS_ID__c FROM Sample__c WHERE Id IN :tmpVar1
15:03:32.795 (18155739374)|SOQL_EXECUTE_END|[52]|Rows:1
15:03:32.795 (18155902580)|VARIABLE_SCOPE_BEGIN|[51]|mpSmp|Map|true|false
15:03:32.795 (18155948686)|VARIABLE_ASSIGNMENT|[51]|mpSmp|{"a2f36000002JIcfAAG":{"Project__c":"a003600000XSRcZAAX","Id":"a2f36000002JIcfAAG","Project__r":{"Id":"a003600000XSRcZAAX"}}}|0x4699c8c9
15:03:32.795 (18156122624)|VARIABLE_SCOPE_BEGIN|[54]|smp|Sample__c|true|false
15:03:32.795 (18156604330)|VARIABLE_ASSIGNMENT|[54]|smp|{"LastModifiedDate":"2018-07-30T22:03:33.000Z","IsDeleted":false,"HMW_DNA_Extraction__c":"Other","Project__c":"a003600000XSRcZAAX","Sample_Received__c":false,"Name":"TestSample","SystemModstamp":"2018-07-30T22:03:33.000Z","Container__c":"Tube","X10X_Library_and_Sequencing__c":false,"CreatedById":"00536000006vnqeAAA","Organism__c":"Garnoderma","Sample_Exhausted__c":false,"Type__c":"Tissue","CreatedDate":"2018-07-30T22:03:33.000Z","Id":"a2f36000002JIcfAAG","Status__c":"With Customer","LastModifiedById":"00536000006vnqeAAA","PacBio_Library_Sequencing__c":false}|0x373e872e
15:03:32.795 (18156663395)|VARIABLE_ASSIGNMENT|[57]|projectSfdcId|"a003600000XSRcZAAX"
15:03:32.795 (18156767699)|VARIABLE_ASSIGNMENT|[58]|projectLimsId|null
15:03:32.795 (18157053652)|SOQL_EXECUTE_BEGIN|[60]|Aggregations:0|SELECT LIMS_ID__c, Project__c.Organism__c, Project__c.Project_Manager__c FROM Project__c WHERE Id = :tmpVar1
15:03:32.795 (18160834214)|VARIABLE_SCOPE_BEGIN|[60]|prj|Project__c|true|false
15:03:32.795 (18160868642)|VARIABLE_ASSIGNMENT|[60]|prj|{"Organism__c":"Garnoderma","Id":"a003600000XSRcZAAX"}|0x2a1509b7
15:03:32.795 (18160916537)|VARIABLE_ASSIGNMENT|[62]|projectOrganism|"Garnoderma"
15:03:32.795 (18160928659)|VARIABLE_ASSIGNMENT|[63]|projectManager|null
15:03:32.795 (18160964814)|METHOD_ENTRY|[65]||System.Url.getSalesforceBaseUrl()
15:03:32.795 (18161146405)|METHOD_EXIT|[65]||System.Url.getSalesforceBaseUrl()
15:03:32.795 (18161191352)|METHOD_ENTRY|[65]||System.Url.toExternalForm()
15:03:32.795 (18161243218)|METHOD_EXIT|[65]||System.Url.toExternalForm()
15:03:32.795 (18161258103)|VARIABLE_ASSIGNMENT|[65]|SFDC_Link|"http://dovetailgenom (21 more) ..."
15:03:32.795 (18161290239)|VARIABLE_ASSIGNMENT|[66]|sampleId|"a2f36000002JIcfAAG"
15:03:32.795 (18161321903)|VARIABLE_ASSIGNMENT|[71]|sampleName|"TestSample"
15:03:32.795 (18161342013)|VARIABLE_ASSIGNMENT|[72]|sampleType|"Tissue"
15:03:32.795 (18161361707)|VARIABLE_ASSIGNMENT|[73]|hmwDnaExtraction|"Other"
15:03:32.795 (18161386609)|VARIABLE_ASSIGNMENT|[74]|additionalSampleDetails|null
15:03:32.795 (18161404562)|VARIABLE_ASSIGNMENT|[77]|containerTypeName|"Tube"
15:03:32.795 (18164670636)|METHOD_ENTRY|[6]|01p3600000JhThg|PasmaPushSample.PasmaPushSample()
15:03:32.795 (18164695602)|METHOD_EXIT|[6]|PasmaPushSample
15:03:32.795 (18164734717)|METHOD_ENTRY|[78]|01p3600000JhThg|PasmaPushSample.findWellValue(String)
15:03:32.795 (18164771064)|VARIABLE_SCOPE_BEGIN|[240]|Container|String|false|false
15:03:32.795 (18164795010)|VARIABLE_ASSIGNMENT|[240]|Container|"Tube"
15:03:32.795 (18164907616)|VARIABLE_SCOPE_BEGIN|[242]|values|List|true|false
15:03:32.795 (18164968523)|VARIABLE_ASSIGNMENT|[242]|values|[]|0x7698f87c
15:03:32.795 (18164982763)|VARIABLE_SCOPE_BEGIN|[243]|containerTypeId|String|false|false
15:03:32.795 (18164996847)|VARIABLE_ASSIGNMENT|[243]|containerTypeId|""
15:03:32.795 (18165007196)|VARIABLE_SCOPE_BEGIN|[244]|wellValue|String|false|false
15:03:32.795 (18165018062)|VARIABLE_ASSIGNMENT|[244]|wellValue|""
15:03:32.795 (18165066814)|VARIABLE_ASSIGNMENT|[251]|containerTypeId|"2"
15:03:32.795 (18165084020)|VARIABLE_ASSIGNMENT|[252]|wellValue|"1:1"
15:03:32.795 (18165199338)|METHOD_EXIT|[78]|01p3600000JhThg|PasmaPushSample.findWellValue(String)
15:03:32.795 (18165230872)|VARIABLE_ASSIGNMENT|[78]|containerTypeId|"2"
15:03:32.795 (18165244875)|METHOD_ENTRY|[79]|01p3600000JhThg|PasmaPushSample.findWellValue(String)
15:03:32.795 (18165260021)|VARIABLE_SCOPE_BEGIN|[240]|Container|String|false|false
15:03:32.795 (18165273040)|VARIABLE_ASSIGNMENT|[240]|Container|"Tube"
15:03:32.795 (18165311565)|VARIABLE_SCOPE_BEGIN|[242]|values|List|true|false
15:03:32.795 (18165348154)|VARIABLE_ASSIGNMENT|[242]|values|[]|0x3b2dd1d1
15:03:32.795 (18165361099)|VARIABLE_SCOPE_BEGIN|[243]|containerTypeId|String|false|false
15:03:32.795 (18165374003)|VARIABLE_ASSIGNMENT|[243]|containerTypeId|""
15:03:32.795 (18165383175)|VARIABLE_SCOPE_BEGIN|[244]|wellValue|String|false|false
15:03:32.795 (18165394090)|VARIABLE_ASSIGNMENT|[244]|wellValue|""
15:03:32.795 (18165420081)|VARIABLE_ASSIGNMENT|[251]|containerTypeId|"2"
15:03:32.795 (18165431048)|VARIABLE_ASSIGNMENT|[252]|wellValue|"1:1"
15:03:32.795 (18165556770)|METHOD_EXIT|[79]|01p3600000JhThg|PasmaPushSample.findWellValue(String)
15:03:32.795 (18165585515)|VARIABLE_ASSIGNMENT|[79]|wellValue|"1:1"
15:03:32.795 (18165706461)|VARIABLE_SCOPE_BEGIN|[86]|year|String|false|false
15:03:32.795 (18165734670)|VARIABLE_ASSIGNMENT|[86]|year|"2018"
15:03:32.795 (18165794774)|VARIABLE_SCOPE_BEGIN|[87]|month|String|false|false
15:03:32.795 (18165809098)|VARIABLE_ASSIGNMENT|[87]|month|"7"
15:03:32.795 (18165863243)|VARIABLE_ASSIGNMENT|[89]|month|"07"
15:03:32.795 (18165921034)|VARIABLE_SCOPE_BEGIN|[91]|day|String|false|false
15:03:32.795 (18165935503)|VARIABLE_ASSIGNMENT|[91]|day|"29"
15:03:32.795 (18165988100)|VARIABLE_ASSIGNMENT|[95]|dateSubmitted|"2018-07-29"
15:03:32.795 (18166020190)|VARIABLE_ASSIGNMENT|[96]|customerSampleName|null
15:03:32.795 (18166042923)|VARIABLE_ASSIGNMENT|[97]|customerSampleId|null
15:03:32.795 (18166075583)|VARIABLE_ASSIGNMENT|[102]|shotgunLibraries|0.0
15:03:32.795 (18166094307)|VARIABLE_ASSIGNMENT|[103]|shotgunSeqPlatform|""
15:03:32.795 (18166108019)|VARIABLE_ASSIGNMENT|[104]|shotgunSeqQtyLanes|0.0
15:03:32.795 (18166134205)|VARIABLE_ASSIGNMENT|[114]|chicagoLibraries|0.0
15:03:32.795 (18166146368)|VARIABLE_ASSIGNMENT|[115]|chicagoSeqPlatform|""
15:03:32.795 (18166159118)|VARIABLE_ASSIGNMENT|[116]|chicagoSeqQtyLanes|0.0
15:03:32.795 (18166184176)|VARIABLE_ASSIGNMENT|[126]|hiCLibraries|0.0
15:03:32.795 (18166197170)|VARIABLE_ASSIGNMENT|[127]|hiCSeqPlatform|""
15:03:32.795 (18166209892)|VARIABLE_ASSIGNMENT|[128]|hiCSeqQtyLanes|0.0
15:03:32.795 (18166234829)|VARIABLE_ASSIGNMENT|[138]|shotgunLongLibraries|0.0
15:03:32.795 (18166247252)|VARIABLE_ASSIGNMENT|[139]|shotgunLongSeqPlatform|""
15:03:32.795 (18166260069)|VARIABLE_ASSIGNMENT|[140]|shotgunLongSeqQtyLanes|0.0
15:03:32.795 (18166280881)|VARIABLE_ASSIGNMENT|[151]|assemblies|null
15:03:32.795 (18166336410)|USER_DEBUG|[152]|DEBUG|assemblies = null
15:03:32.795 (18166442446)|USER_DEBUG|[156]|DEBUG|smp.pacBio_Library_Sequencing = false
15:03:32.795 (18166468424)|VARIABLE_ASSIGNMENT|[157]|pacBioLibrarySequencing|false
15:03:32.795 (18166495834)|VARIABLE_ASSIGNMENT|[160]|x10xLibrarySequencing|false
15:03:32.795 (18166524930)|VARIABLE_ASSIGNMENT|[163]|selvaLibraries|0.0
15:03:32.795 (18166538151)|VARIABLE_ASSIGNMENT|[164]|selvaSeqPlatform|""
15:03:32.795 (18166550720)|VARIABLE_ASSIGNMENT|[165]|selvaSeqQtyLanes|0.0
15:03:32.795 (18166593873)|VARIABLE_ASSIGNMENT|[54]|smp|null|
15:03:32.795 (18167113130)|USER_DEBUG|[181]|DEBUG|Exiting the Sample trigger

5
  • You have zero coverage when the trigger is not getting called are you sure you are doing all the dml events to trigger likewise i dont see you are inserting or updating the sample list you just created a list and added some value you forgot to do the dml Commented Jul 31, 2018 at 2:01
  • I see that although you are checking for Trigger.isInsert and possibly for Trigger.isUpdate, there is no specific check for executing the Apex Trigger code only on an After event using Trigger.isAfter which means that your trigger could execute possibly on every Project record insert and update, creating an illusion that about the > 0% code coverage. But that may not be the case during deployment. Additionally, there is a SOQL within a for loop for querying Projects based on projectSfdcId which should be removed.
    – Jigar Shah
    Commented Jul 31, 2018 at 2:20
  • @AvijitChakraborty I am inserting the list ("insert sampleList;") in the test class, testMethod testPasmaSampleToLims. I used the exact same code for a similar trigger on the Project object and it was called.
    – aelyman11
    Commented Jul 31, 2018 at 17:20
  • @JigarShah I will try adding Trigger.isAfter, but I don't see how that would ensure the trigger gets called...
    – aelyman11
    Commented Jul 31, 2018 at 17:30
  • What happens if you add insert in init method generally we use set up method to do this this approach is complex. what happens if you try to insert a record from workbench or developer console Commented Aug 1, 2018 at 0:56

1 Answer 1

0

Turns out this is a known "unexpected behavior" that Salesforce R&D is working to resolve, but "with no fixed time frame for its release as of yet."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .