testbuilder/core/base/basetest.py
def run(self):
        """Runs the current test case. 

        Steps taken to run test are

        1. Create empty step context
        2. Load first step
        3. Update context for current step
        4. Run middlewares for 'BEFORE_STEP'
        5. Dispatch step to middlewares
        6. Run middlewares for 'AFTER_STEP'
        7. Update current Step
        8. Go to step 3. Unless last step
        
        Raises:
            ImproperlyConfigured -- If the test is not ready, this is raised
        """

        if not self.ready():
            raise ImproperlyConfigured("Cannot start testcase because the test is not ready")
        
        step_context = StepContext(self)

        while self.current_step is not None: # End condition when no more steps
            # Step 1. Update context
            step_context.update_context(self.current_step, step_context)

            # Step 2. Run middlewares for `before_step`
            self.run_middlewares(step_context, MIDDLEWARE_MODE_BEFORE_STEP)

            # Step 3. Run Step
            try:
                self.execute_step(step_context)
            except Exception as e:
                step_context.step_settings["Exception"] = e
                self.run_middlewares(step_context, MIDDLEWARE_MODE_STEP_FAILURE)
                break

            # Step 4. Run middleswares for `after_step`
            self.run_middlewares(step_context, MIDDLEWARE_MODE_AFTER_STEP)

            # Step 5. Update step
            self.current_step = step_context.next_step


        # Prepare TearDown Steps
        self.current_step = self.tear_down_first_step
        
        # Step 6. Run TearDown steps
        while self.current_step is not None:
            step_context.update_context(self.current_step, step_context)
            self.run_middlewares(step_context, MIDDLEWARE_MODE_TEARDOWN_BEFORE_STEP)
            self.execute_step(step_context)
            self.run_middlewares(step_context, MIDDLEWARE_MODE_TEARDOWN_AFTER_STEP)
            self.current_step = step_context.next_step
Runs the current test case. 

        Steps taken to run test are

        1. Create empty step context
        2. Load first step
        3. Update context for current step
        4. Run middlewares for 'BEFORE_STEP'
        5. Dispatch step to middlewares
        6. Run middlewares for 'AFTER_STEP'
        7. Update current Step
        8. Go to step 3. Unless last step
        
        Raises:
            ImproperlyConfigured -- If the test is not ready, this is raised
        
Runs the current test case.
Steps taken to run test are

1. Create empty step context
2. Load first step
3. Update context for current step
4. Run middlewares for 'BEFORE_STEP'
5. Dispatch step to middlewares
6. Run middlewares for 'AFTER_STEP'
7. Update current Step
8. Go to step 3. Unless last step

- If the test is not ready, this is raised
Runs the current test case . Steps taken to run test are 1 . Create empty step context 2 . Load first step 3 . Update context for current step 4 . Run middlewares for ' BEFORE_STEP ' 5 . Dispatch step to middlewares 6 . Run middlewares for ' AFTER_STEP ' 7 . Update current Step 8 . Go to step 3 . Unless last step - If the test is not ready this is raised
def run(self):
        if not self.ready():
            raise ImproperlyConfigured("Cannot start testcase because the test is not ready")
        step_context = StepContext(self)
        while self.current_step is not None: 
            step_context.update_context(self.current_step, step_context)
            self.run_middlewares(step_context, MIDDLEWARE_MODE_BEFORE_STEP)
            try:
                self.execute_step(step_context)
            except Exception as e:
                step_context.step_settings["Exception"] = e
                self.run_middlewares(step_context, MIDDLEWARE_MODE_STEP_FAILURE)
                break
            self.run_middlewares(step_context, MIDDLEWARE_MODE_AFTER_STEP)
            self.current_step = step_context.next_step
        self.current_step = self.tear_down_first_step
        while self.current_step is not None:
            step_context.update_context(self.current_step, step_context)
            self.run_middlewares(step_context, MIDDLEWARE_MODE_TEARDOWN_BEFORE_STEP)
            self.execute_step(step_context)
            self.run_middlewares(step_context, MIDDLEWARE_MODE_TEARDOWN_AFTER_STEP)
            self.current_step = step_context.next_step
def run ( self ) : if not self . ready ( ) : raise ImproperlyConfigured ( "Cannot start testcase because the test is not ready" ) step_context = StepContext ( self ) while self . current_step is not None : step_context . update_context ( self . current_step , step_context ) self . run_middlewares ( step_context , MIDDLEWARE_MODE_BEFORE_STEP ) try : self . execute_step ( step_context ) except Exception as e : step_context . step_settings [ "Exception" ] = e self . run_middlewares ( step_context , MIDDLEWARE_MODE_STEP_FAILURE ) break self . run_middlewares ( step_context , MIDDLEWARE_MODE_AFTER_STEP ) self . current_step = step_context . next_step self . current_step = self . tear_down_first_step while self . current_step is not None : step_context . update_context ( self . current_step , step_context ) self . run_middlewares ( step_context , MIDDLEWARE_MODE_TEARDOWN_BEFORE_STEP ) self . execute_step ( step_context ) self . run_middlewares ( step_context , MIDDLEWARE_MODE_TEARDOWN_AFTER_STEP ) self . current_step = step_context . next_step
Runs the current test case.
Runs the current test case .
"""Runs the current test case. 

        Steps taken to run test are

        1. Create empty step context
        2. Load first step
        3. Update context for current step
        4. Run middlewares for 'BEFORE_STEP'
        5. Dispatch step to middlewares
        6. Run middlewares for 'AFTER_STEP'
        7. Update current Step
        8. Go to step 3. Unless last step
        
        Raises:
            ImproperlyConfigured -- If the test is not ready, this is raised
        """ # End condition when no more steps # Step 1. Update context # Step 2. Run middlewares for `before_step` # Step 3. Run Step # Step 4. Run middleswares for `after_step` # Step 5. Update step # Prepare TearDown Steps # Step 6. Run TearDown steps
self