簡體   English   中英

為什么 eclipse 在我的 class 中運行所有 Junit 測試?

[英]Why is eclipse running ALL Junit tests in my class?

I've noticed an issue with running JUnit tests recently with Eclipse that when you request it to run a single test from a class (either from the JUnit view, or using the "Run As/Debug As JUnit test" context command from inside a function 定義,甚至創建一個新的運行或調試配置來指定特定的測試名稱)它將始終運行該 class 中的所有測試。 同事的機器上也出現了同樣的問題,所以這不是我的設置所特有的。 這從來沒有發生過,我不確定它是什么時候開始的。 這意味着我實際上必須為我不想運行的所有測試禁用/注釋掉 @Test 注釋,所以顯然很煩人。 其他任何人都觀察到了這一點,甚至更好,想出了如何解決?

謝謝!

(PS 抱歉,如果這在技術上不符合編程問題,但似乎沒有太多其他論壇我可能會得到更好的回應)。

這似乎是由於使用了 BurstJunit4 ( https://github.com/square/burst ) - 這似乎不尊重僅運行單個測試的請求。 即使使用最新的 IntelliJ 等,它仍然會發生。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM