Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Antを使用した単体テストでの実行に問題があるため、私のテストクラスはJmockを使用しています。
@RunWith(JMock.class)
各テスト方法を識別するための注釈。ant(1.7.1)でビルドしようとすると、
[junit]MyTestClassにテストが見つかり ません[junit]junit.framework.AssertionFailedError:テストが見つかりません
助言がありますか?
どのバージョンのJUnitを使用していますか?org.junit私には3.8のように見えますが(誤解される可能性はありますが)、JUnit4.xのパッケージ構造は次のとおりです。junit.framework
org.junit
junit.framework
JMockの@RunWith連中によって定義されたランナーは、JUnit4.xでのみ有効です。
@RunWith
JUnit 3を使用している場合は、Runnerを使用する代わりに、MockObjectTestCaseから継承する必要があります。