-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve management of non plugin related dependencies
This closes #262
- Loading branch information
Showing
5 changed files
with
341 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=clean verify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?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.lazerycode.jmeter</groupId> | ||
<artifactId>testplan-with-dependencies-integration-test</artifactId> | ||
<version>DEV-SNAPSHOT</version> | ||
|
||
<description>Testplan that requires ActiveMQ jars to run JMS tests</description> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>apache-snapshots</id> | ||
<name>Apache Snapshots</name> | ||
<url>https://repository.apache.org/content/groups/snapshots/</url> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
<configuration> | ||
<suppressJMeterOutput>false</suppressJMeterOutput> | ||
<testFilesIncluded> | ||
<testFilesIncluded>test.jmx</testFilesIncluded> | ||
</testFilesIncluded> | ||
<testPlanLibraries> | ||
<artifact>org.apache.activemq:activemq-client:5.15.2</artifact> | ||
<artifact>org.apache.activemq:activemq-broker:5.15.2</artifact> | ||
<artifact>org.apache.activemq:activemq-spring:5.15.2</artifact> | ||
</testPlanLibraries> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>configure</id> | ||
<goals> | ||
<goal>configure</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>performance test</id> | ||
<goals> | ||
<goal>jmeter</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>verify</id> | ||
<goals> | ||
<goal>results</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
26 changes: 26 additions & 0 deletions
26
src/it/testplan-with-dependencies/src/test/jmeter/activemq.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<beans | ||
xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | ||
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"> | ||
|
||
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/> | ||
<broker xmlns="http://activemq.apache.org/schema/core" useJmx="false" persistent="false"> | ||
<transportConnectors> | ||
<transportConnector uri="tcp://localhost:61616"/> | ||
</transportConnectors> | ||
<systemUsage> | ||
<systemUsage> | ||
<memoryUsage> | ||
<memoryUsage limit="64 mb"/> | ||
</memoryUsage> | ||
<storeUsage> | ||
<storeUsage limit="5000 mb"/> | ||
</storeUsage> | ||
<tempUsage> | ||
<tempUsage limit="5000 mb"/> | ||
</tempUsage> | ||
</systemUsage> | ||
</systemUsage> | ||
</broker> | ||
</beans> |
216 changes: 216 additions & 0 deletions
216
src/it/testplan-with-dependencies/src/test/jmeter/test.jmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jmeterTestPlan version="1.2" properties="3.4" jmeter="4.0-SNAPSHOT.20171129"> | ||
<hashTree> | ||
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> | ||
<stringProp name="TestPlan.comments"></stringProp> | ||
<boolProp name="TestPlan.functional_mode">false</boolProp> | ||
<boolProp name="TestPlan.serialize_threadgroups">true</boolProp> | ||
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | ||
<collectionProp name="Arguments.arguments"/> | ||
</elementProp> | ||
<stringProp name="TestPlan.user_define_classpath"></stringProp> | ||
<boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp> | ||
</TestPlan> | ||
<hashTree> | ||
<SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group" enabled="true"> | ||
<stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp> | ||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> | ||
<boolProp name="LoopController.continue_forever">false</boolProp> | ||
<stringProp name="LoopController.loops">1</stringProp> | ||
</elementProp> | ||
<stringProp name="ThreadGroup.num_threads">1</stringProp> | ||
<stringProp name="ThreadGroup.ramp_time">1</stringProp> | ||
<boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
<stringProp name="ThreadGroup.duration"></stringProp> | ||
<stringProp name="ThreadGroup.delay"></stringProp> | ||
</SetupThreadGroup> | ||
<hashTree> | ||
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="BSS_startActiveMQ" enabled="true"> | ||
<stringProp name="scriptLanguage">groovy</stringProp> | ||
<stringProp name="parameters"></stringProp> | ||
<stringProp name="filename"></stringProp> | ||
<stringProp name="cacheKey">true</stringProp> | ||
<stringProp name="script">import org.apache.activemq.broker.BrokerService; | ||
import org.apache.activemq.broker.BrokerFactory; | ||
import org.apache.jmeter.util.JMeterUtils; | ||
import org.apache.commons.io.FileUtils; | ||
import java.io.File; | ||
|
||
String activemqFile = JMeterUtils.getJMeterHome()+ "/testFiles/activemq.xml"; | ||
File file = new File(JMeterUtils.getJMeterHome(), "activemq-data"); | ||
log.info("Deleting {}", file); | ||
FileUtils.deleteDirectory(file); | ||
log.info("Creating activemq config from {}", activemqFile); | ||
try { | ||
String path = activemqFile; | ||
path = path.replace('\\', '/'); | ||
path = path.replaceAll(" ", "%20"); | ||
BrokerService broker = BrokerFactory.createBroker("xbean:file:"+path, true); | ||
props.put("ACTIVEMQ_BROKER", broker); | ||
} catch(Exception ex) { | ||
log.error("Error configuring ActiveMQ", ex); | ||
} | ||
</stringProp> | ||
</JSR223Sampler> | ||
<hashTree/> | ||
<TestAction guiclass="TestActionGui" testclass="TestAction" testname="Think Time" enabled="true"> | ||
<intProp name="ActionProcessor.action">1</intProp> | ||
<intProp name="ActionProcessor.target">0</intProp> | ||
<stringProp name="ActionProcessor.duration">0</stringProp> | ||
</TestAction> | ||
<hashTree> | ||
<UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="Pause" enabled="true"> | ||
<stringProp name="ConstantTimer.delay">1000</stringProp> | ||
<stringProp name="RandomTimer.range">100</stringProp> | ||
</UniformRandomTimer> | ||
<hashTree/> | ||
</hashTree> | ||
</hashTree> | ||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="TG-JMS-P2P" enabled="true"> | ||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> | ||
<boolProp name="LoopController.continue_forever">false</boolProp> | ||
<stringProp name="LoopController.loops">1</stringProp> | ||
</elementProp> | ||
<stringProp name="ThreadGroup.num_threads">1</stringProp> | ||
<stringProp name="ThreadGroup.ramp_time">1</stringProp> | ||
<boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
<stringProp name="ThreadGroup.duration"></stringProp> | ||
<stringProp name="ThreadGroup.delay"></stringProp> | ||
</ThreadGroup> | ||
<hashTree> | ||
<JMSSampler guiclass="JMSSamplerGui" testclass="JMSSampler" testname="JMS-P2P-DefaultCorrelationId" enabled="true"> | ||
<stringProp name="JMSSampler.queueconnectionfactory">ConnectionFactory</stringProp> | ||
<stringProp name="JMSSampler.SendQueue">dynamicQueues/requestQueue0</stringProp> | ||
<stringProp name="JMSSampler.ReceiveQueue">dynamicQueues/requestQueue0</stringProp> | ||
<boolProp name="JMSSampler.isNonPersistent">false</boolProp> | ||
<boolProp name="JMSSampler.useReqMsgIdAsCorrelId">true</boolProp> | ||
<stringProp name="JMSSampler.timeout"></stringProp> | ||
<stringProp name="HTTPSamper.xml_data">Test</stringProp> | ||
<stringProp name="JMSSampler.initialContextFactory">org.apache.activemq.jndi.ActiveMQInitialContextFactory</stringProp> | ||
<stringProp name="JMSSampler.contextProviderUrl">tcp://localhost:61616</stringProp> | ||
<elementProp name="JMSSampler.jndiProperties" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | ||
<collectionProp name="Arguments.arguments"/> | ||
</elementProp> | ||
<elementProp name="arguments" elementType="JMSProperties"> | ||
<collectionProp name="JMSProperties.properties"/> | ||
</elementProp> | ||
<boolProp name="JMSSampler.useResMsgIdAsCorrelId">true</boolProp> | ||
<intProp name="JMSSampler.communicationStyle">1</intProp> | ||
</JMSSampler> | ||
<hashTree> | ||
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Assertion" enabled="true"> | ||
<collectionProp name="Asserion.test_strings"> | ||
<stringProp name="2603186">Test</stringProp> | ||
</collectionProp> | ||
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp> | ||
<boolProp name="Assertion.assume_success">false</boolProp> | ||
<intProp name="Assertion.test_type">16</intProp> | ||
</ResponseAssertion> | ||
<hashTree/> | ||
</hashTree> | ||
</hashTree> | ||
<PostThreadGroup guiclass="PostThreadGroupGui" testclass="PostThreadGroup" testname="tearDown Thread Group" enabled="true"> | ||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> | ||
<boolProp name="LoopController.continue_forever">false</boolProp> | ||
<stringProp name="LoopController.loops">1</stringProp> | ||
</elementProp> | ||
<stringProp name="ThreadGroup.num_threads">1</stringProp> | ||
<stringProp name="ThreadGroup.ramp_time">1</stringProp> | ||
<boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
<stringProp name="ThreadGroup.duration"></stringProp> | ||
<stringProp name="ThreadGroup.delay"></stringProp> | ||
</PostThreadGroup> | ||
<hashTree> | ||
<ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> | ||
<stringProp name="ConstantTimer.delay">1100</stringProp> | ||
</ConstantTimer> | ||
<hashTree/> | ||
<JSR223Sampler guiclass="TestBeanGUI" testclass="JSR223Sampler" testname="BSS_stopActiveMQ" enabled="true"> | ||
<stringProp name="scriptLanguage">groovy</stringProp> | ||
<stringProp name="parameters"></stringProp> | ||
<stringProp name="filename"></stringProp> | ||
<stringProp name="cacheKey">true</stringProp> | ||
<stringProp name="script">import org.apache.activemq.broker.BrokerService; | ||
import org.apache.jmeter.util.JMeterUtils; | ||
import org.apache.commons.io.FileUtils; | ||
|
||
BrokerService broker = props.get("ACTIVEMQ_BROKER"); | ||
broker.stop(); | ||
|
||
FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), "activemq-data")); | ||
</stringProp> | ||
</JSR223Sampler> | ||
<hashTree/> | ||
</hashTree> | ||
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> | ||
<boolProp name="ResultCollector.error_logging">false</boolProp> | ||
<objProp> | ||
<name>saveConfig</name> | ||
<value class="SampleSaveConfiguration"> | ||
<time>false</time> | ||
<latency>false</latency> | ||
<timestamp>false</timestamp> | ||
<success>true</success> | ||
<label>true</label> | ||
<code>true</code> | ||
<message>true</message> | ||
<threadName>true</threadName> | ||
<dataType>true</dataType> | ||
<encoding>false</encoding> | ||
<assertions>true</assertions> | ||
<subresults>true</subresults> | ||
<responseData>false</responseData> | ||
<samplerData>false</samplerData> | ||
<xml>false</xml> | ||
<fieldNames>true</fieldNames> | ||
<responseHeaders>false</responseHeaders> | ||
<requestHeaders>false</requestHeaders> | ||
<responseDataOnError>false</responseDataOnError> | ||
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> | ||
<assertionsResultsToSave>0</assertionsResultsToSave> | ||
<threadCounts>true</threadCounts> | ||
<sampleCount>true</sampleCount> | ||
</value> | ||
</objProp> | ||
<stringProp name="filename">JMS_TESTS.csv</stringProp> | ||
<stringProp name="TestPlan.comments">Clear messages on Send Queue requestQueue6:1 message(s) removed</stringProp> | ||
</ResultCollector> | ||
<hashTree/> | ||
<ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true"> | ||
<boolProp name="ResultCollector.error_logging">false</boolProp> | ||
<objProp> | ||
<name>saveConfig</name> | ||
<value class="SampleSaveConfiguration"> | ||
<time>false</time> | ||
<latency>false</latency> | ||
<timestamp>false</timestamp> | ||
<success>true</success> | ||
<label>true</label> | ||
<code>true</code> | ||
<message>true</message> | ||
<threadName>true</threadName> | ||
<dataType>true</dataType> | ||
<encoding>false</encoding> | ||
<assertions>true</assertions> | ||
<subresults>true</subresults> | ||
<responseData>false</responseData> | ||
<samplerData>false</samplerData> | ||
<xml>true</xml> | ||
<fieldNames>false</fieldNames> | ||
<responseHeaders>false</responseHeaders> | ||
<requestHeaders>false</requestHeaders> | ||
<responseDataOnError>false</responseDataOnError> | ||
<saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> | ||
<assertionsResultsToSave>0</assertionsResultsToSave> | ||
<threadCounts>true</threadCounts> | ||
<sampleCount>true</sampleCount> | ||
</value> | ||
</objProp> | ||
<stringProp name="filename">JMS_TESTS.xml</stringProp> | ||
</ResultCollector> | ||
<hashTree/> | ||
</hashTree> | ||
</hashTree> | ||
</jmeterTestPlan> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters