Skip to content

fix: propagate robotframework conditional step timestamps from RF#492

Merged
gibiw merged 2 commits into
mainfrom
fix/robotframework-conditional-step-times
May 25, 2026
Merged

fix: propagate robotframework conditional step timestamps from RF#492
gibiw merged 2 commits into
mainfrom
fix/robotframework-conditional-step-times

Conversation

@gibiw
Copy link
Copy Markdown
Contributor

@gibiw gibiw commented May 25, 2026

Summary

  • listener.__parse_condition_steps was hard-overwriting start_time and end_time to None for 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.
  • Read start_time / end_time / elapsed_time from the Robot Framework body element (same total_seconds() * 1000 ms conversion as regular keywords from fix: compute robotframework step duration from total elapsed time #491), falling back to None only if the element doesn't expose the attribute.
  • Bumps qase-robotframework to 6.0.2.

Test plan

  • Added TestParseConditionStepsTiming covering 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).
  • Added examples/single/robot/tests/conditional.robot example so the fix can be re-verified.
  • End-to-end verified against TestOps project DEVX:
    • Before fix (run #874): each IF/ELSE branch sends start_time=null, end_time=null, duration=0.
    • After fix (run #877): executed IF branch shows duration≈53 ms with real timestamps; skipped ELSE shows duration=0 with real near-zero start/end times.
  • CI green on all supported Python versions.

gibiw added 2 commits May 25, 2026 18:12
__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.
@gibiw gibiw merged commit 1b0c2dd into main May 25, 2026
37 checks passed
@gibiw gibiw deleted the fix/robotframework-conditional-step-times branch May 25, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant