0
votes

I am trying to run a JMeter test session on a remote server from my local machine. I see that the test itself executes as expected, but none of the results are getting written to the jtl file in the non-gui mode. I tried validating everything I know and everything seems fine to me.

Here is my JMX file -

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.3 r1808647">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="APIGTesting" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</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>
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="MyProxyTG-Get" 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>
          <intProp name="LoopController.loops">-1</intProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">5</stringProp>
        <stringProp name="ThreadGroup.ramp_time">5</stringProp>
        <longProp name="ThreadGroup.start_time">1522117683000</longProp>
        <longProp name="ThreadGroup.end_time">1522117683000</longProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.duration">3600</stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
      </ThreadGroup>
      <hashTree>
        <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Get Object" enabled="true">
          <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
            <collectionProp name="Arguments.arguments">
              <elementProp name="Proxy_APIG_Endpoint" elementType="Argument">
                <stringProp name="Argument.name">Proxy_APIG_Endpoint</stringProp>
                <stringProp name="Argument.value">https://3wmhcni2123.execute-api.us-east-1.amazonaws.com/dev</stringProp>
                <stringProp name="Argument.metadata">=</stringProp>
              </elementProp>
            </collectionProp>
          </elementProp>
          <stringProp name="classname">com.poc.jmeter.APIGProxy_GetObject</stringProp>
        </JavaSampler>
        <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">3000</stringProp>
        </TestAction>
        <hashTree>
          <UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="Pause" enabled="true">
            <stringProp name="ConstantTimer.delay">3000</stringProp>
            <stringProp name="RandomTimer.range">3000</stringProp>
          </UniformRandomTimer>
          <hashTree/>
        </hashTree>
      </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>true</time>
            <latency>true</latency>
            <timestamp>true</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>true</saveAssertionResultsFailureMessage>
            <assertionsResultsToSave>0</assertionsResultsToSave>
            <bytes>true</bytes>
            <sentBytes>true</sentBytes>
            <threadCounts>true</threadCounts>
            <idleTime>true</idleTime>
            <connectTime>true</connectTime>
          </value>
        </objProp>
        <stringProp name="filename">/Users/apple/JMeter-Sessions/ProxyResults/Test9.4.csv</stringProp>
      </ResultCollector>
      <hashTree/>
    </hashTree>
    <WorkBench guiclass="WorkBenchGui" testclass="WorkBench" testname="WorkBench" enabled="true">
      <boolProp name="WorkBench.save">true</boolProp>
    </WorkBench>
    <hashTree/>
  </hashTree>
</jmeterTestPlan>

and I am running the JMeter using the command below -

jmeter -n -t proxyTest.jmx -r -l ./results.jtl

I am not sure what other properties are available to check as I can see that the writer itself seems to be working when I run the test locally in GUI mode. Any advise?

1

1 Answers

0
votes

Most probably your request hasn't been executed at all. As far as I can see from your Test Plan you're using Java Request sampler with some custom class, to wit com.poc.jmeter.APIGProxy_GetObject.

When you run JMeter in distributed mode you need to copy the .jar file containing your com.poc.jmeter.APIGProxy_GetObject and all dependencies (if any) to the JMeter Classpath of the remote slave(s). The same applies to any external data files (CSV, properties, whatever), any JMeter Plugins, any customizations. The easiest way is just copying local master JMeter folder to all the slaves.

You will need to restart slave instance(s) to pick the .jar up.

In case of any other issues inspect jmeter-server.log file in "bin" folder of JMeter installation on the slave machine, normally it should have enough troubleshooting information to get to the bottom of the issue.

References: