Class GroovyHudsonTestCase

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.jvnet.hudson.test.HudsonTestCase
org.jvnet.hudson.test.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 Details

    • GroovyHudsonTestCase

      public GroovyHudsonTestCase()
      Deprecated.
  • Method Details

    • 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 StaplerRequest2 and StaplerResponse2.

      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.