Skip to content

Make all the tests great again #3941

@maxonfjvipon

Description

@maxonfjvipon

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:

  1. all the tests that use Farea are moved to integration ones (we use maven-failsafe-plugin for it) since they rather slow
  2. all the integration tests are annotated with @MayBeSlow
  3. all the static literals are removed from all the tests (if it's possible)
  4. only one assert per test (yes, many tests must be divided into a several ones)
  5. 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
  6. all the test have assertion messages
  7. each test has different input
  8. logs are not tested
  9. to be continued...

Please don't make a huge PRs. Micro changes are very welcome!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions