Мы использовали группу Ultimate Thread в нашем плане испытаний Jmeter.В настоящее время мы собираемся выполнить тест с использованием подключаемого модуля jmeter maven.
При попытке запустить тест jmeter с использованием jmeter-maven-plugin версии 2.7.0 я получаю следующую ошибку:
[INFO] An error occurred: class org.apache.jorphan.logging.Slf4jLogkitLogger overrides final method log.(Lorg/apache/log/Priority;Ljava/lang/String;Ljava/lang/Throwable;)V
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.556 s
[INFO] Finished at: 2018-05-17T15:15:12-04:00
[INFO] Final Memory: 18M/437M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.7.0:jmeter (test) on project chilapis: Test failed with exit code:1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.lazerycode.jmeter:jmeter-maven-plugin:2.7.0:jmeter (test) on project chilapis: Test failed with exit code:1
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Test failed with exit code:1
at com.lazerycode.jmeter.testrunner.TestManager.executeSingleTest(TestManager.java:179)
at com.lazerycode.jmeter.testrunner.TestManager.executeTests(TestManager.java:115)
at com.lazerycode.jmeter.mojo.RunJMeterMojo.doExecute(RunJMeterMojo.java:61)
at com.lazerycode.jmeter.mojo.AbstractJMeterMojo.execute(AbstractJMeterMojo.java:233)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[INFO] Shutdown detected, destroying JMeter process...
Ниже приведен мой файл POM.xml:
<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.honeywell.jmeter</groupId>
<artifactId>chilapis</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<!-- Default Properties for Project -->
<properties>
<jmeter.analysis.maven.plugin.version>1.0.6</jmeter.analysis.maven.plugin.version>
<jmeter-maven-plugin.version>2.7.0</jmeter-maven-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<profiles>
<!-- Profile to run -->
<profile>
<id>performance</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
</plugin>
<!-- execute JMeter test -->
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>${jmeter-maven-plugin.version}</version>
<executions>
<execution>
<id>test</id>
<goals>
<goal>jmeter</goal>
</goals>
</execution>
</executions>
<configuration>
<jmeterVersion>3.3</jmeterVersion>
<testPlanLibraries>
<testPlanLibrary>org.slf4j:slf4j-api:1.7.25</testPlanLibrary>
</testPlanLibraries>
<!-- <downloadJMeterDependencies>false</downloadJMeterDependencies> -->
<!-- <downloadLibraryDependencies>false</downloadLibraryDependencies> -->
<excludedArtifacts>
<exclusion>commons-pool2:commons-pool2</exclusion>
<exclusion>commons-math3:commons-math3</exclusion>
<exclusion>org.slf4j:slf4j-api</exclusion>
<exclusion>org.slf4j:slf4j-ext</exclusion>
<!-- <exclusion>org.slf4j:slf4j-nop</exclusion> -->
<exclusion>logkit:logkit</exclusion>
<exclusion>org.apache.logging.log4j:log4j</exclusion>
<exclusion>org.apache.logging.log4j:log4j-slf4j-impl</exclusion>
</excludedArtifacts>
<jmeterExtensions>
<!-- <jmeterExtension>kg.apc:jmeter-plugins-cmn-jmeter:0.5</jmeterExtension>
<jmeterExtension>kg.apc:jmeter-plugins-graphs-additional:2.0</jmeterExtension>
<jmeterExtension>kg.apc:jmeter-plugins-synthesis:2.1</jmeterExtension> <jmeterExtension>kg.apc:jmeter-plugins-graphs-basic:2.0</jmeterExtension>
<jmeterExtension>kg.apc:jmeter-plugins-cmd:2.1</jmeterExtension> -->
<jmeterExtension>kg.apc:jmeter-plugins-casutg:2.5</jmeterExtension>
<!-- <jmeterExtension>kg.apc:cmdrunner:2.1</jmeterExtension> -->
</jmeterExtensions>
<remoteConfig>
<startAndStopServersForEachTest>true</startAndStopServersForEachTest>
<startServersBeforeTests>true</startServersBeforeTests>
<serverList>$serverlist</serverList>
<!-- <stopServersAfterTests>true</stopServersAfterTests> -->
</remoteConfig>
<resultsFileFormat>xml</resultsFileFormat>
<!-- <resultsFileFormat>csv</resultsFileFormat> -->
<customPropertiesFiles>
<customPropertiesFile>${project.basedir}/src/test/jmeter/custom.properties</customPropertiesFile>
</customPropertiesFiles>
<testFilesIncluded>
<jMeterTestFile>${testsToInclude}</jMeterTestFile>
</testFilesIncluded>
<ignoreResultFailures>true</ignoreResultFailures>
</configuration>
</plugin>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-analysis-maven-plugin</artifactId>
<version>${jmeter.analysis.maven.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>analyze</goal>
</goals>
<phase>post-integration-test</phase>
</execution>
</executions>
<configuration>
<!-- source file that contains jmeter result data. Needs to be XML
format or a GZIPed XML format -->
<source>${project.build.directory}/jmeter/results/*</source>
<!-- directory where to store analysis report files. At least a file
"summary.txt" will be stored here. -->
<targetDirectory>${project.build.directory}/reports</targetDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Пожалуйста, помогите найти проблему в приведенном выше файле pom.xml.Кажется, jmeter jorphan jar конфликтует с другими файлами jar Slf4j.
Заранее спасибо.