kulya / jmeter-gradle-plugin

Other
40 stars 27 forks source link

jmeterListTestPlan should also list test plans added with the jmeterTestFiles property #37

Open foragerr opened 9 years ago

foragerr commented 9 years ago

running the jmeterListTestPlan task looks for test plans in the folder returned by getSrcDir(). It should also look in any other custom locations added through properties.

kulya commented 9 years ago

Can you please provide simple project that i can use for testing this feature?

foragerr commented 9 years ago

I started working on a fix for this, I will send you my simple test project when I get back to my dev machine this evening. The problem I was facing is, if I define jmeterTestFiles in build.gradle like this:

jmeterRun.configure {
    jmeterTestFiles = [file("pathtoJMXfile/jmxfile.jmx")] //-t 
}

getJmeterTestFiles() returns the List<File> in jmeterRun task, but is null in the jmeterListTestPlan task. I couldn't figure out how to make jmeterRun configuration available to other tasks as well.

foragerr commented 9 years ago

@kulya uploaded simple test project here: https://github.com/foragerr/jmeter-gradle-plugin-test1

if you run gradle jmeterrun it runs nonDefaultLocation,jmx as specified in build.gradle. However if you run gradle jmeterListTestPlan it lists DefaultLocation,jmx instead.

foragerr commented 9 years ago

The top answer here might be one way to do this.