fix: propagate robotframework conditional step timestamps from RF#492
Merged
Conversation
__parse_condition_steps was unconditionally overwriting start_time
and end_time with None for every IF / ELSE IF / ELSE branch, which
sent {start_time: null, end_time: null, duration: 0} to the API.
The timeline view in TestOps could not place these branches and they
appeared without timing.
Read start_time / end_time / elapsed_time from the Robot Framework
body element (using the same total_seconds()*1000 ms conversion as
regular keywords) and fall back to None only when the attribute is
absent on the element.
Add a conditional.robot example covering IF-taken, ELSE-taken and
ELSE-IF-chain scenarios, and unit tests verifying that each branch
carries its real timestamps and that the duration is computed in ms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
listener.__parse_condition_stepswas hard-overwritingstart_timeandend_timetoNonefor every IF / ELSE IF / ELSE branch, sending{start_time: null, end_time: null, duration: 0}to the API. Branches couldn't be placed on the TestOps timeline.start_time/end_time/elapsed_timefrom the Robot Framework body element (sametotal_seconds() * 1000ms conversion as regular keywords from fix: compute robotframework step duration from total elapsed time #491), falling back toNoneonly if the element doesn't expose the attribute.qase-robotframeworkto6.0.2.Test plan
TestParseConditionStepsTimingcovering executed IF branch, skipped ELSE branch, and a full IF/ELSE IF/ELSE chain — each branch must keep its RF timestamps and the duration must be in milliseconds.pytest tests/tests_qaseio_robotframework/test_listener.py -v→ 21 passed locally (Python 3.12).examples/single/robot/tests/conditional.robotexample so the fix can be re-verified.start_time=null, end_time=null, duration=0.duration≈53 mswith real timestamps; skipped ELSE showsduration=0with real near-zero start/end times.