跳转至

脚本对象模型

脚本时 要求外部方案 将会成为脚本语言 卢亚 ⁇ :

对象模型如下所述,即: Zeta Test Management 皆令现身.

你可以在卢亚的剧本里读到这些

系统对象

该 system- 对象代表当前系统,即当前实例: Zeta Test Management 并提供下列要素:

  • void log(string text)
  • string combine(string s1, string s2)
  • string baseFolderPath
  • runResult run(string commandLine, int successReturnCode = 0, int retryCount = 0, string logMode = null, bool waitForExit = true)

运行结果对象

该 runResult- 对象代表一个结果 system.run- 呼吁并提供下列要素:

  • int exitCode
  • bool cancelled
  • string output
  • string error

如果你是的话 exitCode 指定“-2147483648”的值(对应 INT. 明华 C# 中,然后不检查返回值。 否则,如果调用程序的实际返回值与预期值不符,则检查返回值并生成错误消息.

项目对象

该 project- 对象代表当前装入的 项目 并提供下列要素:

  • —

用户对象

该 user- 对象表示当前登录的 用户 并提供下列要素:

  • —

测试运行对象

该 testRun- 对象代表当前 测试运行 并提供下列要素:

  • —

已规划的TestCase对象

该 plannedTestCase- 对象代表当前要测试的对象 计划测试案例 并提供下列要素:

  • testCase testCase

试题对象

该 testCase- 对象代表当前要测试的对象 测试大小写 并提供下列要素:

  • —

已规划的TestCase变异对象

该 plannedTestCaseVariant- 对象代表当前要测试的对象 计划测试案例变式 并提供下列要素:

  • —

项目对象

该 resultItem- 对象代表当前 结果要素 并提供下列要素:

  • public void addAttachment(string filePath, bool linkDynamically = false)
    导入附件 。
  • void addRemarks(object remarks)
    添加注释为文本。 也可以被多次调用.
  • void setResult(string result)
    将测试大小写的结果(选择列表)设定为项目设置中定义的指定值。
  • void setAttribute(string name, string value)
    设置自定义字段为值。