tool-competition-av icon indicating copy to clipboard operation
tool-competition-av copied to clipboard

Factorize interface for test generators

Open ChristianBirchler opened this issue 3 years ago • 1 comments

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 the start method:
def start(road_points):
  # add points to `road_points`
  • In case of multiple tests the data structure of road_points could look like road_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?

ChristianBirchler avatar Feb 01 '21 09:02 ChristianBirchler