Skip to content

Commit

Permalink
fix(#948): Log proper test step index on incremental Citrus tests
Browse files Browse the repository at this point in the history
Avoid all test steps to be reported as "TEST STEP 0" for incremental tests
  • Loading branch information
christophd committed Sep 20, 2023
1 parent 45b6935 commit 21aeb43
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public void onTestActionStart(TestCase testCase, TestAction testAction) {
if (isDebugEnabled()) {
newLine();
if (testCase.isIncremental()) {
debug("TEST STEP " + (testCase.getActionIndex(testAction) + 1) + ": " + (testAction.getName() != null ? testAction.getName() : testAction.getClass().getName()));
debug("TEST STEP " + (testCase.getExecutedActions().size() + 1) + ": " + (testAction.getName() != null ? testAction.getName() : testAction.getClass().getName()));
} else {
debug("TEST STEP " + (testCase.getActionIndex(testAction) + 1) + "/" + testCase.getActionCount() + ": " + (testAction.getName() != null ? testAction.getName() : testAction.getClass().getName()));
}
Expand All @@ -227,7 +227,7 @@ public void onTestActionFinish(TestCase testCase, TestAction testAction) {
if (isDebugEnabled()) {
newLine();
if (testCase.isIncremental()) {
debug("TEST STEP " + (testCase.getActionIndex(testAction) + 1) + " SUCCESS");
debug("TEST STEP " + (testCase.getExecutedActions().size() + 1) + " SUCCESS");
} else {
debug("TEST STEP " + (testCase.getActionIndex(testAction) + 1) + "/" + testCase.getActionCount() + " SUCCESS");
}
Expand All @@ -239,7 +239,7 @@ public void onTestActionSkipped(TestCase testCase, TestAction testAction) {
if (isDebugEnabled()) {
newLine();
if (testCase.isIncremental()) {
debug("SKIPPING TEST STEP " + (testCase.getActionIndex(testAction) + 1));
debug("SKIPPING TEST STEP " + (testCase.getExecutedActions().size() + 1));
} else {
debug("SKIPPING TEST STEP " + (testCase.getActionIndex(testAction) + 1) + "/" + testCase.getActionCount());
}
Expand Down

0 comments on commit 21aeb43

Please sign in to comment.