Excluding tests from command line

Hi, is there a way to exclude some tests from command line without modifying build script (test.exclude part)? Something like -Dtest.exclude=“Test1,Test2”.

Out of the box, only include filters are supported (’-Dtest.single’). Of course you can always invent your own system property and configure the ‘test’ task accordingly.

Thanks for your response.

I’m using

// -Pexclude_tests="Test1,Test2"
project.properties['exclude_tests']?.replaceAll('\s', '')?.split('[,;]').each {
   exclude "**/${it}.class"
}

I just thought that there might be some more standardized way that I’m missing.