Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current Test Suite is Hard to Maintain #74

Open
ogiorgil opened this issue Mar 7, 2024 · 1 comment
Open

Current Test Suite is Hard to Maintain #74

ogiorgil opened this issue Mar 7, 2024 · 1 comment
Assignees

Comments

@ogiorgil
Copy link
Contributor

ogiorgil commented Mar 7, 2024

  • Some tests, such as AlmostE2ETest.java, contains variables that point to local files and database connections that needs to be hosted locally. These variables are not used, but it can create confusion to how the tests actually work.
  • Many tests, such as PreAnalyzerTest.java, do not contain assertions and instead prints out certain outputs. This is unreliable as the test will always pass, even if the outputs are wrong. Assertions should be used instead of prints.
  • Some tests, such as RangeAnalyzerTest.java, have unfinished FIXMEs which renders the test useless.
  • And more similar issues in most test codes.
@luthfibalaka
Copy link
Contributor

In PreAnalyzerTest.java, I actually added new tests for spatial patterns in this PR: 75. For legacy tests, I think some of them might not be needed anymore (?)

For AlmostE2ETest.java, I guess it is intended for end-to-end test with external database. Maybe we need to modify it to utilize local database (e.g., in CSV format)?

I also want to add an issue with LabelAnalyzerTest.java, I think there is a problem with the JUnit version. The project uses JUnit 4, while the test presumably uses JUnit 5. Consequently, the test could not be run correctly.

For other tests, should we convert them to unit tests (each test correspond to a certain module) or let them be as is and adapt them to utilize assertion, mock, etc. if needed?

cc: @snowgy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants