0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Intellij IDEA】特定の内容を除いてテストを実行する【JUnit】

Posted at

Intellij IDEARun/Debug ConfigurationsJUnitの設定で、特定の内容を除いてテストを実行します。
例えば、「このパッケージ内のテストとこの名前を含むテストを除外する」というようなことをやります。

やり方

Configuration -> Test KindPatternを指定し、除外したい内容を正規表現で弾けばできます。
この正規表現はJavaPatternで動いているので、正規表現の文法もそれに準じたものになります。
スクリーンショット 2021-03-05 0.07.02.png
画像として貼っているのは、foo, barという2種類のパッケージを除いて実行する正規表現です。

^(?!.*\.(foo|bar)\.).*

ツールを用いて可視化すると以下のようになります。
スクリーンショット 2021-03-05 0.10.43.png

参考にさせて頂いた内容

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?