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

WIP Re-enable accidentially disabled integration tests #124

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

darxriggs
Copy link
Contributor

@darxriggs darxriggs commented Apr 26, 2020

The culprit is commit 9580862 when switching from HudsonTestCase to JenkinsRule. The rule has to be used as a JUnit 4 rule inside a test. It is different to JUnit 3 and cannot be used as a base class. As no JUnit 3 base class is used anymore the JUnit 4 runner kicks in and only detects methods annotated with @Test as test methods. JUnit 3 was using the prefix "test" in method names to detect test methods.

The temporary folder has to be provided as absolute path. Otherwise Jenkins.checkRawBuildsDir fails with a message like this:
"jenkins.model.InvalidBuildsDir: ${ITEM_ROOTDIR}/builds does not resolve to an absolute path"

Many tests still fail because running the Javascript code fails reporting a missing "each" function.

TODO
Can you please have a look at the failing tests and provide further information on how to fix these or even add commits for it?

@darxriggs darxriggs force-pushed the fix-disabled-integration-tests branch 3 times, most recently from 38d12bf to 12af05c Compare April 26, 2020 17:11
The culprit is commit 9580862 when switching
from HudsonTestCase to JenkinsRule. The rule has to be used as a JUnit 4 rule
inside a test. It is different to JUnit 3 and cannot be used as a base class.
As no JUnit 3 base class is used anymore the JUnit 4 runner kicks in and only
detects methods annotated with `@Test` as test methods. JUnit 3 was using the
prefix "test" in method names to detect test methods.

The temporary folder has to be provided as absolute path.
Otherwise `Jenkins::checkRawBuildsDir` fails with a message like this:
"jenkins.model.InvalidBuildsDir: ${ITEM_ROOTDIR}/builds does not resolve to an absolute path"

`WebClient::goTo` now takes a relative instead of an absolute URL.

Triggering the "change" event on HTML form inputs now requires a bit
more plumbing.

Many tests fail because running the Javascript code fails reporting
a missing "each" function.
@darxriggs darxriggs force-pushed the fix-disabled-integration-tests branch from 12af05c to 6da487e Compare October 26, 2021 19:42
darxriggs referenced this pull request Oct 26, 2021
…m. Fix a bug with hide version changes label not being displayed.
@darxriggs
Copy link
Contributor Author

@NotMyFault Maybe you are interested in activating these integration tests again. I am not planning to continue on this PR.

It think there is still quite some work to do:

  • rebase the existing changes onto master and resolve the merge conflicts
  • investigate why some tests started to fail and how to fix it

@NotMyFault
Copy link
Member

@NotMyFault Maybe you are interested in activating these integration tests again. I am not planning to continue on this PR.

It think there is still quite some work to do:

  • rebase the existing changes onto master and resolve the merge conflicts
  • investigate why some tests started to fail and how to fix it

To be fair, I didn't look much into tests yet, considering this plugin uses fairly dated dependencies, especially for tests, see mockito 1.10 for example (or the other failing dependabot prs).
If someone wants to update tests, the better approach would be to bump the baseline to a reasonable jenkins version and use the dependencies via bom while updating tests in the same run, instead of listing all test dependencies separately, I guess?

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.

2 participants