Exemplo n.º 1
0
 def __init__(self,
              *,
              duration: int,
              scope: Scope = Scope.MAIN,
              name: str = 'Duration Assertion',
              comments: str = '',
              is_enabled: bool = True):
     self.duration = duration
     self.scope = scope
     BasicAssertion.__init__(self,
                             name=name,
                             comments=comments,
                             is_enabled=is_enabled)
Exemplo n.º 2
0
 def __init__(self,
              *,
              size: int,
              test_field: TestField = TestField.FULL,
              operator: Operator = Operator.EQUAL,
              scope: Union[str, Scope] = Scope.MAIN,
              name: str = 'Size Assertion',
              comments: str = '',
              is_enabled: bool = True):
     self.size = size
     self.test_field = test_field
     self.operator = operator
     self.scope = scope
     BasicAssertion.__init__(self,
                             name=name,
                             comments=comments,
                             is_enabled=is_enabled)
Exemplo n.º 3
0
 def __init__(self, *,
              validation: bool = False,
              expect_null: bool = False,
              invert: bool = False,
              is_regex: bool = True,
              expected_value: str = '',
              json_path: str = '$.',
              name: str = 'JSON Assertion',
              comments: str = '',
              is_enabled: bool = True
              ):
     self.validation = validation
     self.expect_null = expect_null
     self.invert = invert
     self.is_regex = is_regex
     self.expected_value = expected_value
     self.json_path = json_path
     BasicAssertion.__init__(
         self, name=name, comments=comments, is_enabled=is_enabled)
Exemplo n.º 4
0
    def __init__(self, *,
                 cache_key: bool = True,
                 filename: str = '',
                 parameters: str = '',
                 script: str = '',
                 script_language: ScriptLanguage = ScriptLanguage.GROOVY,
                 name: str = 'JSR223 Assertion',
                 comments: str = '',
                 is_enabled: bool = True
                 ):
        """

        :type source_type: object
        """
        JSR223.__init__(self,
            cache_key=cache_key,
            filename=filename,
            parameters=parameters,
            script=script,
            script_language=script_language)
        BasicAssertion.__init__(
            self, name=name, comments=comments, is_enabled=is_enabled)
Exemplo n.º 5
0
 def __init__(self,
              *,
              ignore_status: bool = False,
              test_field: TestField = TestField.RESPONSE_BODY,
              test_type: TestType = TestType.SUBSTRING,
              test_type_not: bool = False,
              test_type_or: bool = False,
              patterns: List[str] = [],
              custom_message: str = '',
              scope: Union[str, Scope] = Scope.MAIN,
              name: str = 'Response Assertion',
              comments: str = '',
              is_enabled: bool = True):
     self.ignore_status = ignore_status
     self.test_field = test_field
     self.setTestType(test_type, test_type_not, test_type_or)
     self.custom_message = custom_message
     self.patterns = patterns
     self.scope = scope
     BasicAssertion.__init__(self,
                             name=name,
                             comments=comments,
                             is_enabled=is_enabled)
Exemplo n.º 6
0
 def test_positive6(self):
     TestPlan().append(BasicAssertion())
 def test_positive6(self):
     BasicTestFragment().append(BasicAssertion())
 def test_positive6(self):
     BasicController().append(BasicAssertion())
Exemplo n.º 9
0
 def test_positive6(self):
     BasicThreadGroup().append(BasicAssertion())
Exemplo n.º 10
0
 def test_positive4(self):
     BasicSampler().append(BasicAssertion())