I am trying to setup this project for Parallel Mobile automation using Intellij IDEA on a Windows 10 environment. When I run the project with the specified command "mvn clean -Dtest=Runner test -DPlatform=android" from the IDE terminal I have this output:
[INFO] Running com.appium.tests.Runner [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.247 s <<< FAILURE! - in com.appium.tests.Runner [ERROR] testApp(com.appium.tests.Runner) Time elapsed: 0.01 s <<< FAILURE! java.lang.IllegalArgumentException: Please execute with Platform environment:: Platform=android/ios/both mvn clean -Dtest=Runner test at com.appium.tests.Runner.testApp(Runner.java:14)
On my POM.XML under surefire plugin I put as a property variable ${Platform} which is not recognized by the IDEA with an error "Cannot resolve symbol '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>
Any help will be appreciated.
try systemPropertyVariables
<systemPropertyVariables>
<Platform>${Platform}</Platform>
</systemPropertyVariables>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.