私は Eclipse プラグインを開発しており、各プラグインのテスト スイートのビルドと実行を自動化できるようにする必要があります。(ジュニット使用)
テストは Eclipse 内で動作しており、プラグインを実際のプラグインと単体テスト用のフラグメント プラグインに分割することができます。
ただし、上記の各アプローチは同じ問題を引き起こします。ビルドを発行するか、テストをトリガーする Java ant タスク/コマンドライン コマンドは、目に見える副作用を生成せず、値「13」を返します。私は見つけることができるすべてを試しましたが、Eclipse がどのように起動するかについてかなりのことを学びました (例: v3.3 以降、startup.jar は使用できなくなりました。存在しませんが、使用する必要があります)。org.eclipse.equinox.launcher )。残念ながら、これは明らかに必要な情報ですが、十分とは言えません。
私は Eclipse 3.4、Junit 4.3.1 (org.junit4 バンドルですが、むしろ JUnit 4.4 を使用したいと考えています。こちらを参照してください)を使用しています。
私の質問は、Eclipse プラグインのビルドとテストをどのように正確に自動化するのですか?
編集:明確にするために、 ant + クルーズ コントロールのようなものを使用したいのですが、Eclipse の外部で単体テストを実行することさえできません。同じことを達成する他のテクノロジーがあるため、「何かのような」と言います。MavenやBuckminsterなどを使用しているという理由だけで機能するソリューションを破棄するほどうるさくはありません。
Edit2:上記の「Java Result 13」は、coretestrunner が見つからないことが原因のようです。ログから:
java.lang.RuntimeException: Application "org.eclipse.test.coretestapplication" could not be found in the registry. The applications available are: org.eclipse.equinox.app.error, com.rcpquickstart.helloworld.application.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:242)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
at org.eclipse.core.launcher.Main.main(Main.java:30)
!ENTRY org.eclipse.osgi 2 0 2008-11-04 21:02:10.514
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2008-11-04 21:02:10.515
!MESSAGE Bundle update@plugins/org.eclipse.test_3.2.0/ [34] was not resolved.
!SUBENTRY 2 org.eclipse.test 2 0 2008-11-04 21:02:10.516
!MESSAGE Missing required bundle org.apache.ant_0.0.0.
!SUBENTRY 2 org.eclipse.test 2 0 2008-11-04 21:02:10.516
!MESSAGE Missing required bundle org.eclipse.ui.ide.application_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2008-11-04 21:02:10.518
!MESSAGE Bundle update@plugins/org.eclipse.ant.optional.junit_3.2.100.jar [60] was not resolved.
!SUBENTRY 2 org.eclipse.ant.optional.junit 2 0 2008-11-04 21:02:10.519
!MESSAGE Missing host org.apache.ant_[1.6.5,2.0.0).
!SUBENTRY 2 org.eclipse.ant.optional.junit 2 0 2008-11-04 21:02:10.519
!MESSAGE Missing required bundle org.eclipse.core.runtime.compatibility_0.0.0.