On Sat, 2 Nov 2019 at 11:02, Vladimir Sitnikov
<[email protected]> wrote:
>
> >Google search.
>
> Which specific page do you look into?

Just found:
https://docs.gradle.org/current/userguide/java_testing.html#test_filtering

> Frankly speaking, your question is a good one for stackoverflow.com, and
> there's nothing JMeter-specific in it

The point is that this used to be easy with Ant, and was documented in
the build.xml file.

So why is it so difficult in Gradle?

I have tried:

gradle test --tests 'org.apache.jmeter.protocol.http.control.DnsManagerTest'
and
gradle test --tests '*DnsManagerTest'

Both fail with a series of errors:

--- cut here ---
FAILURE: Build failed with an exception.

* Where:
Settings file '/Users/sebb/git/jmeter/buildSrc/settings.gradle.kts' line: 20

* What went wrong:
Script compilation errors:

  Line 20:     plugins {
               ^ Unresolved reference. None of the following
candidates is applicable because of receiver type mismatch:
                   public inline operator fun <T : Any, C :
NamedDomainObjectContainer<TypeVariable(T)>>
TypeVariable(C).invoke(configuration:
NamedDomainObjectContainerScope<TypeVariable(T)>.() -> Unit):
TypeVariable(C) defined in org.gradle.kotlin.dsl
--- cut here ---

So I tried ./gradlew:

./gradlew test --tests 'org.apache.jmeter.protocol.http.control.DnsManagerTest'

and I get a different error:

--- cut here ---
> Configure project :
Building JMeter 5.2-SNAPSHOT

> Task :src:jorphan:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':src:jorphan:test'.
> No tests found for given includes: 
> [org.apache.jmeter.protocol.http.control.DnsManagerTest](--tests filter)
--- cut here ---

So how can one use Gradle command-line to run a single test?
It should be easy...

Sebb.

Reply via email to