0

我正在根据从 Verigy 收到的 ASCII 文件导入所有Verigy 93k 测试方法的参数。在导入时,测试方法属性别名和方法是未知的。它们可以在以后由各种开发人员静态创建吗?下面的代码只是我试图自动创建的测试方法参数哈希的一个片段。

谢谢

add_tml :my93k,
    class_name:      'my93k',
    Functional: {
      class_name:   'Functional',
      'ErrorMap.DutCyclesPerTesterCycles' => [:string,  '1'],
      'ErrorMap.EdgesPerTesterCycle' => [:string,  '4'],
      'ErrorMap.Location' => [:string,  'RAM'],
      # Attribute aliases can be defined like this:
      aliases: {
      },
      # Define any methods you want the test method to have
      methods: {
      }
    },

    my_other_test: {
      # Define another test in exactly the same way...
    }
end
4

1 回答 1

0

今天没有办法做到这一点,但我认为如果你愿意,添加这种功能并不难。

从上面的示例中,test_methods.my93k.Functional将返回一个实例OrigenTesters::SmartestBasedTester::Base::TestMethod,该实例在此处定义:https ://github.com/Origen-SDK/origen_testers/blob/5b89bf287b3d307bd6708c878666f3609a5fd3af/lib/origen_testers/smartest_based_tester/base/test_method.rb

实例化时,分配给上面的哈希的内容:Functional作为初始化选项传入。TestMethod如果您查看该initialize方法的实现,您将看到它定义别名和方法的位置。

您可以通过一些新方法公开相同的功能,以便为开发人员提供 API,以便稍后在流程中添加其他别名和方法。例如test_methods.my93k.Functional.add_alias(:blah)

于 2017-08-28T09:22:22.390 回答