jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Gouchtchine <guserl...@gmail.com>
Subject Re: JMeter and Selenium
Date Thu, 24 Mar 2016 16:23:49 GMT
I unexpectedly solved the issue. Maven builds and runs tests without any
conflicts after I have pushed httpclient dependency at the top of the
pom.xml file:

<dependencies>

     <dependency>
     <groupId>org.apache.httpcomponents</groupId>
     <artifactId>httpclient</artifactId>
     <version>4.5.2</version>
    </dependency>

    <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
     <version>4.12</version>
     <scope>test</scope>
    </dependency>
    <dependency>
     <groupId>org.seleniumhq.selenium</groupId>
     <artifactId>selenium-java</artifactId>
     <version>2.52.0</version>
    </dependency>
    <dependency>
     <groupId>org.apache.jmeter</groupId>
     <artifactId>ApacheJMeter_core</artifactId>
     <version>2.13</version>
    </dependency>
    <dependency>
     <groupId>org.apache.jmeter</groupId>
     <artifactId>ApacheJMeter_java</artifactId>
     <version>2.13</version>
    </dependency>

On Thu, Mar 24, 2016 at 11:48 AM, Pavel Gouchtchine <guserlist@gmail.com>
wrote:

> Thank you all for help.
> Do you have an idea when JMeter 3.0 is coming?
> Pavel
>
> On Wed, Mar 23, 2016 at 8:10 PM, Steven Swor <sworisbreathing@gmail.com>
> wrote:
>
>> Hi Pavel,
>>
>> You might also consider using the WebDriver plugins from
>> jmeter-plugins.org
>> As it's a third-party plugin, you won't be able to get support for it on
>> this mailing list, but they have their own support forums.
>>
>> Cheers,
>> Steve
>>
>> On Thu, Mar 24, 2016 at 7:49 AM, Philippe Mouawad <
>> philippe.mouawad@gmail.com> wrote:
>>
>> > Hello,
>> > JMeter 3.0 will upgrade HttpClient to 4.5.X which should solve your
>> issue.
>> > An option is to use it:
>> >
>> >
>> https://repository.apache.org/content/repositories/snapshots/org/apache/jmeter/
>> >
>> >
>> > For now, your workaround should be fine but be aware that this
>> > configuration is not supported and that there are bugs you will face
>> (that
>> > were fixed as part of JMeter 3.0 migration to HttpClient 4.5.X).
>> >
>> > Regards
>> >
>> > On Wed, Mar 23, 2016 at 9:43 PM, Pavel Gouchtchine <guserlist@gmail.com
>> >
>> > wrote:
>> >
>> > > Hi All,
>> > > here is short summary of my problem:
>> > > I am developing a class for JavaSample that calls RemoteWebDriver
>> > > class from the latest selenium (2.52).
>> > >
>> > > Running the junit tests result the following error:
>> > > java.lang.NoClassDefFoundError: org/apache/http/config/RegistryBuilder
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:69)
>> > >
>> > > more stacktrace at the bottom of this message.
>> > >
>> > > In my current pom has the following dependencies:
>> > > <dependency>
>> > >      <groupId>org.seleniumhq.selenium</groupId>
>> > >      <artifactId>selenium-java</artifactId>
>> > >      <version>2.52.0</version>
>> > >     </dependency>
>> > >     <dependency>
>> > >      <groupId>org.apache.jmeter</groupId>
>> > >      <artifactId>ApacheJMeter_core</artifactId>
>> > >      <version>2.13</version>
>> > >     </dependency>
>> > >     <dependency>
>> > >      <groupId>org.apache.jmeter</groupId>
>> > >      <artifactId>ApacheJMeter_java</artifactId>
>> > >      <version>2.13</version>
>> > >     </dependency>
>> > >
>> > >
>> > > Removing ApacheJMeter* depenndecies from pom file makes calls to
>> > > RemoteWebDriver succeed.
>> > >
>> > >
>> > > Similar problem with the RemoteWebDriver using BeanShell was solved by
>> > > replacing HttpClient 4.2.6 files with HttpClient 4.5.2.
>> > >
>> > > I understand that JMeter and Selenium are absolutely unrelated to each
>> > > other. I am just looking for an advice.
>> > > Is there any possible options you can suggest to resolve the issue
>> with
>> > > dependencies?
>> > >
>> > >
>> > >
>> > > java.lang.NoClassDefFoundError: org/apache/http/config/RegistryBuilder
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.internal.HttpClientFactory.getClientConnectionManager(HttpClientFactory.java:69)
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:57)
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.internal.HttpClientFactory.<init>(HttpClientFactory.java:60)
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.getDefaultHttpClientFactory(ApacheHttpClient.java:252)
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.internal.ApacheHttpClient$Factory.<init>(ApacheHttpClient.java:229)
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:96)
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:70)
>> > >  at
>> > >
>> > >
>> >
>> org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:58)
>> > >  at
>> > >
>> >
>> org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:158)
>> > >  at
>> > >
>> > >
>> >
>> com.ctc.jmeter.extentions.RemoteWebDriverFactory.createRemoteWebdriver(RemoteWebDriverFactory.java:13)
>> > >  at
>> > >
>> > >
>> >
>> com.ctc.jmeter.extentions.RemoteWebDriverFactory.createRemoteChromeDriver(RemoteWebDriverFactory.java:54)
>> > >  at
>> > >
>> > >
>> >
>> com.ctc.jmeter.extentions.RemoteDriverTest.testChromeRemoteDriver(RemoteDriverTest.java:73)
>> > >  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > >  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> > >  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> > >  at java.lang.reflect.Method.invoke(Unknown Source)
>> > >  at
>> > >
>> > >
>> >
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>> > >  at
>> > >
>> > >
>> >
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>> > >  at
>> > >
>> > >
>> >
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>> > >  at
>> > >
>> > >
>> >
>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>> > >  at
>> > >
>> > >
>> >
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>> > >  at
>> > >
>> >
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>> > >  at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>> > >  at
>> > >
>> > >
>> >
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>> > >  at
>> > >
>> > >
>> >
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>> > >  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>> > >  at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>> > >  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>> > >  at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>> > >  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>> > >  at
>> > >
>> > >
>> >
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
>> > >  at
>> > >
>> >
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>> > >  at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>> > >  at
>> > >
>> > >
>> >
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
>> > >  at
>> > >
>> > >
>> >
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>> > >  at
>> > >
>> > >
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
>> > >  at
>> > >
>> > >
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
>> > >  at
>> > >
>> > >
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
>> > >  at
>> > >
>> > >
>> >
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
>> > > Caused by: java.lang.ClassNotFoundException:
>> > > org.apache.http.config.RegistryBuilder
>> > >  at java.net.URLClassLoader.findClass(Unknown Source)
>> > >  at java.lang.ClassLoader.loadClass(Unknown Source)
>> > >  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>> > >  at java.lang.ClassLoader.loadClass(Unknown Source)
>> > >  ... 39 more
>> > >
>> >
>> >
>> >
>> > --
>> > Cordialement.
>> > Philippe Mouawad.
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message