-
Notifications
You must be signed in to change notification settings - Fork 66
Description
I would like to change the interface of this lib. I can present a first step in a pr.
I find it weird that to_xml_string and to_file are static methods for TestSuite. Their input is a list of TestSuite objects so they don't act on a TestSuite object. I would like to move them out of the TestSuite class to separate functions that act on a list of TestSuite objects. An alternative would be to introduce a new class called TestSuites that can be instantiated with a list of TestSuite objects.
I actually would like to remove the to_file method entirely. It just writes the xml string to an open file. I don't see why that would be the responsibility of this lib.
I think build_xml_doc should not be exposed outside of the lib. TestCase and TestSuite should just be simple holders of data and we can turn a list of TestSuite objects to a xml string. But I can present a suggestion for that in a later pr. I have only found one repo on github that uses build_xml_doc (https://github.com/CyberGRX/questions-three).