Skip to content

Commit beb1cc6

Browse files
authored
Merge pull request #48 from JFoederer/fix-graph-final-trace
prevent highlighting the wrong path in the graph
2 parents fcd58b1 + 8fb7ea4 commit beb1cc6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

robotmbt/suiteprocessors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ def process_test_suite(self, in_suite: Suite, *, seed: str | int | bytes | bytea
102102
logger.debug("Direct trace not discovered. Now exploring with loops, allowing repetition of scenarios.")
103103
tracestate = self._try_to_reach_full_coverage(allow_duplicate_scenarios=True, randomise=True,
104104
unreached_scenarios=tracestate.unreached)
105+
else:
106+
# The visualiser assumes that the last trace is the final selected trace, which is not always
107+
# the case. Re-adding the selected trace to prevent the wrong path from being highlighted.
108+
self._update_visualisation(TraceState(tracestate.prio_order))
109+
self._update_visualisation(tracestate)
105110
finally: # Draw the graph even when a timeout or user interrupt occurs
106111
if graph:
107112
self._write_visualisation(graph)

0 commit comments

Comments
 (0)