I am running a test on a batchable class.
@isTest
public class BatchSkillExcalationUpdaterTest {
static testMethod void ValidateUpdates() {
...
EscalationSkillUpdater SkillBatch = new EscalationSkillUpdater();
system.debug(logginglevel.FINEST, 'BATCHING...');
Database.executeBatch(SkillBatch);
system.debug(logginglevel.FINEST, 'FINISHED BATCHING.');
...
}
}
The class I am testing:
global class EscalationSkillUpdater implements Database.Batchable <sObject> {
global Database.QueryLocator start (Database.BatchableContext BC) {
...
return Database.getQueryLocator(query);
}
global void execute (Database.BatchableContext BC, list<SkillEscalationChangeRecord__c> Data) {
...
System.debug(logginglevel.FINEST, 'FLAG');
update Data;
}
global void finish (Database.BatchableContext BC) {}
}
However, the Debug message in the execute()
method is not showing up:
The 'FLAG'
from the batchable class is not showing up. Why is this? Is there another way to "print" values to examine?
System.debug()
is the first line in thestart()
method.