Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-1891

Modify TestON to support test steps as part of some control/loop structure

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: None
    • Labels:

      Description

      Example of what TestOn does now
      This code:

          def CASE1( self, main ):
              main.case( "Testing steps in other statements" )
              main.step( "1.1 - the first one" )
              print "one"
              if True:
                  print " in the if"
                  main.step( "1.2 - inside the if" )
                  print "two"
                  main.step( "1.3 - inside the if" )
                  print "three"
              main.step( "1.4 - the last one" )
              print "four"
      

      Results in: (Note the test step numbers)

      [2015-05-08 13:17:51.895398] [StepTest] [CASE]  Testing steps in other statements
      [2015-05-08 13:17:51.895629] [StepTest] [STEP]  1.1: 1.1 - the first one
      one
       in the if
      [2015-05-08 13:17:51.895905] [StepTest] [STEP]  1.1: 1.2 - inside the if
      two
      [2015-05-08 13:17:51.896133] [StepTest] [STEP]  1.1: 1.3 - inside the if
      three
      [2015-05-08 13:17:51.896388] [StepTest] [STEP]  1.2: 1.4 - the last one
      four
      

      While TestON will run the code, it does not correctly understand the nested steps and won't include them as separate steps in the results or summary.

      This is a low priority as for most of our use cases we can get around this limitation.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            jhall Jon Hall
            Reporter:
            jhall Jon Hall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: