Right now the tests in our project are not in very good condition, especially in eo-maven-plugin. There's a lot of clutter that needs to be fixed and refactored. Let's keep this ticket open until we fix all the tests in the projects.
What we want to achieve:
- all the tests that use
Farea are moved to integration ones (we use maven-failsafe-plugin for it) since they rather slow
- all the integration tests are annotated with
@MayBeSlow
- all the static literals are removed from all the tests (if it's possible)
- only one assert per test (yes, many tests must be divided into a several ones)
- assertions don't have hard-coded expected values and magic numbers/strings (if it's possible). Let's use variables for it. Instead of
Matchers.equalTo(5) let's do int expected = 5; Matchers.equalTo(expected). Also it would good to use the variable in assertion message where they're explained
- all the test have assertion messages
- each test has different input
- logs are not tested
- to be continued...
Please don't make a huge PRs. Micro changes are very welcome!
Right now the tests in our project are not in very good condition, especially in
eo-maven-plugin. There's a lot of clutter that needs to be fixed and refactored. Let's keep this ticket open until we fix all the tests in the projects.What we want to achieve:
Fareaare moved to integration ones (we usemaven-failsafe-pluginfor it) since they rather slow@MayBeSlowMatchers.equalTo(5)let's doint expected = 5; Matchers.equalTo(expected). Also it would good to use the variable in assertion message where they're explainedPlease don't make a huge PRs. Micro changes are very welcome!