簡體   English   中英

在POM XML surefire插件上指定平台名稱

[英]Specify Platform Name on a POM XML surefire plugin

我正在嘗試在Windows 10環境中使用Intellij IDEA為並行移動自動化設置此項目 當我從IDE終端使用指定的命令“ mvn clean -Dtest = Runner test -DPlatform = android”運行項目時,我得到以下輸出:

[INFO]運行com.appium.tests.Runner [錯誤]測試運行:1,失敗:1,錯誤:0,跳過:0,經過時間:0.247秒<<<失敗! -com.appium.tests.Runner中的錯誤[ERROR] testApp(com.appium.tests.Runner)經過的時間:0.01 s <<<失敗! java.lang.IllegalArgumentException:請在平台環境下執行:Platform = android / ios / boss mvn clean -Dtest = Runner.com.appium.tests.Runner.testApp(Runner.java:14)

在我的surefire插件下的POM.XML上,我將其放置為屬性變量$ {Platform},IDEA無法識別該變量,並顯示錯誤“無法解析符號'Platform'”

       <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.0</version>
            <configuration>
                <properties>
                    <Platform>${Platform}</Platform>
                </properties>
            </configuration>
        </plugin>

任何幫助將不勝感激。

嘗試systemPropertyVariables

<systemPropertyVariables>
            <Platform>${Platform}</Platform>
</systemPropertyVariables>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM