Error in nonguidriver jmeter

When reporting an issue: Java 1.8.0_131 (or Java 11) jmeter maven plugin 2.9.0 / jmeter 5.1.1 (default) (as well tried jmeter 5.3) Maven 3.6.0 Use basic pom.xml including plugin for Jsch and SSHSam...

You are mixing and matching different versions of dependencies from JMeter and then using a separate maven plugin to write stuff into the lib/ext directory, I’m not surprised this is not working.

If you want to control the version of JMeter used by the plugin you will need to do this:

https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Specifying-JMeter-Version#specifying-jmeter-version

If you don’t want to use the default list of JMeter artifacts pulled down by the plugin, you need to do it this way (If you are rolling back to an old version of JMeter that has a different artifact list, you will need to use this configuration to specify all the artifacts that should be copied across instead of the default list):

https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Specifying-JMeter-Version#specifying-jmeter-libraries

You should not use a <dependencies> block at all in the plugin configuration, we aren’t pulling in the dependencies associated with the plugin as we don’t know where we should put them if you want to add specific libraries into the lib, lib/ext or lib/junit directory you will need to do this (which it looks like you have started doing, but you have mixed it up with dependencies added in the <dependencies> block as well as using another plugin to copy files into the lib/ext dir which is giving you various different versions of the same file which JMeter will not like):

https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Adding-Excluding-libraries-to-from-the-classpath

You have also added lots of exclusions for transitive dependencies, this is not a good idea. Stuff is likely to break all over the place if transitive dependencies are missing. By default I would suggest removing your <excludedArtifacts> block because you probably really do want some of them. Newer versions of libraries are not always drop in replacements. Secondly if it’s the newer versions you are excluding, you may find out things are breaking because something is expecting the functionality added in the newer version of the library.

Your plugin config also has all the phases mixed up, you are trying to run the configuration goal in the verify phase, this makes no sense.

Finally the jmeter-analysis-maven-plugin is deprecated and no longer required, JMeter has built in reporting functionality now, you can enable it in the plugin, see:

https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Generating-Reports

Now on to what I think is the root cause of your issue, you are trying to pull down this dependency: org.apache.jmeter.protocol.ssh.sampler:jmeter-ssh-sampler:0.1.0

However it does not exist in maven central, see:

https://repo.maven.apache.org/maven2/org/apache/jmeter/

(there is no protocol directory).

If I clean up your plugin config and remove that dependency that does not exist, locally I can get JMeter up and running a test; here is that plugin config for you:

<plugin>
    <groupId>com.lazerycode.jmeter</groupId>
    <artifactId>jmeter-maven-plugin</artifactId>
    <version>3.4.0</version>
    <executions>
        <!-- Generate JMeter configuration -->
        <execution>
            <id>configuration</id>
            <goals>
                <goal>configure</goal>
            </goals>
        </execution>
        <!-- Run JMeter tests -->
        <execution>
            <id>jmeter-tests</id>
            <goals>
                <goal>jmeter</goal>
            </goals>
        </execution>
        <!-- Fail build on errors in test -->
        <execution>
            <id>jmeter-check-results</id>
            <goals>
                <goal>results</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <suppressJMeterOutput>false</suppressJMeterOutput>
        <testFilesDirectory>${project.basedir}/src/test/jmeter</testFilesDirectory>
        <testFilesIncluded>
            <jMeterTestFile>${jmeter.testfile}.jmx</jMeterTestFile>
        </testFilesIncluded>
        <testResultsTimestamp>true</testResultsTimestamp>
        <generateReports>true</generateReports>
        <jMeterProcessJVMSettings>
            <xms>64</xms>
            <xmx>64</xmx>
        </jMeterProcessJVMSettings>
        <propertiesJMeter>
            <jmeter.save.saveservice.response_data>true</jmeter.save.saveservice.response_data>
            <jmeter.save.saveservice.samplerData>true</jmeter.save.saveservice.samplerData>
            <jmeter.save.saveservice.requestHeaders>true</jmeter.save.saveservice.requestHeaders>
            <jmeter.save.saveservice.url>true</jmeter.save.saveservice.url>
            <jmeter.save.saveservice.responseHeaders>true</jmeter.save.saveservice.responseHeaders>
        </propertiesJMeter>
        <propertiesUser>
            <threadcount>${jmeter.threadcount}</threadcount>
            <duration>${jmeter.duration}</duration>
            <rampup>${jmeter.rampup}</rampup>
            <throughPut>${jmeter.throughput}</throughPut>
            <!--Hostname is passed during execution and can not be defaulted-->
            <hostname>${jmeter.hostname}</hostname>
        </propertiesUser>
        <jmeterExtensions>
            <artifact>kg.apc:jmeter-plugins-perfmon:2.1</artifact>
            <artifact>kg.apc:jmeter-plugins-casutg:2.4</artifact>
            <artifact>kg.apc:jmeter-plugins-extras-libs:1.4.0</artifact>
        </jmeterExtensions>
    </configuration>
