I configured my plugin using SR documentation and tests work from website runner but I cannot run tests from Intellij and keep getting error:
- java.lang.Exception: No tests found matching method name filter from org.junit.runner.Request$1@292a7997
- at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
- at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
- at org.junit.runner.JUnitCore$run$0.call(Unknown Source)
- at com.onresolve.scriptrunner.canned.common.admin.RunUnitTests.doScript(RunUnitTests.groovy:327)
My test class looks like this:
package it.com.example
import com.onresolve.scriptrunner.canned.common.admin.ScriptRunnerTestRunner
import org.junit.runner.RunWith
import spock.lang.Specification
@RunWith(ScriptRunnerTestRunner)
class RunnerSampleSpecTest extends Specification {
def "test something"() {
expect:
true
}
}
I had to shorten command line in junit configuration, maybe that's the reason?