[gradle] exclude groups already defined in xml

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gradle] exclude groups already defined in xml

Piotr Klubinski
Hi

I wasn't able to get this working...
What I have:
- Test Suite defined in xml file (classes and methods, NOT groups)
- gradle to run tests (task that runs test from given xml)

fileTree(dir: project.projectDir).matching { include '**/test/suites/*.xml' }
       
.forEach { suiteName ->
    task
"run ${suiteName.name.toLowerCase()}"(type: Test) {

        useTestNG() {
           
suites "src/test/resources/suites/${suiteName.name}"
        }
        systemProperties = System.properties
   
}
}

I would like to run command similar to: 
./gradlew 'run abc.xml' -DexcludeGroups=xyz

I already tried (without success)
./gradlew 'run abc.xml' -Dtest.options.excludeGroups=xyz

Piotr

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [gradle] exclude groups already defined in xml

Krishnan Mahadevan

Just to figure out if this is a gradle issue (or) a TestNG issue, can you please let us know what happens when you run this directly using TestNG ?

 

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Reply-To: <[hidden email]>
Date: Tuesday, March 6, 2018 at 8:29 PM
To: testng-users <[hidden email]>
Subject: [testng-users] [gradle] exclude groups already defined in xml

 

Hi

 

I wasn't able to get this working...

What I have:

- Test Suite defined in xml file (classes and methods, NOT groups)

- gradle to run tests (task that runs test from given xml)

 

fileTree(dir: project.projectDir).matching { include '**/test/suites/*.xml' }
       
.forEach { suiteName ->
    task
"run ${suiteName.name.toLowerCase()}"(type: Test) {

        useTestNG
() {
            suites
"src/test/resources/suites/${suiteName.name}"
       
}
        systemProperties
= System.properties
   
}
}

 

I would like to run command similar to: 

./gradlew 'run abc.xml' -DexcludeGroups=xyz


I already tried (without success)

./gradlew 'run abc.xml' -Dtest.options.excludeGroups=xyz


Piotr

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To post to this group, send email to
[hidden email].
Visit this group at
https://groups.google.com/group/testng-users.
For more options, visit
https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [gradle] exclude groups already defined in xml

Piotr Klubinski
Seems like group runs always.
Although I was trying that from IntelliJ (right click on xml, and add excludegroups param).

Instead of trying to figure out what's wrong with my setup, does anyone have working example?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.