Defines test harness for Jenkins core and plugins that you can use during the mvn test
phase.
See wiki page
- JENKINS-50598: ability to run
JenkinsRule
-based tests with a custom WAR file. - JENKINS-50590: fix combination of crumbs with existing request parameters.
- Improved
RestartableJenkinsRule.simulateAbruptShutdown
.
- JENKINS-50476:: offer a way to assert that Jenkins won't start
Burned
- Added
CLICommandInvoker.Result.stdoutBinary
and.stderrBinary
. - Deprecated
PresetData
.
RestartableJenkinsRule
utilities to simulate abrupt (i.e., unplanned) shutdowns.
- Added
LoggerRule.recordPackage
as a convenience. - Added
LoggerRule.recorded
methods returning matchers to simplify checking for log records. - Added
WebClient.withBasicCredentials
and.withBasicApiToken
methods to simplify passing authentication to REST requests as an alternative to.login
. waitOnline
withJNLPLauncher
failed rather than waiting.- Do not even try to persist an
Authentication
via XStream.
- Introduced
RestartableJenkinsRule.createJenkinsRule
. - Changed
JenkinsRule.createComputerLauncher
to return the more generic typeComputerLauncher
rather thanCommandLauncher
.
- Avoiding
JenkinsRule
plugin setup error involving excluded optional transitive dependencies.
- Introduced
JenkinsRule.waitOnline
, improving diagnostics forcreateSlave
andcreateOnlineSlave
. - Issue a friendlier warning for a harmless
@TestExtension
binary incompatibility issue.
- Fixing a regression in
LoggerRule
in 2.26, and improving log appearance further.
- JENKINS-45245: work around incorrect Maven test classpath in IntelliJ IDEA.
- More readable timestamps in log messages during tests.
- Adjust Jetty configuration to use a fixed number of “acceptors” and “selectors”. This has been observed to fix JENKINS-43666-like test failures in some CI environments, depending on the reported number of CPU cores.
- Improve display of messages when using
LoggerRule
.
- More reliable test timeout system in
JenkinsRule
.
- Added
RestartableJenkinsRule.then
with a Java 8-friendly signature. - Upgrade to Jetty 9.4.
- JENKINS-41631: removing the Maven Embedder dependency from the harness.
- JENKINS-44453:
JenkinsRule
should ensure that Jenkins reaches theCOMPLETED
milestone.
- Make
FakeChangeLogSCM
supportRun
rather than justAbstractBuild
.
- Fixed a regression in 2.20 affecting especially
InjectedTest
on Jenkins 2.x.
- “Detached” plugins in Jenkins 2.x are no longer loaded implicitly during tests. You should declare
test
-scoped dependencies on plugins you expect to use during your tests, in the desired versions.TestPluginManager.installResourcePlugin
has been removed, andinstallDetachedPlugin
added for unusual cases. - Avoid using methods deleted in newer version of HtmlUnit.
waitForMessage
can fail immediately if the build is completed.- Possible to override
JenkinsRule.createWebServer
more easily. - Deprecating
CLICommandInvoker.authorizedTo
in favor of a simplerasUser
. - Make Jetty be quiet during functional tests.
- Pick up
jetty-io
andjetty-util
from our specified version to avoid conflicts.
- Introduced
allowSoft
parameter toassertGC
. - Avoid any fixed timeout on
waitUntilNoActivity
.
- Fixed
JenkinsComputerConnectorTester
soComputerConnector
s can be tested throughJenkinsRule.configRoundTrip
. - Improved
MemoryAssert.assertGC
: now catches more root references, and can run with the environment variableASSERT_GC_VERBOSE=true
to track downSoftReference
leaks. - Better report
java.lang.IllegalArgumentException: URI is not hierarchical
; generally this is a symptom of a plugin missing a rootindex.jelly
.
JenkinsRule.getLog
fixed to make fewer assumptions about the implementation ofRun.getLogText
.
Not recorded.