Echtzeitsysteme / iflye

Incremental Fast Lightweight (y) virtual network Embedding framework
GNU General Public License v3.0
4 stars 2 forks source link

Refactor inherited test cases (e.g., VnePmMigration) #6

Open maxkratz opened 3 years ago

maxkratz commented 3 years ago

Currently, there are various test classes that inherit a super test class and just overwrite the method to create a new algorithm instance to test. As this is a bad coding style, one may refactor the test cases to parametrized tests to remove the high number of classes for each test case.

Example file: https://github.com/maxkratz/iflye/blob/1bc84da8d29f8ef0b6f89b848bca2d90db743fe0/test.suite/src/test/algorithms/pm/migration/VnePmMdvneAlgorithmMigrationTotalCommunicationCostATest.java#L21

maxkratz commented 3 years ago

Just a small update on this issue: This is only possible for (sub-)test classes that do not overwrite test cases of their parent classes.

Example: https://github.com/maxkratz/iflye/blob/fa3be77acb493b88dd5744f21cddae7727be79a2/test.suite/src/test/algorithms/pm/pipeline/VnePmMdvneAlgorithmPipelineTwoStagesRackATotalCommunicationCostATest.java#L27-L33