Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Factorize interface for test generators #60

Open
ChristianBirchler opened this issue Feb 1, 2021 · 1 comment
Open

Factorize interface for test generators #60

ChristianBirchler opened this issue Feb 1, 2021 · 1 comment
Labels
question Further information is requested refactoring

Comments

@ChristianBirchler
Copy link

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?

@alessiogambi alessiogambi added question Further information is requested refactoring labels Feb 1, 2021
@alessiogambi
Copy link
Contributor

@ChristianBirchler Thanks for the suggestions! We'll look into them ASAP

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested refactoring
Projects
None yet
Development

No branches or pull requests

2 participants