0

我是 maven tycho 的新手,我们有一个使用 RCP 4.18 和 Java 11 开发的应用程序,它可以自行成功运行;我们在 Eclipse JEE 中创建了一个单独的 Maven 项目,以使用 Tycho-Surefire-plugin 运行黄瓜测试脚本进行回归测试。但是,Tycho-surefire 在启动应用程序时没有成功加载其菜单项。报了很多类似下面的错误信息:</p>

2021 年 12 月 2 日下午 4:08:13 org.eclipse.ui.internal.PluginActionBuilder ideLog(PluginActionBuilder.java:527) 错误:插件 org.eclipse.ui:插件“com.xxx.arc.sdm.management”提供了无效的菜单扩展(路径:“toolsMenu”无效):PricingTool2.action.signin

附加父 POM.xml 的一部分:

<groupId>com.xxx.sdm</groupId>
<artifactId>sdm-cucumber-configuration</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
    <tycho.version>1.7.0</tycho.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <swtbot.timeout>15000</swtbot.timeout>
    <swtbot.delay>25</swtbot.delay>
    <common-surefire-args>-Xmx4096M -Dosgi.locking=none -DpersistState=false -Dorg.eclipse.swtbot.search.timeout=${swtbot.timeout} -Dorg.eclipse.swtbot.playback.delay=${swtbot.delay} -Dlogging_level=ERROR</common-surefire-args>
    <debug-surefire-args>-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y</debug-surefire-args>
    <mac-surefire-args>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</mac-surefire-args>
    <target.platform.artifact>sdm-cucumber-target</target.platform.artifact>
    <cucumber.version>4.8.1</cucumber.version>
    <poi.version>4.1.2</poi.version>
</properties>

和 pom.xml 相关的 tycho-surefire-plugin:

            <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-surefire-plugin</artifactId>
            <version>${tycho.version}</version>
            <configuration>
                <useUIHarness>true</useUIHarness>
                <useUIThread>false</useUIThread>
                <product>PricingTool2.product</product>

                <testRuntime>p2Installed</testRuntime> 
                <profileName>profile</profileName>

                <!-- Location of SDM client installation -->
                <work>${env.SDM_CLIENT_LOCATION}</work>
                <osgiDataDirectory>${env.SDM_WORKSPACE_LOCATION}</osgiDataDirectory>

                <deleteOsgiDataDirectory>false</deleteOsgiDataDirectory>

                <argLine>${surefire-args} -Dcucumber.options="${cucumber.options}"</argLine>

                <!-- TODO remove these debug properties -->
                <showEclipseLog>true</showEclipseLog>
            </configuration>
        </plugin>

如果有人可以提供帮助,我们将不胜感激。谢谢。

4

0 回答 0