Re: How do I get the test harness to include the plugin under development?

2016-04-07 Thread Jesse Glick
On Mon, Apr 4, 2016 at 6:32 AM,   wrote:
> I can get to the global configuration page but when I look in the config
> form for my plugin settings it's not there.

Some problem in your plugin, or perhaps your test, not the test harness.

> I've tried:
>
> @WithPlugin("DownloadPackageBuilder.hpi")

You do not need that. Plugins in the test classpath, including the
owner of the test, are always enabled.

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3WvX6MvoTAu3ucbOHoaoU5S-m_fi%3DiJmduPASRde6O7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How do I get the test harness to include the plugin under development?

2016-04-05 Thread andrew . sumner
I'm trying to write a unit test that will exercise the UI for my plugin and 
to do that I need to configure it's global properties.

I can get to the global configuration page but when I look in the config 
form for my plugin settings it's not there.  The wiki only touches this 
area very lightly so it's not been much help.

The offending bit of code is in: 
https://github.com/andrew-sumner/inedo-proget-plugin/blob/master/src/test/java/com/inedo/proget/jenkins/DownloadPluginTests.java

@Rule
public JenkinsRule j = new JenkinsRule()

@Test
public void perform() {
HtmlPage globalConfigPage = 
j.createWebClient().webClient.goTo("configure");

HtmlForm form = globalConfigPage.getFormByName("config");

// My plugins global properties are not found
HtmlInput password = form.getInputByName("_.password");


I've tried:

   - @WithPlugin("DownloadPackageBuilder.hpi") 

This issue: https://issues.jenkins-ci.org/browse/JENKINS-29181 suggests 
that I should be able to do this with 
@WithPlugin("DownloadPackageBuilder.hpi") if I can get the plugin into the 
plugins folder but doesn't have any ideas on how this might be achieved.


   - j.recipeLoadCurrentPlugin();

This looked promising but didn't work - possibly because I am using the 
Gradle JPI plugin: 
https://wiki.jenkins-ci.org/display/JENKINS/Gradle+JPI+Plugin


Any idea on what I might be missing?


-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/2bcda835-d4ba-493e-8cf8-c114f18270da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.