From de7bbfdb2d099e330fdf3d4217dd0ad5400625b8 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Fri, 14 May 2010 17:03:43 +0000 Subject: [PATCH] added another convenience method. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@31038 71c3de6d-444a-0410-be80-ed276b4c234a --- .../java/org/jvnet/hudson/test/HudsonTestCase.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java index 6387203829..1bf2225b46 100644 --- a/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java +++ b/test/src/main/java/org/jvnet/hudson/test/HudsonTestCase.java @@ -653,6 +653,16 @@ public abstract class HudsonTestCase extends TestCase implements RootAction { return new WebClient().search(q); } + /** + * Loads a configuration page and submits it without any modifications, to + * perform a round-trip configuration test. + * @see http://wiki.hudson-ci.org/display/HUDSON/Unit+Test#UnitTest-Configurationroundtriptesting + */ + protected

P configRoundtrip(P job) throws Exception { + submit(createWebClient().getPage(job,"configure").getFormByName("config")); + return job; + } + /** -- GitLab