Closed matyesz closed 6 years ago
The motivation for this is to solve NetCal/DiscoDNCext_MPARTC#6, I guess.
I do have another point in favor of this idea. We currently only provide tests for small networks that cover basic compositions of algebraic operations. For these networks, expected results were computed manually. In addition, I would like to add a set of tests consisting of larger, considerably more complex networks that test against the results of previous DiscoDNC versions. This is mostly targeted at testing tool feature (on contrast to DNC computations) such as convolution of alternative arrival bounds or a cache for intermediate results (see [1]). Yet, the networks used in [1] already come at a size of 37MB.
[1] Quality and Cost of Deterministic Network Calculus – Design and Evaluation of an Accurate and Fast Analysis (Steffen Bondorf, Paul Nikolaus, Jens B. Schmitt), In Proceedings of the ACM on Measurement and Analysis of Computing Systems (POMACS), ACM, volume 1, 2017.
Let me clean the tests to use purely junit5. At the moment it is mixed with junit4 (suites like FF_tests that are not even ran during mvn test phase). First clean this up then add the transitivity. Even the surefire plugin must be used in a total different way when using junit 5 thus dependencies can be cleaned a bit more. https://junit.org/junit5/docs/current/user-guide/#running-tests-build-maven Still we have to keep the Suites, as this is the only possibility to run the test cases that are common in both projects without copying the full java package.
//Pure junit5 test suite @ExtendWith(TestTimer.class) @SelectClasses({LinkedListTest_add.class, LinkedListTest_remove.class}) public class TestSuite
Investigation done. Results: junit5 does not support test suites at the moment but junit4 launcher does not run junit5 annotated test cases. We have 2 possibilities:
Parent module is not even needed, a separate it project would do it. What do you think?
If Maven's multi module capabilities automate assembly of Core and extensions in order to run the tests (that is how I understand it), I am in favor of this alternative. That will work with locally installed extensions as well, right? As the MPA RTC toolbox is not in the Maven Central Repository, we will not be able to push the extension there either.
Yes, when maven does the build it will compile both core and extension then runs integration tests automatically. If mvn test is ran the same happens. You will also be able to build the projects separately with their own junit test in this case integration tests are not ran. It will if a parent pom is added and the test module is installed next to the extension. Core can remain just a dependency. We joust have to find out whether we will include an aggregator project (parent pom) or each developer must create their own one according to their project setup.
Could you create repositories for tests and the parent?
Sure. https://github.com/NetCal/DiscoDNC_tests https://github.com/NetCal/DiscoDNC_meta (naming is inspired by linux distribution package naming)
Refactoring complete after these pull requests: https://github.com/NetCal/DiscoDNC/pull/19 https://github.com/NetCal/DiscoDNC_tests/pull/2 https://github.com/NetCal/DiscoDNCext_MPARTC/pull/7
There's still a branch called #17_make_tests_transitive. Can we delete it?
Done.
Tests should not be copied through dependent projects but should be available as a dependency.