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

(cherry picked from commit 21aeb43)
  • Loading branch information
christophd committed Apr 24, 2024
1 parent aa9ff63 commit d84f6ff
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,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 @@ -206,7 +206,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 @@ -218,7 +218,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 d84f6ff

Please sign in to comment.