@@ -160,19 +160,22 @@ async def run_tests(self, tests, protocol, server_command, env_vars, timeout=Non
160
160
161
161
total_time = time .time () - self .start_time
162
162
163
- # Count passed and failed tests, handling non-dictionary results
163
+ # Count passed, failed, and skipped tests, handling non-dictionary results
164
164
passed = 0
165
165
skipped = 0
166
166
for r in test_results :
167
167
if isinstance (r , dict ):
168
168
if r .get ("passed" , False ):
169
- passed += 1
169
+ if "skipped" in r .get ("message" , "" ).lower ():
170
+ skipped += 1
171
+ else :
172
+ passed += 1
170
173
if r .get ("skipped" , False ):
171
174
skipped += 1
172
175
173
- failed = total_tests - passed
176
+ failed = total_tests - passed - skipped
174
177
175
- log_with_timestamp (f"Test suite completed: { passed } passed, { failed } failed, total time: { total_time :.2f} s" )
178
+ log_with_timestamp (f"Test suite completed: { passed } passed, { failed } failed, { skipped } skipped, total time: { total_time :.2f} s" )
176
179
177
180
# Format the results exactly like the standard runner does
178
181
return {
@@ -428,7 +431,12 @@ async def main():
428
431
}
429
432
430
433
# Calculate compliance percentage
431
- compliance_percentage = (passed_tests / total_tests ) * 100 if total_tests > 0 else 0
434
+ if isinstance (results , dict ) and 'skipped' in results :
435
+ # Exclude skipped tests from the total when calculating compliance
436
+ adjusted_total = total_tests - results ['skipped' ]
437
+ compliance_percentage = (passed_tests / adjusted_total ) * 100 if adjusted_total > 0 else 100
438
+ else :
439
+ compliance_percentage = (passed_tests / total_tests ) * 100 if total_tests > 0 else 0
432
440
433
441
# Determine compliance status
434
442
if compliance_percentage == 100 :
@@ -442,6 +450,8 @@ async def main():
442
450
log_with_timestamp (f"Total tests: { total_tests } " )
443
451
log_with_timestamp (f"Passed: { passed_tests } " )
444
452
log_with_timestamp (f"Failed: { failed_tests } " )
453
+ if isinstance (results , dict ) and 'skipped' in results :
454
+ log_with_timestamp (f"Skipped: { results ['skipped' ]} " )
445
455
log_with_timestamp (f"Compliance Status: { compliance_status } ({ compliance_percentage :.1f} %)" )
446
456
447
457
# Extract server name from the command (for report purposes)
0 commit comments