Calling an interface in Flow.create {}

39 views Asked by At

I am just checking this out if it works. I added a custom tml definition under origen_testers folder under my home directory inside ".origen" area. The TEST_METHODS block was added in the file "custom_tml.rb"

    module OrigenTesters
  module SmartestBasedTester
    class Base
      class TestMethods
        class CustomTml < BaseTml
          def initialize(test_methods, definitions)
            @definitions = definitions
            @klass = definitions[:class_name]
            super test_methods
          end
      TEST_METHODS = {

            my_custom_tm:              {
              class_name:  'mylib.mytm',
              param1:     [:string, ''],
              param2:     [:string, '']
            },

          }
          def klass
            @klass || ''
          end
        end
      end
    end
  end
end<p>

In my flow.create when generating a testflow file, how would i call this interface so i can use the newly added my_custom_tm testmethod? I tried Flow.create Interface: 'OrigenTesters' and that didnt work..Do I have to use the "::" and specify all the way to "Customtml"

1

There are 1 answers

0
rchitect-of-info On

Here is the documentation you need to review in order:

  1. Creating your own test interface
  2. Creating custom test methods

You should never have to make classes in the OrigenTesters namespace to do what you want to do.

regards