在使用jmeter-maven-plugin并设置了以下选项时,Jmeter加载密钥库文件的问题:
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>${jmeter.maven.plugin.version}</version>
<executions>
<!-- defines a runner for jmeter tests project -->
<execution>
<id>jmeter-tests</id>
<phase>test</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<resultsDirectory>${project.build.directory}/jmeter/results</resultsDirectory>
<ignoreResultFailures>true</ignoreResultFailures>
<suppressJMeterOutput>false</suppressJMeterOutput>
<resultsFileFormat>xml</resultsFileFormat>
<testResultsTimestamp>false</testResultsTimestamp>
<appendResultsTimestamp>false</appendResultsTimestamp>
<testFilesIncluded>
<jMeterTestFile>Service-Tests.jmx</jMeterTestFile>
</testFilesIncluded>
<propertiesSystem>
<javax.net.ssl.keyStore>jmeterTrustedKeystore.jks</javax.net.ssl.keyStore>
<javax.net.ssl.keyStorePassword>changeit</javax.net.ssl.keyStorePassword>
</propertiesSystem>
</configuration>
</execution>
</executions>
</plugin>
我得到的错误是:
2015/01/22 10:48:38 INFO - jmeter.util.SSLManager: JmeterKeyStore Location: type JKS
2015/01/22 10:48:38 INFO - jmeter.util.SSLManager: KeyStore created OK
2015/01/22 10:48:38 WARN - jmeter.util.SSLManager: Keystore file not found, loading empty keystore
由于jMeterTestFile参数显然无法正常工作,因此无法查看文件无法找到的可能性。我做错了什么?
答案 0 :(得分:0)
试试这个解决方案:
String s1 = "Enter username:";
String s2 = "Enter: username";
String s3 = ":Enter username";
Pattern p = Pattern.compile(":");
String[] expected1 = p.split(s1); //Expected return: "Enter username"
String[] expected2 = p.split(s2); //Expected return: "Enter"
String[] expected3 = p.split(s3); //Expected return: ""
//ignoring the print statement