title: JMeter Maven Plugin does not provide test results when using remote host configuration
body: <p>When starting a JMeter test with the jmeter-maven-plugin with the following configuration...</p>
  
  <pre><code>&lt;project&gt;
  ...
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.lazerycode.jmeter&lt;/groupId&gt;
                  &lt;artifactId&gt;jmeter-maven-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;jmeter-tests&lt;/id&gt;
                          &lt;phase&gt;integration-test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;jmeter&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;                       
                  &lt;configuration&gt;
                      &lt;customPropertiesFile&gt;${basedir}/src/test/jmeter/jmeter.properties&lt;/customPropertiesFile&gt;
                      &lt;testFilesDirectory&gt;${basedir}/src/test/jmeter&lt;/testFilesDirectory&gt;
                      &lt;remoteConfig&gt;
                          &lt;startServersBeforeTests&gt;true&lt;/startServersBeforeTests&gt;
                          &lt;serverList&gt;server01,server02&lt;/serverList&gt;
                          &lt;stopServersAfterTests&gt;true&lt;/stopServersAfterTests&gt;
                      &lt;/remoteConfig&gt;
                      &lt;testResultsTimestamp&gt;false&lt;/testResultsTimestamp&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;            
  ...
  &lt;/project&gt;
  </code></pre>
  
  <p>...then the tests are executed properly on the given remote servers "server01" and "server02". The Maven task does not wait regarding the remote host's process but states that everything is fine:</p>
  
  <pre><code>[INFO] -------------------------------------------------------
  [INFO]  P E R F O R M A N C E    T E S T S
  [INFO] -------------------------------------------------------
  [INFO]  
  [INFO]  
  [INFO] Proxy server is not being used.
  [debug] JMeter is called with the following command line arguments: -n -t /home/me/demo/src/test/jmeter/test.jmx -l /home/me/demo/target/jmeter/results/20130925-test.jtl -d /home/me/demo/target/jmeter -q /home/me/demo/src/test/jmeter/jmeter.properties -r -R server01,server02 -X
  [info] Executing test: test.jmx
  [info] Completed Test: test.jmx
  [INFO]  
  [INFO] Test Results:
  [INFO]  
  [INFO] Tests Run: 1, Failures: 0
  [INFO]  
  [INFO] 
  [INFO] --- maven-failsafe-plugin:2.15:verify (verify) 
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 9.598s
  [INFO] Finished at: Wed Sep 25 16:43:00 CEST 2013
  [INFO] Final Memory: 21M/349M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>But there aren't any test results collected. If you check the appropriate JMeter result's file then you'll realize an empty one:</p>
  
  <pre><code>cat /home/me/demo/target/jmeter/results/20130925-test.jtl
  
  #empty
  </code></pre>
  
  <p>So the Maven process is finished before the remote servers have finalized the test execution. Am I wrong to expect that the jmeter-maven-plugin should collect the test results of the remote hosts instead of writing a 0 byte file (20130925-test.jtl)?</p>
  
  <p>If I start the same test without using remote JMeter agents then everything works fine. The jmeter-maven-plugin executes the test and writes the result in the according "jtl" file. So what could be wrong with the above configuration regarding the "remoteConfig" element?</p>
  
  <p>UPDATE 1: 
  I used the jmeter-maven-plugin version 1.8.1 and Maven 3.0.5</p>
  
  <p>UPDATE 2:
  The example above executed just 1 JMeter test. If there are more than 1 JMeter test in the directory ${basedir}/src/test/jmeter then the Maven build fails. In this case the log file of the first JMeter test has no errors but all other test logs (e.g. ./target/jmeter/logs/test2.log) state the following message:</p>
  
  <pre><code>Error in NonGUIDriver java.lang.IllegalStateException: Engine is busy - please try later
  </code></pre>
  
  <p>So the 1st test was executed on the remote agent (also without collecting any results in the according "jtl" file on the client site) but the other tests have been denied by the remote hosts. So it seems that the maven-jmeter-plugin tries to parallelize the execution of the tests but IMHO they should be executed in a serialized way.</p>