</plugin>

The test I ran obviously doesn’t use any of the extensions, so I’m assuming they have been downloaded and configured correctly. This should be a good starting point for you.

Dependency configuration has changed in the 2.x versions of the plugin (see https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Adding-additional-libraries-to-the-classpath)

Adding jar’s to the /lib/ext directory

You can add any additional Java libraries to JMeter’s lib/ext
directory by using the <jmeterExtensions> configuration element.
This uses the Eclipse Aether libraries to perform dependency
resolution.

<project>
    [...]
        <build>
            <plugins>
                <plugin>
                    <groupId>com.lazerycode.jmeter</groupId>
                    <artifactId>jmeter-maven-plugin</artifactId>
                    <version>2.1.0</version>
                    <executions>
                        <execution>
                            <id>jmeter-tests</id>
                            <goals>
                                <goal>jmeter</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <jmeterExtensions>
                            <artifact>kg.apc:jmeter-plugins:pom:1.3.1</artifact>
                        </jmeterExtensions>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    [...]
</project>
+---+

When you define your dependencies properly you will probably see another error because jmeter-plugins depends upon JMeter 2.13 which has a broken maven dependency tree. This is something the jmeter-plugins team needs to fix (they need to release a version of jmeter plugins that depends upon JMeter 3.1).

The build will break because the plugin is trying to download some transitive dependencies for jmeter-plugins that don’t exist, you can work around this by setting:

<downloadExtensionDependencies>false</downloadExtensionDependencies>

This does however mean that you will need to manually set all the dependencies that jmeter-plugins depends upon in your <jmeterExtensions> block.

You can use mvn dependency:tree to get the full list of dependencies required for the jmeter-plugins-extras-libs package.

The above information hasn’t made it into the Wiki yet (there’s an ongoing task to add this information and move everything across to the website), it is however available in the CHANGELOG:

https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/blob/master/CHANGELOG.md

Содержание

  1. Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML.. #410
  2. Comments
  3. Error in NonGUIDriver java.lang.NullPointerException #20
  4. Comments
  5. P E R F O R M A N C E T E S T S
  6. Error in NonGUIDriver #40
  7. Comments
  8. Ошибка в NonGUIDriver java.lang.IllegalArgumentException

Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML.. #410

When reporting an issue:

Java 1.8.0_131 (or Java 11)
jmeter maven plugin 2.9.0 / jmeter 5.1.1 (default) (as well tried jmeter 5.3)
Maven 3.6.0
Use basic pom.xml including plugin for Jsch and SSHSampler
Expected: Jmx script must upload a file to SFTP
What happens: Always getting the same exception even after adding all the required dependencies.

  • Provide pom.xml and any log file (jmeter.log, maven logs)
  • Explain clearly the reproducer:
    • What should happen (OK Case)
      Created a test plan which generates a new file name with timestamp and read contents from a csv file then create the new file with contents to upload to SFTP (User JSR223 Preprocessor groovy script & SSH SFTP) which is working fine in Jmeter UI.
    • What happens (KO Case)
      The test plan saved and placed it in the maven project, added all the required dependencies however still the same exception occurs. Have tried all the possibilities not sure what’s the issue exactly.

Plugin dependencies in pom.xml:

Issue are related to bug, it is not the right place to ask questions about usage, for the latter :

  • Read the manual WIKI
  • Ask at User Group

The text was updated successfully, but these errors were encountered:

Have you tried Version 3.4.0 of the plugin?

Do you still see the same error?

If you are still having issues with the latest version please provide the jmeter-maven-plugin configuration in your POM so that we can try and reproduce the issue.

