开发者

Specify a default product for new SWTBot Eclipse run configurations

开发者 https://www.devze.com 2023-02-22 16:16 出处:网络
I\'m developing an Eclipse RCP application and running automated GUI tests using SWTBot. When I want to run a test from within Eclipse I right click on the test method (or class), then click \"Run As\

I'm developing an Eclipse RCP application and running automated GUI tests using SWTBot. When I want to run a test from within Eclipse I right click on the test method (or class), then click "Run As" -> "SWTBot Test". This then runs the test and creates a run configuration.

The problem is that when the run configuration is created for the first time, it always uses the "开发者_运维问答org.eclipse.sdk.ide" product by default (in the "Main" tab of the run configuration"). This means the test will run the Eclipse IDE product and try to run my SWTBot tests on it. I have to manually edit the run configuration to use my RCP application's product file and run it a second time.

How can I specify a default product to use for all newly-created SWTBot run configurations?


When running the test, bring up the run configuration dialog by choosing "Run as..." In the dialog, under the tab "common", choose to make it a shared run configuration. It will now create a *.launch file in the directory you choose.

Set all other parameters as you which. The next time you want to run the SWTBot test again, you run the launch file instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号