如何以编程方式运行 Eclipse 启动配置?

发布于 2024-07-07 19:52:59 字数 564 浏览 7 评论 0原文

我发现很难很好地表达这个问题,因为有很多通用术语(运行、配置、启动等)。 这里是:

您可以 将运行配置保存在 中.launch 文件。 (在“运行配置”对话框中的“公共”选项卡下,“另存为共享文件”。

我们将这些文件签入 SVN。开发人员可以传递它们,这有助于让新开发人员更快地运行工作应用程序。

我想检查一下将它们作为我们构建的一部分,并使用它们以编程方式运行应用程序、测试等,而无需启动整个 IDE

在外部运行 .launch 文件的最佳方式是什么 。 UI?

编辑:我正在尝试统一在构建服务器和 IDE 上运行的测试。 特别想放弃集成调试,使用 ant 脚本来运行测试就是这种情况。

对于多个捆绑包的集成测试或对整个捆绑包进行单元测试(您想要模拟扩展),这可能是一个更大的问题。

I'm finding it difficult to phrase this question well, as there are quite a few generic terms (run, configuration, launch, etc.). Here goes:

You can save run configurations in a .launch file. (in the Run Configuration Dialog, under the Common tab, Save as a shared file.

We check these in to SVN. The developers can pass them around, and it helps getting new devs running a working application quicker.

I'd like to check these out as part of our build and use them to programatically run the application, the tests, etc, without spinning up the whole IDE.

What would be the best way to run a .launch file outside of the UI?

Edit: I am trying to unify the tests run on the build server and the IDE. I do not
particularly want to give up integrated debugging, which would be the case with an ant script to run the tests .

This is probably more a problem for integration testing with multiple bundles, or unit testing a whole bundle, where you'd like to mock up extensions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

浅忆流年 2024-07-14 19:52:59

有一个基于 JUnit 构建的 eclipse 插件,称为 TPTP。 它提供了一个自动化客户端,可用于在没有 GUI 的情况下从 Eclipse 启动测试。 也许有帮助

there is an eclipse plugin built over JUnit, called TPTP. It provides an automation client which can be used to launch the test from eclipse with no gui. maybe it helps

羁拥 2024-07-14 19:52:59

Ant4Eclipse 可能会提供一个关于如何执行此操作的良好起点。

不幸的是,这仅限于 Java 应用程序和 JUnit 配置; 我对 PDE 应用程序和插件 JUnit 测试更感兴趣。

Ant4Eclipse may provide a good starting point on how to do this.

Unfortunately, this is limited to Java Applications and JUnit configurations; I am more interested in PDE applications and Plugin JUnit tests.

本宫微胖 2024-07-14 19:52:59

最近,我使用 Eclipse Buckminster 在 Hudson CI 服务器内构建了 Eclipse RCP 应用程序,取得了很多成功。 这需要做一些工作,但是一旦我设置了这两个功能,使我的 RCP 产品基于功能,并添加了巴克明斯特查询文件等,它就起作用了。 有一个 Hudson/Jenkins Buckminster 插件,允许我让 hudson 构建应用程序。

保存每个测试片段的启动配置后,我创建了 hudson 命令来调用它们(不幸的是,每个测试片段一行),但之后我得到了我想要的自动化 CI 构建。

I have recently had alot of success building an Eclipse RCP app inside a Hudson CI server using Eclipse Buckminster. It took a bit of doing, but once I setup both features, made my RCP product be based on features, and added the Buckminster query files and the like, it worked. There is a Hudson/Jenkins Buckminster plugin that allowed me to have hudson build the application.

After saving the launch configurations for each test fragment, I created hudson commands to invoke them (yes one line per test fragment unfortunately), but after that I got the automated CI build that I wanted.

聊慰 2024-07-14 19:52:59

您还可以使用 Eclipse 使用的 shell 命令。 要获取它:

  1. 在 Eclipse 中运行程序
  2. 转到“调试”视图
  3. 右键单击​​进程(可能是树中的第二项)并选择“属性”
  4. 复制 shell 命令并删除 agentlib 标志以在 bash 中运行

You could also use the shell command Eclipse uses. To get it:

  1. Run your program in Eclipse
  2. Go to the "Debug" view
  3. Right-click on the process (probably the second item in the tree) and select "Properties"
  4. Copy shell command and delete the agentlib flag to run in bash
醉生梦死 2024-07-14 19:52:59

我认为您不需要使用 .launch 配置来运行测试。 如果您使用 Eclipse 构建系统构建应用程序,则可以使用 Eclipse 中的 AntRunner 应用程序来运行单元测试。 这不会启动整个 IDE。

本文介绍如何在构建过程中运行测试 。 通过此过程,您可以使用特殊的“测试”Eclipse 并加载要测试的插件。

I think you don't need to use the .launch configurations to run the tests. If you build an application using the Eclipse Build System, then you can use the AntRunner application from Eclipse to run your units tests. This doesn't start the whole IDE.

This article describes how to run the tests during your build process. With this process, you use a special "Test" Eclipse and load the plugins you want to test.

旧人九事 2024-07-14 19:52:59

也许以运行您自己的自定义运行配置的方式运行配置会有所帮助。 本文对此进行了描述。

Perhaps running the configurations the way you would run your own custom run configurations would help here. It is described in this article.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文