Hi,
I have tried with 3.4.0 where it was looking for Apache_config 5.4.1, right now this has been quarantined in our nexus repo. However im not sure whether this will resolve the issue. Please confirm.

I can’t tell you because you have not provided any config that would allow me to try and reproduce your issue.

Please find the pom file Here.

1.0-SNAPSHOT XXX Microservice Performance tests

1.8 Test 1 60 1 30

configure true jmeter-tests

jmeter 64 64 jmeter-results

true true true true true

You are mixing and matching different versions of dependencies from JMeter and then using a separate maven plugin to write stuff into the lib/ext directory, I’m not surprised this is not working.

If you want to control the version of JMeter used by the plugin you will need to do this:

If you don’t want to use the default list of JMeter artifacts pulled down by the plugin, you need to do it this way (If you are rolling back to an old version of JMeter that has a different artifact list, you will need to use this configuration to specify all the artifacts that should be copied across instead of the default list):

You should not use a block at all in the plugin configuration, we aren’t pulling in the dependencies associated with the plugin as we don’t know where we should put them if you want to add specific libraries into the lib , lib/ext or lib/junit directory you will need to do this (which it looks like you have started doing, but you have mixed it up with dependencies added in the block as well as using another plugin to copy files into the lib/ext dir which is giving you various different versions of the same file which JMeter will not like):

You have also added lots of exclusions for transitive dependencies, this is not a good idea. Stuff is likely to break all over the place if transitive dependencies are missing. By default I would suggest removing your block because you probably really do want some of them. Newer versions of libraries are not always drop in replacements. Secondly if it’s the newer versions you are excluding, you may find out things are breaking because something is expecting the functionality added in the newer version of the library.

Your plugin config also has all the phases mixed up, you are trying to run the configuration goal in the verify phase, this makes no sense.

Finally the jmeter-analysis-maven-plugin is deprecated and no longer required, JMeter has built in reporting functionality now, you can enable it in the plugin, see:

Now on to what I think is the root cause of your issue, you are trying to pull down this dependency: org.apache.jmeter.protocol.ssh.sampler:jmeter-ssh-sampler:0.1.0

However it does not exist in maven central, see:

(there is no protocol directory).

If I clean up your plugin config and remove that dependency that does not exist, locally I can get JMeter up and running a test; here is that plugin config for you:

true true true true true

The test I ran obviously doesn’t use any of the extensions, so I’m assuming they have been downloaded and configured correctly. This should be a good starting point for you.

Источник

Error in NonGUIDriver java.lang.NullPointerException #20

Hi,
I am getting the below error. I wonder if it is related to the plugin version and jmeter version incompatibility, or I can fix it without switching to previous version of jmeter ?

I am using JMeter 2.5.1 and current plugin version.

Should I switch to previous version of JMeter?
What is the latest Jmeter version compatible with the plugin?

I am getting this error:

[INFO] Executing test: /Users/vraskin/projects/moblab2/src/test/jmeter/userservice_tests.jmx
java.lang.Throwable: Could not access /usr/share/java/maven-3.0.3/lib/junit
.
.
Error in NonGUIDriver java.lang.NullPointerException

The text was updated successfully, but these errors were encountered:

I tried to resolve it by copying junit to ../lib/ , but it did not resolve it.

I got BUILD SUCCESS , but still getting junit related error. Where can I change the path for junit ? Why is it looking for it in the maven directory ? Thanks.

my fork is working in 2.5.1 at the moment, you may want to give it a try and see if that fixes your issue:

Can you provide some more info?

What version of maven?
Which OS (and version)?

I too got these same errors. I use Maven 3.0.3 on Mac OS X 10.7.2.

I tried switching to the Ardesco fork as you suggested (following the revised instructions in README.md).

(NOTE: I had to edit jmeter.version manually in my cached POM. I saw the commit where it was changed, but I guess it hasn’t been published to the repo yet. )

The JUnit error message disappeared, and it now outputs «performance tests», but the NonGUIDriver NullPointerException still appears for me. (I also note a new warning regarding an invalid POM.)

.
[INFO] — maven-jmeter-plugin:1.3-2012-01-17:jmeter (jmeter-tests) @ google_perf_test —
[WARNING] The POM for org.apache.jmeter:ApacheJMeter_reports:jar:2.5.1-2012-01-17 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]

P E R F O R M A N C E T E S T S

