rebot --prerebotmodifier DeleteEmptySuites.py --output output_new.xml output.xml
just delete the most stuff from the example code …
from robot.api import SuiteVisitor
class DeleteEmptySuites(SuiteVisitor):
def end_suite(self, suite):
"""Remove suites that are empty."""
suite.suites = [s for s in suite.suites if s.test_count > 0]
def visit_test(self, test):
"""Avoid visiting tests and their keywords to save a little time."""
pass