Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SOAVIRT_9.10.6_CTP_3.1.2

...

  1. 右键单击上个练习中的 Test 1: getItemByTitle 节点,然后选择 Add Output
  2. 在添加输出(Add Output)向导中,在左侧选择 在 Add Output 向导中,在左侧选择 Response> SOAP Envelope ,右侧选择 XML Assertor ,然后单击 Finish
  3. 在打开的 XML 断言器面板中,打开 Configuration 选项卡,并单击 Add
  4. 在 Select Assertion 向导中,展开 Value Assertions,选择 String Comparison Assertion,然后单击 Next。字符串比较断言(String 。String Comparison Assertion)对话框将显示 Assertion 对话框将显示 XML 消息的树视图。在这里,你可以选择要强制执行的单个值。
  5. 从字符串比较断言对话框中选择从 String Comparison Assertion 对话框中选择 name 元素,然后单击 Finish



    XML 断言器的 Configuration 选项卡现在使用字符串比较断言填充。
  6. 在 XML 断言器的 Configuration 选项卡中,从 Element must 下拉菜单选择 contain ,从 Expected Value 下拉菜单选择 Parameterized ,从最后一个下拉菜单选择 Keywords



  7. 将变更保存到 XML 断言器配置。
  8. 单击 Test 工具栏按钮。

注意,由于前面忽略的相同 XPath(在 Excluding Dynamic Values from Diff Comparisons中),测试将在几次运行后失败。如果为了忽略相同的 XPath,配置了新的差异(Diff)工具,则测试将成功。XPath,配置了新的 Diff 工具,则测试将成功。