*
* @return the list of resultFile names
* @throws MojoExecutionException
*/
public List<String> executeTests() throws MojoExecutionException {
JMeterArgumentsArray thisTestArgs = baseTestArgs;
List<String> tests = generateTestList();
List<String> results = new ArrayList<String>();
for (String file : tests) {
if (remoteServerConfiguration != null) {
if ((remoteServerConfiguration.isStartServersBeforeTests() && tests.get(0).equals(file)) || remoteServerConfiguration.isStartAndStopServersForEachTest()) {
thisTestArgs.setRemoteStart();
thisTestArgs.setRemoteStartServerList(remoteServerConfiguration.getServerList());
}
if ((remoteServerConfiguration.isStopServersAfterTests() && tests.get(tests.size() - 1).equals(file)) || remoteServerConfiguration.isStartAndStopServersForEachTest()) {
thisTestArgs.setRemoteStop();
}
}
results.add(executeSingleTest(new File(testFilesDirectory, file), thisTestArgs));
}
return results;