Hi

Maybe this helps or, at least, provides some insipiration for what you want to 
achieve:

http://www.practicalgradle.org/blog/2011/01/convenient-test-execution-with-camel-case-support/

Greetings, Etienne


On 11.10.2011, at 21:43, c_maker wrote:

> Hello, 
> 
> I have a set of tests that I find myself executing singly a lot like this:
> 
> *gradlew someProj:test -Dtest.single=someImportantTest*
> 
> What I am trying to do is dynamically create task names for these important
> tests and execute them like this: 
> 
> *gradlew someProj:someImportantTest* OR *gradlew someProj:sIT*
> 
> What I came up with is this:
> 
> def testList = ['someImportantTest1', 'someImportantTest2'...]
> 
>       testList.each{
>               testName ->
>               task "$testName" << { 
>                       println "I am going to execute $testName as a single 
> test..."
>                       
>                        // this is where the problem starts... I do not know
> how to tell the test
>                        // that I want to execute a single test with the
> name... I tried these:
>                        test.systemProperties['test.single']=testName
>                       System.properties['test.single']=testName
>                       
>                        test.execute()
>               }
>       }
> 
> I have tried many more combinations but nothing seems to work. The test task
> just executes all the tests instead of the test I want. Can you please
> explain how I can achieve this?
> 
> Thank you in advance!!!!
> 
> --
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/Attempting-to-execute-single-test-from-another-task-tp4892980p4892980.html
> Sent from the gradle-user mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to