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

Mavenenize project #28

Open
axkr opened this issue Jun 28, 2021 · 5 comments
Open

Mavenenize project #28

axkr opened this issue Jun 28, 2021 · 5 comments

Comments

@axkr
Copy link

axkr commented Jun 28, 2021

Please create a Maven github action to automatically test and build a JAR for every commit:

Define Maven pom.xml

Define Maven folder structure:

  • /src/main/java
  • /src/main/ressources
  • /src/test/java
  • /src/main/ressources

Move JUnit dependencies to Maven test scope only

@TilmanNeumann
Copy link
Owner

Yes, that would be recommendable. But priority is low for me.

@TilmanNeumann
Copy link
Owner

A side note: For this kind of software, performance bugs are almost as much a bug as compiler errors. And they are harder to detect and need special testing. My performance tests are typically open end (on factor argument size) and terminated by the developer (me) when he has seen enough. This may take a long time, typically hours, sometimes days. So performance tests are not very well-suited to CI tests, I would say. Unless you convince me otherwise ;-)

@axkr
Copy link
Author

axkr commented Jul 15, 2021

Don't know your requirements exactly, but there are tools for these cases.

For example:

@TilmanNeumann
Copy link
Owner

Thanks for pointing out. Don't see though how that approach could handle large test runtimes appropriately.

@HannesWell
Copy link

For testing smaller but performance sensitive parts of the code I recommend using the Java Microbenchmarking Harness - JMH:

It is created by the developers of the openJDK them self, so I assume it is very sophisticated and reliable.

It is mainly distributed as Maven project and then quite straight forward to set it up. The following is one guide, but there are plenty others in the internet:
https://www.baeldung.com/java-microbenchmark-harness

If you can relay on JMH it could speed up your performance tests significantly. You could even run them in the CI, but then it should be ensured that for each run the same hardware is used to get comparable results.

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

No branches or pull requests

3 participants