Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to execute multiple tests classes in gradle that are not in the same package?

Tags:

I have the following tests classes.

  1. com.baz.bar.Foo

  2. com.bar.foo.Baz

  3. com.foo.baz.Bar

I want to execute com.baz.bar.Foo and com.bar.foo.Baz. I know how to execute all of them and how to execute one of them. I don't know how to execute any arbitrary set between.

like image 897
Jacob Tomaw Avatar asked Aug 04 '14 18:08

Jacob Tomaw


People also ask

How do you skip a running test in Gradle build?

To skip any task from the Gradle build, we can use the -x or –exclude-task option. In this case, we'll use “-x test” to skip tests from the build.


1 Answers

Gradle supports multiple --tests statements, i.e:

gradle test --tests com.baz.bar.Foo --tests com.bar.foo.Baz --tests com.foo.baz.Bar 

would do what you want

like image 146
Jay Avatar answered Oct 05 '22 16:10

Jay