@@ -99,3 +99,73 @@ def test_steps_after_failed_are_skipped(docstring, robot_runner: AllureRobotRunn
9999 )
100100 )
101101 )
102+
103+
104+ def test_only_failed_steps_have_status_details (docstring , robot_runner : AllureRobotRunner ):
105+ """
106+ *** Variables ***
107+ @{TEST_VALUES} 0 5 15
108+
109+ *** Test Cases ***
110+ Test Case with mixed step results and status details
111+ FOR ${value} IN @{TEST_VALUES}
112+ Run Keyword And Ignore Error Should Be True ${value} > 10
113+ END
114+ Log To Console Test message
115+ """
116+
117+ robot_runner .run_robotframework (
118+ suite_literals = {"status.robot" : docstring }
119+ )
120+
121+ assert_that (
122+ robot_runner .allure_results ,
123+ has_test_case (
124+ "Test Case with mixed step results and status details" ,
125+ has_step (
126+ "${value} IN @{TEST_VALUES}" ,
127+ has_step (
128+ "${value} = 0" ,
129+ has_step (
130+ "BuiltIn.Run Keyword And Ignore Error" ,
131+ has_step (
132+ "BuiltIn.Should Be True" ,
133+ with_status ("failed" ),
134+ has_status_details (
135+ with_message_contains ("0 > 10' should be true." ),
136+ )
137+ ),
138+ ),
139+ ),
140+ has_step (
141+ "${value} = 5" ,
142+ has_step (
143+ "BuiltIn.Run Keyword And Ignore Error" ,
144+ has_step (
145+ "BuiltIn.Should Be True" ,
146+ with_status ("failed" ),
147+ has_status_details (
148+ with_message_contains ("5 > 10' should be true." ),
149+ )
150+ ),
151+ ),
152+ ),
153+ has_step (
154+ "${value} = 15" ,
155+ has_step (
156+ "BuiltIn.Run Keyword And Ignore Error" ,
157+ has_step (
158+ "BuiltIn.Should Be True" ,
159+ with_status ("passed" ),
160+ has_status_details ({})
161+ ),
162+ ),
163+ )
164+ ),
165+ has_step (
166+ "BuiltIn.Log To Console" ,
167+ with_status ("passed" ),
168+ has_status_details ({})
169+ )
170+ )
171+ )
0 commit comments