Progress bar bug fix for repeated tests.
This commit is contained in:
@@ -705,7 +705,7 @@ namespace TBF.BenchControl.Sequences
|
|||||||
log.InfoFormat("Test {0}: Transition({1}, BeforeTest) returned {2}", test.Name, (transitionBefore == null ? "null" : transitionBefore.Name), rsltTransBefore);
|
log.InfoFormat("Test {0}: Transition({1}, BeforeTest) returned {2}", test.Name, (transitionBefore == null ? "null" : transitionBefore.Name), rsltTransBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lastTestFinished = true;
|
bool currentTestFinished = true;
|
||||||
if (rsltTransBefore == Event.Done)
|
if (rsltTransBefore == Event.Done)
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
@@ -718,28 +718,28 @@ namespace TBF.BenchControl.Sequences
|
|||||||
deferredData.Add(new DeferredTestEvaluationData(test, repetNr, (testMethod as ITestMethodWith2ndPass).IntermediateData));
|
deferredData.Add(new DeferredTestEvaluationData(test, repetNr, (testMethod as ITestMethodWith2ndPass).IntermediateData));
|
||||||
}
|
}
|
||||||
|
|
||||||
lastTestFinished = (rsltTransBefore == Event.Done && !e.Contains(Event.Error)
|
currentTestFinished = (rsltTransBefore == Event.Done && !e.Contains(Event.Error)
|
||||||
&& !e.Contains(Event.ConfigurationError)
|
&& !e.Contains(Event.ConfigurationError)
|
||||||
&& !e.Contains(Event.OpArgumentError)
|
&& !e.Contains(Event.OpArgumentError)
|
||||||
&& !e.Contains(Event.UiCmdStop));
|
&& !e.Contains(Event.UiCmdStop));
|
||||||
|
|
||||||
if (e.Contains(Event.OuterLoopStart)) break; /// Do not repeat OuterLoopStart test in this loop
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetNr, currentTestFinished ? Config.Entities.Progress.Completed
|
||||||
if (lastTestFinished && !isOuterLoopMode) repetNr++;
|
: Config.Entities.Progress.Aborted));
|
||||||
}
|
|
||||||
while (lastTestFinished && !isOuterLoopMode && repetNr <= test.Repeats);
|
|
||||||
|
|
||||||
if (lastTestFinished && !isOuterLoopMode && repetNr > test.Repeats) repetNr = 1; /// Reset repetNr
|
if (e.Contains(Event.OuterLoopStart)) break; /// Do not repeat OuterLoopStart test in this loop
|
||||||
|
if (currentTestFinished && !isOuterLoopMode) repetNr++;
|
||||||
|
}
|
||||||
|
while (currentTestFinished && !isOuterLoopMode && repetNr <= test.Repeats);
|
||||||
|
|
||||||
|
if (currentTestFinished && !isOuterLoopMode && repetNr > test.Repeats) repetNr = 1; /// Reset repetNr
|
||||||
}
|
}
|
||||||
|
|
||||||
if (testMethod.DoTransitions())
|
if (testMethod.DoTransitions())
|
||||||
{
|
{
|
||||||
TransitionContext endContext = lastTestFinished ? TransitionContext.AfterTest : TransitionContext.Stop;
|
TransitionContext endContext = currentTestFinished ? TransitionContext.AfterTest : TransitionContext.Stop;
|
||||||
rsltTransAfter = Transition(transitionAfter, endContext); /// Transition or SetRoute - end of test
|
rsltTransAfter = Transition(transitionAfter, endContext); /// Transition or SetRoute - end of test
|
||||||
log.InfoFormat("Test {0}: Transition({1}, {2}) returned {3}", test.Name, (transitionAfter == null ? "null" : transitionAfter.Name), endContext, rsltTransAfter);
|
log.InfoFormat("Test {0}: Transition({1}, {2}) returned {3}", test.Name, (transitionAfter == null ? "null" : transitionAfter.Name), endContext, rsltTransAfter);
|
||||||
}
|
}
|
||||||
|
|
||||||
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetNr, lastTestFinished ? Config.Entities.Progress.Completed
|
|
||||||
: Config.Entities.Progress.Aborted));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rsltTransBefore == Event.Error || e.Contains(Event.Error))
|
if (rsltTransBefore == Event.Error || e.Contains(Event.Error))
|
||||||
@@ -911,6 +911,9 @@ namespace TBF.BenchControl.Sequences
|
|||||||
bool testFinished = (rsltTransBefore == Event.Done && !e.Contains(Event.Error) && !e.Contains(Event.ConfigurationError)
|
bool testFinished = (rsltTransBefore == Event.Done && !e.Contains(Event.Error) && !e.Contains(Event.ConfigurationError)
|
||||||
&& !e.Contains(Event.OpArgumentError) && !e.Contains(Event.UiCmdStop));
|
&& !e.Contains(Event.OpArgumentError) && !e.Contains(Event.UiCmdStop));
|
||||||
|
|
||||||
|
Bridge.OnTestProgress(this, new TestProgressEventArgs(test, repetNr, testFinished ? Config.Entities.Progress.Completed
|
||||||
|
: Config.Entities.Progress.Aborted));
|
||||||
|
|
||||||
if (testMethod.DoTransitions())
|
if (testMethod.DoTransitions())
|
||||||
{
|
{
|
||||||
TransitionContext endContext = testFinished ? TransitionContext.AfterTest : TransitionContext.Stop;
|
TransitionContext endContext = testFinished ? TransitionContext.AfterTest : TransitionContext.Stop;
|
||||||
|
|||||||
Reference in New Issue
Block a user