diff --git a/src/main/java/com/coreyd97/stepper/step/Step.java b/src/main/java/com/coreyd97/stepper/step/Step.java index 9549a2f..5868861 100644 --- a/src/main/java/com/coreyd97/stepper/step/Step.java +++ b/src/main/java/com/coreyd97/stepper/step/Step.java @@ -108,7 +108,14 @@ public StepExecutionInfo executeStep() throws SequenceExecutionException { public StepExecutionInfo executeStep(List replacements) throws SequenceExecutionException { byte[] requestWithoutReplacements = getRequest(); byte[] builtRequest; - + // Check if HOST/host Global variable is present if yes then update the target + for(StepVariable var : replacements) { + if (var.getIdentifier().contains("HOST") || var.getIdentifier().contains("host")) { + if(var.getValue() != null){ + this.setHostname(var.getValue()); + } + } + } this.variableManager.updateVariablesBeforeExecution(); for (StepExecutionListener executionListener : this.executionListeners) {