环境:QAF Java:8 TestNG:6.10 Appium:1.18.0-1 IVY ivy.xml BDDTestFactory Android 设备:OS 9
在尝试在 Android 设备上运行任何场景时,它会抛出异常。它在 iOS 设备上运行良好,而且以前在 Android 上也运行良好。
<dependencies>
<dependency org="com.qmetry" name="qaf" rev="3.0.0-RC3"/>
<dependency org="com.qmetry" name="qaf-support" rev="3.0.0-RC3"/>
<dependency org="com.qmetry" name="qaf-support-ws" rev="3.0.0-RC3"/>
<dependency org="org.aspectj" name="aspectjtools" rev="1.9.5"/>
<dependency org="org.aspectj" name="aspectjweaver" rev="1.9.5" />
<dependency org="ant-contrib" name="ant-contrib" rev="1.0b3"/>
<dependency org="io.appium" name="java-client" rev="7.3.0"/>
<dependency org="org.seleniumhq.selenium" name="selenium-java" rev="3.141.59" force="true"/>
</dependencies>
例外:
java.lang.IllegalArgumentException: Key for add operation must be defined!
at org.apache.commons.configuration.tree.DefaultExpressionEngine.prepareAdd(DefaultExpressionEngine.java:419)
at org.apache.commons.configuration.HierarchicalConfiguration.addPropertyDirect(HierarchicalConfiguration.java:383)
at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration.addPropertyDirect(AbstractHierarchicalFileConfiguration.java:146)
at com.qmetry.qaf.automation.util.PropertyUtil.addPropertyDirect(PropertyUtil.java:107)
at org.apache.commons.configuration.AbstractConfiguration.addPropertyValues(AbstractConfiguration.java:422)
at org.apache.commons.configuration.AbstractConfiguration.copy(AbstractConfiguration.java:1241)
at com.qmetry.qaf.automation.util.PropertyUtil.loadFile(PropertyUtil.java:215)
at com.qmetry.qaf.automation.util.PropertyUtil.load(PropertyUtil.java:202)
at com.qmetry.qaf.automation.core.ConfigurationManager.addBundle(ConfigurationManager.java:193)
at com.qmetry.qaf.automation.core.ConfigurationManager.addBundle(ConfigurationManager.java:160)
at com.qmetry.qaf.automation.core.ConfigurationManager$PropertyConfigurationListener.configurationChanged(ConfigurationManager.java:418)
at org.apache.commons.configuration.event.EventSource.fireEvent(EventSource.java:249)
at org.apache.commons.configuration.AbstractConfiguration.copy(AbstractConfiguration.java:1247)
at com.qmetry.qaf.automation.util.PropertyUtil.addAll(PropertyUtil.java:180)
at com.qmetry.qaf.automation.core.ConfigurationManager.addAll(ConfigurationManager.java:285)
at com.qmetry.qaf.automation.testng.TestNGTestCase.setupTest(TestNGTestCase.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:217)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:144)
at org.testng.TestRunner.beforeRun(TestRunner.java:656)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
at org.testng.TestNG.runSuites(TestNG.java:1133)
at org.testng.TestNG.run(TestNG.java:1104)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)