I would like to know how to override some step info before step execution. I have tried using Step Listener. I want to develop a solution similar to the inbuilt replacement of ${env.abc}
public void beforExecute(StepExecutionTracker stepExecutionTracker) {
step.setDescription(stepExecutionTracker.getStep().getDescription().replaceAll("generate.passport_no", utils.generatePassport("USA"));
}
-- Throwing error
Note: The below implementation works for reports, not actual execution. The report is getting changed, but the execution is not getting replaced value.
stepExecutionTracker.getStep.getDescription((stepExecutionTracker.getStep().getDescription().replaceAll("generate.passport_no", utils.generatePassport("USA")).