[INFO] Executing test: /Users/user/workspace/google_perf_test/src/test/jmeter/test_google.jmx
[INFO] Proxy server is not being used.
Error in NonGUIDriver java.lang.NullPointerException

can you provide your jmeter.log with debug turned on?

Looks like it is not able to parse your JMX file correctly. Can you provide the JMX file as well?

Sure, here it is:

Hmm, can you show me the POM you are using to run the tests?

yciabaud Maven JMeter Plugin http://yciabaud.github.com/jmeter-maven-plugin/repository

ardesco Maven JMeter Plugin http://ardesco.github.com/jmeter-maven-plugin/repository

My best guess so far is classpath problems, after the test has run (and failed) what is in the following directory:

Are you using your own mavenised build of JMeter? If so what are the artifact names. The plugin currently expects the JMeter artifacts to be called:

If they are not it doesn’t load the artifacts into the classpath correctly.

I was using a fork of JMeter to generate the JMX, but I’ve recreated it using the official Jakarta build (2.5.1). There are no differences in the two files (apart from some timestamps).

When I run the tests I use the resources from your Maven repo.

These are my jars. Is any file missing?

Everything you have looks correct the only difference between your jmx file and the ones i’m using is that I have:

and you seem to have

I’ll have to do some investigation and see if I can track down what’s going on. It’s possible its something OSX related because i’m running on Linux (Although I would have expected it to be windows that would throw up problems, not OSX).

I’ll try on a windows box later on today to see if there are problems on that and it’s just my Linux box that works.

Sorry, for not responding. I was away. I am not sure if it is still relevant, but this what I’m using:
Apache Maven 3.0.3 (r1075438; 2011-02-28 09:31:09-0800)
Java version: 1.6.0_29, vendor: Apple Inc.
OS name: «mac os x», version: «10.7.2», arch: «x86_64», family: «mac»

I changed to the version 1.3-2012-01-17 of the plugin, and it solved the junit error, but I am still getting the following:

[INFO] Executing test: /Users/vraskin/projects/moblab_src/src/test/jmeter/organizationservice_tests_2.3.jmx
[INFO] Proxy server is not being used.
Created the tree successfully using /Users/vraskin/projects/moblab_src/src/test/jmeter/organizationservice_tests_2.3.jmx
Starting the test @ Thu Jan 19 16:20:02 PST 2012 (1327018802050)
Waiting for possible shutdown message on port 4445
Tidying up . @ Thu Jan 19 16:20:02 PST 2012 (1327018802682)
. end of run
[INFO] Executing test: /Users/vraskin/projects/moblab_src/src/test/jmeter/organizationservice_tests_2.5.jmx
[INFO] Proxy server is not being used.
Error in NonGUIDriver java.lang.NullPointerException

I just copied jmeter.properties of Jmeter 2.5, changed version of the plugin to 1.3-2012-01-17 ( as stated above ), and replaced HTTPSamplerProxy to HTTPSampler. JMeter 2.5 is still opening this .jmx file, and plugin succeeds without any exceptions.

Sorry, for separate comments.

I do not think the version 1.3-2012-01-17 of the plugin reads configuration component from my pom file. That’s the thing, I have the following configuration in pom:

Some of my jmx files are ending with 2.3 and some with 2.5, but plugin runs all of them:

Источник

Error in NonGUIDriver #40

I have spent near a week trying to get this tool to work but with little success. I have attempted the following:

CENTOS 6.5
Java 1.6 or Java 1.7 (64 bit)
PHP 5.5 and 5.3
jmeter versions 2.7, 2.8, 2.9, 2.10, and 2.11

jmeter and moodle on the same server.
jmeter and moodle on different servers.
Using own mysqldumps of Moodle.

