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