gpt4 book ai didi

java - QAF:java.lang.IllegalArgumentException:必须定义添加操作的键

转载 作者:行者123 更新时间:2023-12-04 09:00:22 26 4
gpt4 key购买 nike

环境:
质量保证基金
java :8
测试版:6.10
Appium:1.18.0-1
Ivy
Ivy .xml
BDD测试工厂
安卓设备: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>
异常(exception):
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)

最佳答案

这很可能是因为没有 key 的属性(property)。逐行检查每个属性文件并删除不必要的行。有时它会观察到结帐后合并冲突文件包含需要清理的冲突信息。

关于java - QAF:java.lang.IllegalArgumentException:必须定义添加操作的键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63591865/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com