Example #1
0
 def make_polarion_test_step(self):
     """
     Creates pylarion TestSteps
     """
     from pylarion.work_item import TestStep as PylTestStep
     ts = PylTestStep()
     args = ",".join(["Arg{}".format(i) for i in range(len(self.params))])
     step_args = unicode(args, encoding='utf-8')
     ts.values = [step_args, "PASS"]
     return ts
Example #2
0
 def make_polarion_test_step(self):
     """
     Creates pylarion TestSteps
     """
     from pylarion.work_item import TestStep as PylTestStep
     ts = PylTestStep()
     args = ",".join(["Arg{}".format(i) for i in range(len(self.params))])
     step_args = unicode(args, encoding='utf-8')
     ts.values = [step_args, "PASS"]
     return ts
Example #3
0
def generate_test_steps(steps_map):
    """Generate a new TestSteps object.

    Fill the steps information with the `steps_map` values.

    :param steps_map: a list of tuples mapping to each step and
        its expected result.
    """
    test_steps = TestSteps()
    test_steps.keys = ['step', 'expectedResult']
    steps = []
    for item in steps_map:
        test_step = TestStep()
        test_step.values = list(item)
        steps.append(test_step)
    test_steps.steps = steps
    return test_steps