Automating unit tests (junit) for Eclipse Plugin development

后端 未结 7 1169
野趣味
野趣味 2020-12-07 23:31

I am developing Eclipse plugins, and I need to be able to automate the building and execution of the test suite for each plugin. (Using Junit)

Test are working with

7条回答
  •  情话喂你
    2020-12-07 23:58

    For any one still looking for a way to execute Eclipse plugin tests outside Eclipse, the following command works for me:

    java -Xms40m -Xmx1024m -XX:MaxPermSize=512m -Dorg.eclipse.swt.browser.DefaultType=mozilla -Declipse.pde.launch=true -classpath C:\eclipse\eclipse-standard-luna-M2-win32-x86_64\eclipse\plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar org.eclipse.equinox.launcher.Main -port 22 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames testpackage.testClass -application org.eclipse.pde.junit.runtime.uitestapplication -data C:\temp\log.temp -dev bin -consoleLog -testpluginname PluginName
    

    -classpath should be set to Eclipse launcher jar. You can get exact version for your Eclipse from eclipse.ini file.

    -className is the junit plugin test file name

    -data is set to a temp file.

    -testpluginname is the name of plugin you want to test.

提交回复
热议问题