Hi,

can anybody give me some advice how to write tests that reference a Jelly 
file and implement actions in the test class?
(With *HudsonTestCase* this works fine but with *JenkinsRule* I have no 
idea.)

Example:
*test/src/test/java/lib/form/NameRefTest.java*

It references *test/src/test/resources/lib/form/NameRefTest/test1.jelly* 
and also implements *doSubmitTest1*().

Just converting it to use *JenkinsRule* instead of *HudsonTestCase* results 
in a HTTP 404 error.

I could not really find out how the Jelly files and actions of a test class 
are registered for a test Jenkins. I have seen that JenkinsRule and 
HudsonTestCase implement RootAction and add itself to Jenkin's actions. But 
in case of JenkinsRule this does not work as the test class itself does not 
inherit from JenkinsRule.

If I implement *RootAction* in the test itself and add it to Jenkin's 
actions in a *@Before* method I can get it to work. But something else than 
*self* has to be used for *getUrlName()* because the *JenkinsRule* 
registers itself already under *self*.

I think *JenkinsRule* has to be altered in a way that such tests don't have 
to implement *RootAction* and add it to Jenkin's actions.

What's your suggestion?

Cheers
René

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/3cd3cdc7-9fee-4854-9b75-8201001a24cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to