Running an instrumentation or unit test in the terminal with Gradle is relatively straightforward. Let's take this example class:
class MyClass {
@Test
fun mySimpleTest() {
// Test logic here
}
}
To run this single unit test method in the terminal (ignoring the fact that I could use wildcards and such):
./gradlew a:b:c:test --tests 'com.sample.package.MyClass.mySimpleTest'
But what if you have a Kotlin method that utilizes backticking?
class MyClass {
@Test
fun `my simple test`() {
// Test logic here
}
}
I tried replacing the spaces with underscores, removing spaces altogether, with and without backticks, etc and haven't had any success.
So my question is this: How do you run a single test method in the terminal when the method name utilizes backticks?