tool-competition-av
tool-competition-av copied to clipboard
Factorize interface for test generators
Hi, I am new to this framework. I like the code pipeline and it is easy to use. I felt free to share a few thoughts about the interface for generating the test cases :-).
As a new user of this code pipeline, I want to implement only the part of a test generator that describes the actual test case such that I don't need to focus on the test execution and reporting.
Suggestions for refactoring:
- Factorize the interface of the test generators into an abstract base class (e.g.,
start
and__init__
methods) which have to be implemented by the test generators. - Use dependency injection for
road_points
in thestart
method:
def start(road_points):
# add points to `road_points`
- In case of multiple tests the data structure of
road_points
could look likeroad_points = [test1_list_of_points, test2_list_of_points]
- Extract the code for the test execution.
- Extract the code for reporting the test outcome.
These are just my thoughts. What do you think about this design option? Do you see some drawbacks in this?