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

Give tests some love and move them >18 years forward #23507

Closed
9 tasks done
dmatej opened this issue Jul 5, 2021 · 0 comments · Fixed by #23889
Closed
9 tasks done

Give tests some love and move them >18 years forward #23507

dmatej opened this issue Jul 5, 2021 · 0 comments · Fixed by #23889
Assignees
Milestone

Comments

@dmatej
Copy link
Contributor

dmatej commented Jul 5, 2021

Problem Description

Before we start some more rapid development, we should get the best from existing tests. So the target of this issue is to do what is possible:

  • Migrate to JUnit5
  • hk2-junitrunner is probably obsoleted, investigate alternatives
  • Clean up test dependencies (junit4 is everywhere implicitly even if unused)
  • Transform TestNG tests to JUnit5 (not maintained for a long time)
  • Resuscitate or delete disabled tests if possible (may have it's own issues, it depends on future analysis and some future plan depending on result of previous steps)
  • Integrate maven profile to run tests with JaCoCo (target: to see lines uncovered by any test, detect risks and be able to improve the state)
  • Burial of console-devtests maven project (uses obsoleted selenium and firefox, unused too long)
  • Resuscitate nucleus-tests
  • Resuscitate appserver/tests/... + quicklook

Impact of Issue

  • better coverage
  • more capabilities - ordering, parallel assertions
  • maintenance

Notes

This issue will be probably updated later as I don't see all consequences and targets yet, but from my experience they will be visible soon.

dmatej added a commit to dmatej/glassfish that referenced this issue Jul 5, 2021
- test-utils are an exception of the rule
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 5, 2021
- JUnit4 depends on old hamcrest, but is compatible even with the new one
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 5, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 5, 2021
- with these fixes tests passed also in Eclipse editor, not just on command line
- envProperties can be null (no asenv.conf used)
- RepositoryConfig - contains suspicious code, I'm not changing the behavior
  despite it looks like a bug until I will have tests for clusters
- StringSubstitutionEngine - inputStream field was unused except constructor
- StringSubstitutionParser - javadoc now mentions that stream is closed after
  parsing
@dmatej dmatej self-assigned this Jul 9, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 20, 2021
- test-utils are an exception of the rule
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 20, 2021
- JUnit4 depends on old hamcrest, but is compatible even with the new one
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 20, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 20, 2021
- with these fixes tests passed also in Eclipse editor, not just on command line
- envProperties can be null (no asenv.conf used)
- RepositoryConfig - contains suspicious code, I'm not changing the behavior
  despite it looks like a bug until I will have tests for clusters
- StringSubstitutionEngine - inputStream field was unused except constructor
- StringSubstitutionParser - javadoc now mentions that stream is closed after
  parsing
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 30, 2021
- test-utils are an exception of the rule
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 30, 2021
- JUnit4 depends on old hamcrest, but is compatible even with the new one
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 30, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 30, 2021
- with these fixes tests passed also in Eclipse editor, not just on command line
- envProperties can be null (no asenv.conf used)
- RepositoryConfig - contains suspicious code, I'm not changing the behavior
  despite it looks like a bug until I will have tests for clusters
- StringSubstitutionEngine - inputStream field was unused except constructor
- StringSubstitutionParser - javadoc now mentions that stream is closed after
  parsing
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 30, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 30, 2021
…vice module

- to the phase process-classes, which is closer to the compilation.
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 30, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Jul 30, 2021
- just the RestTest was moved under the admin module because it tests admin's
  endpoint
- these tests will be rewritten soon in much better way
- currently they were not executed
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
- just the RestTest was moved under the admin module because it tests admin's
  endpoint
- these tests will be rewritten soon in much better way
- currently they were not executed
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
- first is used to extend surefire/failsafe plugins and collect information
  about the test coverage. Results can be imported to Eclipse.
- second is used to collect results from all subdirectories and merge them
  to one file. This can be used to view which code is not invoked by any test
  in the build.
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
- first is used to extend surefire/failsafe plugins and collect information
  about the test coverage. Results can be imported to Eclipse.
- second is used to collect results from all subdirectories and merge them
  to one file. This can be used to view which code is not invoked by any test
  in the build.
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
- test-utils are an exception of the rule
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
- JUnit4 depends on old hamcrest, but is compatible even with the new one
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
- with these fixes tests passed also in Eclipse editor, not just on command line
- envProperties can be null (no asenv.conf used)
- RepositoryConfig - contains suspicious code, I'm not changing the behavior
  despite it looks like a bug until I will have tests for clusters
- StringSubstitutionEngine - inputStream field was unused except constructor
- StringSubstitutionParser - javadoc now mentions that stream is closed after
  parsing
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
…vice module

- to the phase process-classes, which is closer to the compilation.
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 1, 2021
- just the RestTest was moved under the admin module because it tests admin's
  endpoint
- these tests will be rewritten soon in much better way
- currently they were not executed
dmatej added a commit to dmatej/glassfish that referenced this issue Aug 2, 2021
- first is used to extend surefire/failsafe plugins and collect information
  about the test coverage. Results can be imported to Eclipse.
- second is used to collect results from all subdirectories and merge them
  to one file. This can be used to view which code is not invoked by any test
  in the build.
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
- wsdl variable can be null
- reproduced by some test enabled in recent commits
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
- fixes issue reproducible by some of naming_all tests when using
  cluster instances
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
- respects some externally set env properties
- removes glassfish before execution
- detects glassfish version automatically
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
- bug was reproducible by several tests from recent commits
- removed endorsed as it is not supported any more
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
…everal bugs

- reproducible by several tests enabled in recent commits
- removed incorrect wrapping of zip into zip
- fixed error message, reported input file as an output
- fixed closing streams
- fixed removing corrupted files (stream could be still open)
- fixed behavior when the glassfish-acc.xml file is missing
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
- lazy init, but then crashed
- MEJB is not supported any more, see specification of Jakarta EE 9.1
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 3, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 4, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 5, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Mar 5, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 4, 2022
…nabled

Signed-off-by: David Matějček <dmatej@seznam.cz>
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 4, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 4, 2022
- now they detect bugs, see next commits
- 2 tests are reproducers of bugs I could not fix easily
- new test dependency - ShrinkWrap

Signed-off-by: David Matějček <dmatej@seznam.cz>
@dmatej dmatej linked a pull request Apr 4, 2022 that will close this issue
arjantijms added a commit that referenced this issue Apr 4, 2022
#23507 Nucleus tests transformed to Admin tests
@dmatej dmatej added this to the 6.2.6 milestone Apr 5, 2022
@dmatej dmatej removed the In Progress label Apr 5, 2022
@dmatej dmatej closed this as completed Apr 5, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 6, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 6, 2022
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 13, 2022
…nabled

Signed-off-by: David Matějček <dmatej@seznam.cz>
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 13, 2022
# Conflicts:
#	appserver/tests/admin/tests/pom.xml
#	nucleus/tests/pom.xml

Signed-off-by: David Matějček <dmatej@seznam.cz>
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 13, 2022
- now they detect bugs, see next commits
- 2 tests are reproducers of bugs I could not fix easily
- new test dependency - ShrinkWrap

Signed-off-by: David Matějček <dmatej@seznam.cz>
dmatej added a commit to dmatej/glassfish that referenced this issue Apr 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 a pull request may close this issue.

1 participant