Class GroovyHudsonTestCase

  • All Implemented Interfaces:
    hudson.ExtensionPoint, hudson.model.Action, hudson.model.ModelObject, hudson.model.RootAction, junit.framework.Test

    @Deprecated
    public abstract class GroovyHudsonTestCase
    extends HudsonTestCase
    Deprecated.
    Use GroovyJenkinsRule instead.
    HudsonTestCase with more convenience methods for Groovy.
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • GroovyHudsonTestCase

        public GroovyHudsonTestCase()
        Deprecated.
    • Method Detail

      • executeOnServer

        public Object executeOnServer​(groovy.lang.Closure<?> c)
                               throws Exception
        Deprecated.
        Executes the given closure on the server, in the context of an HTTP request. This is useful for testing some methods that require StaplerRequest and StaplerResponse.

        The closure will get the request and response as parameters.

        Throws:
        Exception
      • builder

        public hudson.tasks.Builder builder​(groovy.lang.Closure<?> c)
        Deprecated.
        Wraps a closure as a Builder.