Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/341.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 当使用maven eclipse运行jmeter脚本时,com.thoughtworks.xstream.converters.ConversionException_Java_Eclipse_Maven_Jmeter_Jmeter 4.0 - Fatal编程技术网

Java 当使用maven eclipse运行jmeter脚本时,com.thoughtworks.xstream.converters.ConversionException

Java 当使用maven eclipse运行jmeter脚本时,com.thoughtworks.xstream.converters.ConversionException,java,eclipse,maven,jmeter,jmeter-4.0,Java,Eclipse,Maven,Jmeter,Jmeter 4.0,我已经将jmeter脚本与maven集成在一起。我还有jmeter插件管理器。运行它时,我得到了java.lang.IllegalArgumentException,这导致了上述异常。我已经为jmeter插件管理器和xstream添加了依赖项,但仍然得到了相同的错误 这里已经讨论了完全相同的问题,但内容现在已经删除。 pom文件- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apa

我已经将jmeter脚本与maven集成在一起。我还有jmeter插件管理器。运行它时,我得到了
java.lang.IllegalArgumentException
,这导致了上述异常。我已经为jmeter插件管理器和xstream添加了依赖项,但仍然得到了相同的错误

这里已经讨论了完全相同的问题,但内容现在已经删除。

pom文件-

            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>test_framework</groupId>
            <artifactId>api_test_plan</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <packaging>jar</packaging>

            <name>dkc_api_test_plan</name>
            <url>http://maven.apache.org</url>
            <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <ThreadCount.thread1>10</ThreadCount.thread1>
            </properties>
            <build>

                <plugins>
                    <!-- jmeter plugin to run jmeter through maven build -->
                    <plugin>
                        <groupId>com.lazerycode.jmeter</groupId>
                        <artifactId>jmeter-maven-plugin</artifactId>
                        <version>2.7.0</version>
                        <executions>
                            <execution>
                                <id>jmeter-tests</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jmeter</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <resultsFileFormat>xml</resultsFileFormat>
                            <generateReports>false</generateReports>
                            <testResultsTimestamp>false</testResultsTimestamp>
                            <jmeterExtensions>
                                <artifact>kg.apc:jmeter-plugins:pom:1.3.1</artifact>
                            </jmeterExtensions>
                            <!-- inputFile>${project.build.directory}/jmeter/results/CreateOrderLoadTest.jtl</inputFile -->
                        </configuration>

                    </plugin>
                    <!--surefire plugin to generate html reports -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>3.0.0-M3</version>
                        <configuration>
                            <outputFolder>${project.build.directory}/target/surefire-reports</outputFolder>
                            <printReport>true</printReport>
                            <exportAll>true</exportAll>
                        </configuration>
                    </plugin>
                    <!-- plugin> <groupId>com.lazerycode.jmeter</groupId> <artifactId>jmeter-analysis-maven-plugin</artifactId> 
                        <version>1.0.4</version> <configuration> <source>${project.build.directory}/jmeter/results/dkc_sales.jtl</source> 
                        </configuration> <executions> <execution> <id>create-html-report</id> <phase>verify</phase> 
                        <goals> <goal>analyze</goal> </goals> </execution> </executions> </plugin -->
                </plugins>
                <!-- https://mvnrepository.com/artifact/junit/junit -->


            </build>
            <dependencies>
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <version>4.9</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.apache.jmeter</groupId>
                    <artifactId>ApacheJMeter_java</artifactId>
                    <version>3.1</version>
                </dependency>
                <!-- https://mvnrepository.com/artifact/kg.apc/jmeter-plugins-manager       <dependency>
                    <groupId>kg.apc</groupId>
                    <artifactId>jmeter-plugins-manager</artifactId>
                    <version>0.1</version>
                </dependency>

            </dependencies>

        </project>    ```

-------------------------------------------------------
[INFO]  P E R F O R M A N C E    T E S T S
[INFO] -------------------------------------------------------
[INFO]  
[INFO]  
[INFO] Executing test: myFile.jmx
[INFO] Starting process with:[java, -Xms512M, -Xmx512M, -jar, ApacheJMeter-4.0.jar, -d, D:\Projects\....
[INFO] Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'D:\Projects\\target\jmeter\testFiles\myFile.jmx', missing class com.thoughtworks.xstream.converters.ConversionException: 
[INFO] ---- Debugging information ----
[INFO] cause-exception     : com.thoughtworks.xstream.converters.ConversionException
[INFO] cause-message       : 
[INFO] first-jmeter-class  : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
[INFO] class               : org.apache.jmeter.save.ScriptWrapper
[INFO] required-type       : org.apache.jorphan.collections.ListedHashTree
[INFO] converter-type      : org.apache.jmeter.save.ScriptWrapperConverter
[INFO] path                : /jmeterTestPlan/hashTree/hashTree/hashTree[3]/hashTree[5]/hashTree[4]/hashTree[3]/com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor
[INFO] line number         : 3610
[INFO] version             : 4.0 r1823414
[INFO] -------------------------------
[INFO] Completed Test: D:\Projects\Project_Name\api_test_plan\target\jmeter\testFiles\myFile.jmx
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.003 s
[INFO] Finished at: 2019-04-19T12:53:28+05:30
[INFO] Final Memory: 38M/282M
[INFO] ------------------------------------------------------------------------
[INFO] Shutdown detected, destroying JMeter process...**strong text**

xsi:schemaLocation=”http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
测试框架
空气污染指数测试计划
0.0.1-快照
罐子
dkc_api_测试计划
http://maven.apache.org
UTF-8
UTF-8
10
com.lazerycode.jmeter
jmetermaven插件
2.7.0
jmeter测试
验证
性能测试
xml
假的
假的
kg.apc:jmeter插件:pom:1.3.1
org.apache.maven.plugins
maven surefire插件
3.0.0-M3
${project.build.directory}/target/surefire报告
真的
真的
朱尼特
朱尼特
4.9
测试
org.apache.jmeter
爪哇公寓
3.1

不要像在中那样使用pom依赖项:

kg.apc:jmeter插件:pom:1.3.1


它应该能工作

它能工作,我添加了一个扩展名“``kg.apc:jmeter插件extras:pom:1.4.0 kg.apc:jmeter插件json:2.7 false```