I keep getting this error when running ./compare.sh
»
ERROR — jmeter.JMeter: Error in NonGUIDriver com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not F (position: START_DOCUMENT seen F. @1:1)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)
at com.thoughtworks.xstream.io.xml.XppReader.(XppReader.java:63)
at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:913)
at org.apache.jmeter.save.SaveService.loadTree(SaveService.java:501)
at org.apache.jmeter.JMeter.runNonGui(JMeter.java:749)
at org.apache.jmeter.JMeter.startNonGui(JMeter.java:732)
at org.apache.jmeter.JMeter.start(JMeter.java:390)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.jmeter.NewDriver.main(NewDriver.java:259)
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not F (position: START_DOCUMENT seen F. @1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
. 16 more
«

I am assuming this is a user error on my part. Is there any way we could have a very detailed step by step guide on how to get this tool working including all dependencies needed for this tool to run?

The text was updated successfully, but these errors were encountered:

Источник

Ошибка в NonGUIDriver java.lang.IllegalArgumentException

Я пытаюсь запустить jmeter-скрипт с помощью mvn verify и получаю сообщение об ошибке ниже. Я новичок в Jmeter и пробовал решения из предыдущего сообщения, но напрасно. Как решить эту проблему?

[INFO] Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML <>, missing class com.thoughtworks.xstream.converters.ConversionException:

Проверьте папку target/jmeter/logs , в ней должен быть полный файл журнала для вашего теста (ов), я ожидаю, что ваш тест полагается на плагин или сторонний файл .jar, который отсутствует в Путь к классам JMeter, если вам нужны все эти вещи, такие как RestAssured и Ломбок в вашем тесте вам нужно добавить их немного иначе, чтобы остроумие

Полный pom.xml на всякий случай:

Пробовал вышеуказанное предложение, но по-прежнему получаю ту же ошибку. обновил точную ошибку, о которой идет речь. Также я запускаю jmx для тестирования производительности веб-службы. Нужны ли для этого дополнительные библиотеки?

Источник

I am executing the Jmeter test plan on Ubuntu Server but at the end left with an error saying:

Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/opt/testScripts/LcLoadTesting/agentsAccessTheCustomerInfo.jmx'.
Cause:
CannotResolveClassException: com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler

The whole error is:

Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/opt/testScripts/LcLoadTesting/agentsAccessTheCustomerInfo.jmx'.
Cause:
CannotResolveClassException: com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler

 Detail:com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception     : com.thoughtworks.xstream.converters.ConversionException
cause-message       :
first-jmeter-class  : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
class               : org.apache.jmeter.save.ScriptWrapper
required-type       : org.apache.jmeter.save.ScriptWrapper
converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree/com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler
line number         : 29
version             : 5.2.1
-------------------------------
An error occurred: Error in NonGUIDriver Problem loading XML from:'/opt/testScripts/LcLoadTesting/agentsAccessTheCustomerInfo.jmx'.
Cause:
CannotResolveClassException: com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler

 Detail:com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception     : com.thoughtworks.xstream.converters.ConversionException
cause-message       :
first-jmeter-class  : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
class               : org.apache.jmeter.save.ScriptWrapper
required-type       : org.apache.jmeter.save.ScriptWrapper
converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree/com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler
line number         : 29
version             : 5.2.1
-------------------------------

Can anyone please help me in this how can I resolve it so that I could successfully run the test plan on Ubuntu Server.

asked Apr 28, 2020 at 8:36

Rajan 's user avatar

1

It seems that you’re using the WebDriver Sampler in your Test Plan and your JMeter installation on Ubuntu doesn’t have this plugin installed.

The solution is to install the plugin, it can be done using JMeter Plugins Manager

  1. Get the Plugins Manager:

    wget https://jmeter-plugins.org/get/ -O /opt/apache-jmeter-5.2.1/lib/ext/jmeter-plugins-manager.jar
    
  2. Get JMeter Plugins Command Line Runner:

    wget https://repo1.maven.org/maven2/kg/apc/cmdrunner/2.2/cmdrunner-2.2.jar -P /opt/apache-jmeter-5.2.1/lib/
    
  3. Generate Plugins Manager command line utility:

    java -cp /opt/apache-jmeter-5.2.1/lib/ext/jmeter-plugins-manager.jar org.jmeterplugins.repository.PluginManagerCMDInstaller
    
  4. Install the WebDriver Sampler plugin:

    /opt/apache-jmeter-5.2.1/bin/./PluginsManagerCMD.sh install jpgc-webdriver
    

Replace /opt/apache-jmeter-5.2.1 with the full path to your JMeter installation and your test should work after executing of the above 4 commands.

answered Apr 28, 2020 at 9:21

Dmitri T's user avatar

Dmitri TDmitri T

12.9k1 gold badge14 silver badges18 bronze badges

6

I am executing the Jmeter test plan on Ubuntu Server but at the end left with an error saying:

Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/opt/testScripts/LcLoadTesting/agentsAccessTheCustomerInfo.jmx'.
Cause:
CannotResolveClassException: com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler

The whole error is:

Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/opt/testScripts/LcLoadTesting/agentsAccessTheCustomerInfo.jmx'.
Cause:
CannotResolveClassException: com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler

 Detail:com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception     : com.thoughtworks.xstream.converters.ConversionException
cause-message       :
first-jmeter-class  : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
class               : org.apache.jmeter.save.ScriptWrapper
required-type       : org.apache.jmeter.save.ScriptWrapper
converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree/com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler
line number         : 29
version             : 5.2.1
-------------------------------
An error occurred: Error in NonGUIDriver Problem loading XML from:'/opt/testScripts/LcLoadTesting/agentsAccessTheCustomerInfo.jmx'.
Cause:
CannotResolveClassException: com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler

 Detail:com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception     : com.thoughtworks.xstream.converters.ConversionException
cause-message       :
first-jmeter-class  : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
class               : org.apache.jmeter.save.ScriptWrapper
required-type       : org.apache.jmeter.save.ScriptWrapper
converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
path                : /jmeterTestPlan/hashTree/hashTree/hashTree/com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler
line number         : 29
version             : 5.2.1
-------------------------------

Can anyone please help me in this how can I resolve it so that I could successfully run the test plan on Ubuntu Server.

Проверьте папку target/jmeter/logs, в ней должен быть полный файл журнала для вашего теста (ов), я ожидаю, что ваш тест полагается на плагин или сторонний файл .jar, который отсутствует в Путь к классам JMeter, если вам нужны все эти вещи, такие как RestAssured и Ломбок в вашем тесте вам нужно добавить их немного иначе, чтобы остроумие

<configuration>
    <testPlanLibraries>
        <artifact>org.msgpack:msgpack-core:0.7.0-p3</artifact>
        <articact>org.projectlombok:lombok:1.14.8</articact>
        <artifact>com.jayway.restassured:rest-assured:2.3.3</artifact>
    </testPlanLibraries>
    <jmeterExtensions>
        <artifact>kg.apc:jmeter-plugins:pom:1.3.1</artifact>
        <articact>kg.apc:jmeter-plugins-standard:1.4.0</articact>
    </jmeterExtensions>
    <downloadExtensionDependencies>false</downloadExtensionDependencies>
</configuration>

Полный pom.xml на всякий случай:

<?xml version = "1.0" encoding = "UTF-8"?>
<project xmlns = "http://maven.apache.org/POM/4.0.0"
         xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>com.example.jmeter</artifactId>
    <version>1.0-SNAPSHOT</version>
    <build>
        <plugins>
            <plugin>
                <groupId>com.lazerycode.jmeter</groupId>
                <artifactId>jmeter-maven-plugin</artifactId>
                <version>2.7.0</version>
                <executions>
                    <!-- Run JMeter tests -->
                    <execution>
                        <id>jmeter-tests</id>
                        <goals>
                            <goal>jmeter</goal>
                        </goals>
                    </execution>
                    <!-- Fail build on errors in test -->
                    <execution>
                        <id>jmeter-check-results</id>
                        <goals>
                            <goal>results</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <testPlanLibraries>
                        <artifact>org.msgpack:msgpack-core:0.7.0-p3</artifact>
                        <articact>org.projectlombok:lombok:1.14.8</articact>
                        <artifact>com.jayway.restassured:rest-assured:2.3.3</artifact>
                    </testPlanLibraries>
                    <jmeterExtensions>
                        <artifact>kg.apc:jmeter-plugins:pom:1.3.1</artifact>
                        <articact>kg.apc:jmeter-plugins-standard:1.4.0</articact>
                    </jmeterExtensions>
                    <downloadExtensionDependencies>false</downloadExtensionDependencies>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Рекомендации:

  • Добавление банок в каталог / lib
  • Добавление банок в каталог / lib / ext
  • Вики-сайт подключаемого модуля JMeter Maven
  • Пять способов запустить тест JMeter без использования графического интерфейса JMeter

Понравилась статья? Поделить с друзьями:
  • Error in network definition unknown key addresses
  • Error in network definition unicast route must include both a to and via ip
  • Error in network definition invalid ip family 1
  • Error in network definition expected sequence addresses
  • Error in network definition expected mapping check indentation nameservers