Skip to content

Commit

Permalink
Condition related to execution (if action executed and returned OK...…
Browse files Browse the repository at this point in the history
….etc) > support the usage of the condition from a step library
  • Loading branch information
bcivel committed Nov 28, 2024
1 parent 47138a8 commit 4c37565
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public class TestCaseExecution {
private List<TestCaseExecutionFile> fileList;
// Host the list of Steps that will be executed (both pre tests and main test)
private List<TestCaseStepExecution> testCaseStepExecutionList;
private TestCaseStepExecution testCaseStepInExecution;
// Host the full list of data calculated during the execution.
private TreeMap<String, TestCaseExecutionData> testCaseExecutionDataMap;
// This is used to keep track of all property calculated within a step/action/control. It is reset each time we enter a step/action/control and the property name is added to the list each time it gets calculated. In case it was already asked for calculation, we stop the execution with FA message.
Expand Down Expand Up @@ -339,9 +340,20 @@ public TestCaseStepExecution getTestCaseStepExecutionBySortId(int sortID) {
}

public TestCaseStepExecution getTestCaseStepExecutionByStepId(int stepId) {
for (TestCaseStepExecution tcse : this.testCaseStepExecutionList) {
if (stepId == tcse.getTestCaseStep().getStepId()) {
return tcse;
TestCaseStepExecution tcsee = this.getTestCaseStepInExecution();
//If step executing if from library, return the step from the library instead
if (tcsee.isUsingLibraryStep()){
for (TestCaseStepExecution tcse : this.testCaseStepExecutionList) {
if (stepId == tcse.getTestCaseStep().getLibraryStepStepId()) {
return tcse;
}
}
return tcsee;
} else {
for (TestCaseStepExecution tcse : this.testCaseStepExecutionList) {
if (stepId == tcse.getTestCaseStep().getStepId()) {
return tcse;
}
}
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ private TestCaseStepExecution executeStep(TestCaseStepExecution stepExecution, T
List<TestCaseStepAction> testCaseStepActionList = stepExecution.getTestCaseStep().getActions();
LOG.debug("{}Getting list of actions of the step. {} action(s) to perform.", logPrefix, testCaseStepActionList.size());

execution.setTestCaseStepInExecution(stepExecution);
for (TestCaseStepAction tcAction : testCaseStepActionList) {

// Start Execution of TestCaseStepAction
Expand Down

0 comments on commit 4c37565

Please sign in to comment.