2017-06-20 9 views
0

jmeters junit samplerでmavenを使用して負荷テストを行い、パフォーマンス結果をレポートしたいと考えています。私は5 sec.hereのランプアップ期間で10個のスレッドを使用すると、私のPOMファイルであるjmeters junit sampler with maven

enter code here <properties> 
     <selenium.version>3.0.1</selenium.version>  
    </properties> 

    <dependencies> 

     <!-- https://mvnrepository.com/artifact/junit/junit --> 
     <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId>   
      <scope>test</scope> 
     </dependency> 

     <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java --> 
     <dependency> 
      <groupId>org.seleniumhq.selenium</groupId> 
      <artifactId>selenium-java</artifactId> 
      <version>${selenium.version}</version> 
     </dependency> 

    </dependencies> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>com.lazerycode.jmeter</groupId> 
       <artifactId>jmeter-maven-plugin</artifactId> 
       <version>2.2.0</version> 
       <executions> 
        <execution> 
         <id>jmeter-classes</id> 
         <goals> 
          <goal>jmeter</goal> 
         </goals> 
        </execution> 
       </executions> 
       <configuration> 
        <junitLibraries> 
         <artifact>com.lazerycode.junit:junit-test:1.0.0</artifact> 
         </junitLibraries> 
        <propertiesGlobal> 
         <threads>10</threads> 
         <rampup>5</rampup> 
        </propertiesGlobal> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 

それは修正で私を助けてくださいませんsampler.IfのJMeterのJUnitの要求を呼び出すための正しい方法があるなら、私を助けてください。

また、あなたは次のように<jmeterExtensions>タグの下の依存関係を配置する必要がありJMeter Maven PluginドキュメントのAdding additional libraries to the classpath章ごとのよう

おかげで、よろしく

答えて

0

(egreports)パフォーマンスの結果を報告するためにどのように私を助けてください:

<?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>jmeter-selenium-junit</groupId> 
    <artifactId>jmeter-selenium-junit-test</artifactId> 
    <version>1.0-SNAPSHOT</version> 

    <repositories> 
     <repository> 
      <id>your-junit-jar</id> 
      <name>your junit repo</name> 
      <url>file:/path/to/your-junit-jar.jar</url> 
     </repository> 
    </repositories> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>com.lazerycode.jmeter</groupId> 
       <artifactId>jmeter-maven-plugin</artifactId> 
       <version>2.2.0</version> 
       <executions> 
        <execution> 
         <id>jmeter-tests</id> 
         <goals> 
          <goal>jmeter</goal> 
         </goals> 
        </execution> 
       </executions> 
       <configuration> 
        <jmeterExtensions> 
         <artifact>org.seleniumhq.selenium:selenium-java:3.0.1</artifact> 
         <artifact>org.seleniumhq.selenium:selenium-firefox-driver:3.0.1</artifact> 
        </jmeterExtensions> 
        <junitLibraries> 
         <artifact>com.yourcompany.yourgroup:your-artifact:1.0-SNAPSHOT</artifact> 
        </junitLibraries> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
</project> 

また、WebDriver Sampler JMeter Plugin hはSeleniumとのシームレスなJMeterの統合を提供しますので、毎回Seleniumコードを再コンパイルする必要はなく、.jmxファイルに直接インライン展開する必要がありません。