2016-09-16 83 views
3

我有几个测试分布在几个类。sbt test-only特定测试

我想运行只能从第一类中的第一个测试:

类是:

class Step1_PrimarySpec 

测试是:

test("case1: Primary (in isolation) should properly register itself to the provided Arbiter") 

我想:

sbt test-only Step1_PrimarySpec 

和:

sbt test-only Step1_PrimarySpec 1 

和:

sbt test-only "*Step1_PrimarySpec 1" 

和:

sbt test-only "*Step1_PrimarySpec" 

然而,所有这些命令的运行整个测试套件。

那么我该如何运行这个特定的测试呢?

回答

3

必须将围绕整个命令的双引号是这样的:

sbt "test-only <test-name>" 

而且根据this答案你应该把它首字母大写testOnly和使用-z参数

+0

SBT“只测试组织。 path.to.test.testClassName” – Kruser