Skip navigation links
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Classes
  • Annotation Interfaces
  • Fields
  • Methods
  • Constructors
  • Deprecated Classes
    Class
    Description
    hudson.slaves.NodeProvisionerRule
    use RealJenkinsRule
    jenkins.model.JenkinsAdaptor
    use Jenkins.setQuietPeriod(java.lang.Integer)
    org.jvnet.hudson.test.GroovyHudsonTestCase
    Use GroovyJenkinsRule instead.
    org.jvnet.hudson.test.HudsonTestCase
    New code should use JenkinsRule.
    org.jvnet.hudson.test.recipes.WithTimeout.RunnerImpl
    New code should use JenkinsRule.
    org.jvnet.hudson.test.RestartableJenkinsRule
    New code should use JenkinsSessionRule. RestartableJenkinsRule will evaluate your test method to collect all steps, then execute them in turn and restart Jenkins in between each step, after the test method has exited. That is probably not what you would expect from looking at sources, and it will not work naturally with After etc. Tests needing to dynamically disable plugins, simulate crashes, etc. are better written using RealJenkinsRule.
    org.jvnet.hudson.test.SecuredMockFolder
    Use MockAuthorizationStrategy plus MockFolder instead.
  • Deprecated Annotation Interfaces
    Annotation Interface
    Description
    org.jvnet.hudson.test.RandomlyFails
    Using a 2.x parent POM, Surefire will be configured to retry failing tests automatically. If the test fails consistently, Ignore it.
    org.jvnet.hudson.test.recipes.PresetData
    Authentication modes are better defined in code using JenkinsRule.createDummySecurityRealm() and MockAuthorizationStrategy.
  • Deprecated Fields
    Field
    Description
    org.jvnet.hudson.test.HudsonTestCase.useLocalPluginManager
    Use HudsonTestCase.pluginManager
    org.jvnet.hudson.test.JenkinsRule.hudson
    org.jvnet.hudson.test.JenkinsRule.useLocalPluginManager
    Use JenkinsRule.pluginManager
  • Deprecated Methods
    Method
    Description
    hudson.cli.CLICommandInvoker.authorizedTo(Permission...)
    Rather use CLICommandInvoker.asUser(java.lang.String).
    hudson.cli.CLICommandInvoker.user()
    only used with CLICommandInvoker.authorizedTo(hudson.security.Permission...)
    org.jvnet.hudson.test.ExtractResourceWithChangesSCM.saveToChangeLog(File, ExtractChangeLogParser.ExtractChangeLogEntry)
    use ExtractResourceWithChangesSCM.saveToChangeLog(File, Charset, ExtractChangeLogParser.ExtractChangeLogEntry)
    org.jvnet.hudson.test.HudsonTestCase.WebClient.getPage(String)
    This method expects a full URL. This method is marked as deprecated to warn you that you probably should be using HudsonTestCase.WebClient.goTo(String) method, which accepts a relative path within the Hudson being tested. (IOW, if you really need to hit a website on the internet, there's nothing wrong with using this method.)
    org.jvnet.hudson.test.InboundAgentRule.AgentArguments.agentJnlpUrl()
    org.jvnet.hudson.test.InboundAgentRule.Options.Builder.secret()
    secret is used by default when using newer versions of Remoting
    org.jvnet.hudson.test.InboundAgentRule.Options.isSecret()
    secret is used by default when using newer versions of Remoting
    org.jvnet.hudson.test.JenkinsRule.createTmpDir()
    Use TemporaryFolder instead.
    org.jvnet.hudson.test.JenkinsRule.setQuietPeriod(int)
    use Jenkins.setQuietPeriod(java.lang.Integer)
    org.jvnet.hudson.test.JenkinsRule.WebClient.getPage(String)
    This method expects a full URL. This method is marked as deprecated to warn you that you probably should be using JenkinsRule.WebClient.goTo(String) method, which accepts a relative path within the Hudson being tested. (IOW, if you really need to hit a website on the internet, there's nothing wrong with using this method.)
    org.jvnet.hudson.test.MemoryAssert.assertGC(WeakReference<?>)
    org.jvnet.hudson.test.RestartableJenkinsRule.addStep(Statement)
    Use RestartableJenkinsRule.then(org.jvnet.hudson.test.RestartableJenkinsRule.Step) instead.
    org.jvnet.hudson.test.RestartableJenkinsRule.addStep(Statement, boolean)
    Use RestartableJenkinsRule.then(org.jvnet.hudson.test.RestartableJenkinsRule.Step) or RestartableJenkinsRule.thenDoesNotStart() instead.
    org.jvnet.hudson.test.RestartableJenkinsRule.addStepWithDirtyShutdown(Statement)
    Use RestartableJenkinsRule.thenWithHardShutdown(org.jvnet.hudson.test.RestartableJenkinsRule.Step) instead.
    org.jvnet.hudson.test.RestartableJenkinsRule.step(Closure<?>)
    Use RestartableJenkinsRule.then(org.jvnet.hudson.test.RestartableJenkinsRule.Step) instead.
    org.jvnet.hudson.test.RunLoadCounter.prepare(LazyBuildMixIn.LazyLoadingJob<?, ?>)
    No longer needed.
  • Deprecated Constructors
    Constructor
    Description
    org.jvnet.hudson.test.InboundAgentRule.AgentArguments(String, File, String, int, List<String>)
    org.jvnet.hudson.test.MockQueueItemAuthenticator(Map<String, Authentication>)
    use MockQueueItemAuthenticator() plus MockQueueItemAuthenticator.authenticate(java.lang.String, org.springframework.security.core.Authentication)
    org.jvnet.hudson.test.TemporaryDirectoryAllocator(File)

Copyright © 2004–2025. All rights reserved.