为什么使用 Tosca 抛出自动化数据驱动测试用例 -- 未找到适合命令 'XL' 的值

Why Automated Data Driven test cases using Tosca throwing -- No suitable value found for command 'XL'

我正在尝试使用 Tosca 自动化 Salesforce 实例,并且我使用 "Automated Data Driven test cases" 这只是使用 Tosca 工具记录测试用例选项,在我尝试通过 [= 执行测试用例时成功记录后21=] 选项,我看到错误为

No suitable value found for command 'XL'

奇怪,因为我看到 excel 的 Tosca 测试引擎中的值因记录 而生成 这里

这是来自 Tosca 的详细错误日志

            Tricentis.Automation.AutomationInstructions.TestActions.InvalidActionException: No suitable value found for command 'XL' ---> System.InvalidOperationException: No suitable value found for command 'XL'
            at Tricentis.Automation.AutomationInstructions.Dynamic.Values.ValueFactory.CreateValues(IParsed parsed, DataType dataType)
            at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
            at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
            at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
            at Tricentis.Automation.AutomationInstructions.Dynamic.Values.ValueFactory.CreateValue(IEnumerable`1 parsedItems, DataType dataType)
            at Tricentis.Automation.AutomationInstructions.Dynamic.ExpressionParser.ParseExpression(String expression, IEnumerable`1 tokenDefinitions, DataType dataType)
            at Tricentis.Automation.AutomationInstructions.Dynamic.ExpressionParser.GetAsValues[T](String expression, TokenDefinitionSet tokenDefinitionSet, DataType dataType)
            at Tricentis.Automation.AutomationInstructions.TestActions.AutomationObjectTestAction.get_Values()
            at Tricentis.Automation.AutomationInstructions.TestActions.AutomationObjectTextBoxTestAction.get_Values()
            at Tricentis.Automation.AutomationInstructions.TestActions.AutomationObjectTestAction.CreateSubTestActions()
            at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_InnerActions()
            --- End of inner exception stack trace ---
            at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_InnerActions()
            at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_Actions()
            at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.<>c.<get_ExecutableChildren>b__32_1(ITestAction testAction)
            at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
            at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
            at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
            at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_ExecutableChildren()
            at Tricentis.Automation.AutomationInstructions.TestActions.TestAction.get_ConstrainingChildren()
            at Tricentis.Automation.AutomationInstructions.TestActions.AutomationObjectSearchQuery.get_TestActionConstraints()
            at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.get_ConstrainingChildTestActions()
            at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.ConstrainBySubItems(IEnumerable`1 representations)
            at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.ConstrainInternal(IEnumerable`1 representations, IModuleAttributeXParameters parameters)
            at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.Constrain(IEnumerable`1 representations)
            at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.SearchRepresentations(IAdapterController adapterController)
            at Tricentis.Automation.Engines.Representations.Controllers.RootRepresentationController.SearchRepresentation()
            at Tricentis.Automation.Engines.Representations.Controllers.RepresentationController.Search()
            at ᜁ.ᜀ(IRepresentationController A_0)
            at ᜁ.ᜁ(IRepresentationController A_0, IRepresentation& A_1)
            at ᜂ.ᜀ(IRepresentationController A_0, IRepresentation& A_1)
            at ᜁ.ᜀ()

我什至收到了同样的错误信息。但现在解决了。我尝试如下: 将测试用例转换为模板,并通过在相应位置拖放将测试 Sheet 属性添加到模板。如果此时您尝试 运行 测试步骤,那么您将收到此错误消息“找不到命令 'XL' 的合适值”, 这可以通过菜单中的“创建模板实例”或工具栏图标中的实例化图标然后 运行 便签簿中的实例化项目来避免。它应该可以正常工作而不会出现任何错误消息。我使用了多个用户案例,它们都有效。 注意:其他观察:确保您没有使用右键单击和交叉标记删除单元格中的值。进入牢房然后移除。

当您尝试从模板而非模板实例 运行 测试用例时,您会收到此“找不到命令 'XL' 的合适值”!