LoginSignup
29
19

More than 5 years have passed since last update.

Scalatest: 特定のテストケースだけ実行したい

Last updated at Posted at 2014-03-06

特定のテストクラスだけを実行する

testOnlyコマンドを使う。

例: FooBarSpecを実行する

> testOnly FooBarSpec

例: FooBarSpecで終わるテストだけを実施する

> testOnly *FooBarSpec

例: foo.barパッケージ配下のテストだけを実行する

> testOnly foo.bar.*

特定のテストケースだけを実行する

テストクラスの中の特定のテストケースだけを実行するには、-zオプションを用いる。

例: テストケース名に「hoge」を含むものだけを実行する

> testOnly FooBarSpec -- -z hoge

テストクラスを補完に出したい

test:compileを実行し、テストクラスをコンパイルしておくと、テストケースが補完されるようになる。

> test:compile
29
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
29
19