Is there a need to explicitly specify the Jenkins Test Harness version in 
your pom.xml?
I'd guess there is a version mismatch in the build due to that. So I would 
recommend to start from removing "<jenkins-test-harness.version>2.27
</jenkins-test-harness.version>" and re-running the build.

вторник, 19 декабря 2017 г., 21:22:23 UTC+1 пользователь chirag shah 
написал:
>
> Hi,
>
> I am developing test cases for one of my plugin.  Below is snipped code of 
> test case:
>
>>       
>>  JenkinsRule.WebClient webClient=rule.createWebClient();
>>        FreeStyleProject p = (FreeStyleProject) rule.jenkins.getItem(
>> "WebApp");
>>           
>>       HtmlPage page=  webClient.getPage(p,"configure");
>>
>> .
>
> I am always getting java.lang.NoClassDefFoundError: Could not initialize 
> class com.gargoylesoftware.htmlunit.util.EncodingSniffer . I have checked 
> dependency jenkins-test-harness-htmlunit and it has same class.
>
> I am having below jenkins and jenkins-test-harness version in my plugin:
>
>
>
>     <properties>
>         <jenkins.version>2.7.3</jenkins.version>
>         <java.level>8</java.level>
>         
>     <jenkins-test-harness.version>2.27</jenkins-test-harness.version>
>     </properties>
>
> Please help me if anybody has solution for it
>

-- 
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/cf67ac1f-cb1d-4575-84b8-f359396aeef9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to