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

Maven integration test refactoring #5252

Merged
merged 16 commits into from May 13, 2022
Merged

Conversation

bjhargrave
Copy link
Member

The integration tests for the Bnd maven plugins are refactored so that there are multiple integration tests per plugin instead of a single integration test having a reactor with multiple projects. The integration tests now use the normal maven conventions for directory and file names (e.g. src/it, postbuild).

This refactoring allows running individual tests rather than all the tests for a plugin. Using the invoker.properties files allows for tests to having individual goals and debug log level. It also allows for an individual test to be started in debug mode and wait for a debugger to attach. It allows for all tests to execute even if one fails.

The normal output from integration test execution is now minimal unless an error occurs in the test so the build output is much shorter.

bjhargrave added 16 commits May 12, 2022
src/it is the conventional location for maven-invoker-plugin
integration tests.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
prebuild and postbuild are the conventional names for
maven-invoker-plugin integration tests pre and post build scripts.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
We reduce the output of successful builds.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
This avoids the need to add dependencies to the maven-invoker-plugin.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
This avoids the need to define goals in maven-invoker-plugin
plugin configuration.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
Signed-off-by: BJ Hargrave <bj@hargrave.dev>
@rotty3000
Copy link
Contributor

wow, nice effort here...

@bjhargrave
Copy link
Member Author

wow, nice effort here...

I decided to learn how to properly do maven integration testing using maven-invoker-plugin for the new maven plugin I wrote for Eclipse Transformer. So I wanted to apply that knowledge here to improve Bnd's rather awkward integration testing setup.

@bjhargrave bjhargrave merged commit 81b1e84 into bndtools:master May 13, 2022
10 checks passed
@bjhargrave bjhargrave deleted the maven-it branch May 13, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants