Esempio n. 1
0
    def __init__(self,
                 name: str = 'JDBC Request',
                 data_source: str = '',
                 query_type: QueryType = QueryType.SELECT_STATEMENT,
                 query: str = '',
                 parameter_values: Union[List[str], None] = None,
                 parameter_types: Union[List[str], None] = None,
                 variable_names: str = '',
                 result_variable_name: str = '',
                 query_timeout: Union[int, None] = None,
                 handle_result_set: ResultSetHandler = ResultSetHandler.
                 STORE_AS_STRING,
                 comments: str = '',
                 is_enabled: bool = True):

        IncludesElements.__init__(self)
        BasicSampler.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
        self.handle_result_set = handle_result_set
        self.result_variable_name = result_variable_name
        self.variable_names = variable_names
        self.parameter_types = parameter_types
        self.parameter_values = parameter_values
        self.query_timeout = query_timeout
        self.query = query
        self.query_type = query_type
        self.data_source = data_source
Esempio n. 2
0
 def __init__(self,
              name: str = 'BasicController',
              comments: str = '',
              is_enabled: bool = True):
     IncludesElements.__init__(self)
     super().__init__(name=name,
                      comments=comments,
                      is_enabled=is_enabled)
Esempio n. 3
0
 def __init__(self, *,
              ignoreSubControllers: bool = False,
              accrossThreads: bool = False,
              name: str = 'Interleave Controller',
              comments: str = '',
              is_enabled: bool = True,):
     self.ignoreSubControllers = ignoreSubControllers
     self.accrossThreads = accrossThreads
     IncludesElements.__init__(self)
     BasicController.__init__(self, name=name, comments=comments, is_enabled=is_enabled)         
Esempio n. 4
0
 def __init__(self, *,
              perThread: bool = False,
              throughput: float = 1,
              throughputMode: ThroughputMode = ThroughputMode.TOTAL,
              name: str = 'Throughput Controller',
              comments: str = '',
              is_enabled: bool = True,):
     self.throughputMode = throughputMode
     self.perThread = perThread
     self.throughput = throughput
     IncludesElements.__init__(self)
     BasicController.__init__(self, name=name, comments=comments, is_enabled=is_enabled)         
Esempio n. 5
0
 def __init__(
     self,
     *,
     name: str = 'Test Fragment',
     comments: str = '',
     is_enabled: bool = True,
 ):
     IncludesElements.__init__(self)
     BasicTestFragment.__init__(self,
                                name=name,
                                comments=comments,
                                is_enabled=is_enabled)
Esempio n. 6
0
 def __init__(
     self,
     *,
     name: str = 'Once Only Controller',
     comments: str = '',
     is_enabled: bool = True,
 ):
     IncludesElements.__init__(self)
     BasicController.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
Esempio n. 7
0
 def __init__(self,
              functional_mode: bool = False,
              teardown_on_shutdown: bool = True,
              serialize_threadgroups: bool = False,
              name='BasicElement',
              comments='',
              is_enabled=True):
     self.functional_mode = functional_mode
     self.teardown_on_shutdown = teardown_on_shutdown
     self.serialize_threadgroups = serialize_threadgroups
     IncludesElements.__init__(self)
     NonTestElements.__init__(self, name=name, comments=comments, is_enabled=is_enabled)
Esempio n. 8
0
 def __init__(
     self,
     *,
     condition: str,
     name: str = 'While Controller',
     comments: str = '',
     is_enabled: bool = True,
 ):
     self.condition = condition
     IncludesElements.__init__(self)
     BasicController.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
Esempio n. 9
0
 def __init__(
     self,
     *,
     ignoreSubControllers: bool = False,
     name: str = 'Random Controller',
     comments: str = '',
     is_enabled: bool = True,
 ):
     self.ignoreSubControllers = ignoreSubControllers
     IncludesElements.__init__(self)
     BasicController.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
Esempio n. 10
0
 def __init__(
     self,
     *,
     switchValue: str,
     name: str = 'Switch Controller',
     comments: str = '',
     is_enabled: bool = True,
 ):
     self.switchValue = switchValue
     IncludesElements.__init__(self)
     BasicController.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
Esempio n. 11
0
 def __init__(
     self,
     *,
     includePath: str,
     name: str = 'Include Controller',
     comments: str = '',
     is_enabled: bool = True,
 ):
     self.includePath = includePath
     IncludesElements.__init__(self)
     BasicController.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
Esempio n. 12
0
 def __init__(
     self,
     *,
     node_path: str,
     name: str = 'Module Controller',
     comments: str = '',
     is_enabled: bool = True,
 ):
     self.node_path = node_path
     IncludesElements.__init__(self)
     BasicController.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
Esempio n. 13
0
 def __init__(
     self,
     *,
     includeTimers: bool = False,
     parent: bool = False,
     name: str = 'Transaction Controller',
     comments: str = '',
     is_enabled: bool = True,
 ):
     self.includeTimers = includeTimers
     self.parent = parent
     IncludesElements.__init__(self)
     BasicController.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
Esempio n. 14
0
 def __init__(
     self,
     *,
     condition: str,
     evaluateAll: bool = False,
     useExpression: bool = True,
     name: str = 'If Controller',
     comments: str = '',
     is_enabled: bool = True,
 ):
     self.condition = condition
     self.evaluateAll = evaluateAll
     self.useExpression = useExpression
     IncludesElements.__init__(self)
     BasicController.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
Esempio n. 15
0
 def __init__(self, *,
              continue_forever: bool = False,
              loops: int = None,
              name: str = 'Loop Controller',
              comments: str = '',
              is_enabled: bool = True,):
     self.continue_forever = continue_forever
     if not continue_forever:
         if loops is None:
             loops = 1
         if loops == -1:
             raise ValueError("continue_forever can't be false, while loops equal -1")
         self.loops = loops
     else:
         if loops is None:
             loops = -1
         if loops > -1:
             raise ValueError("continue_forever can't be true, while loops not equal -1")            
         self.loops = loops
     IncludesElements.__init__(self)
     BasicController.__init__(self, name=name, comments=comments, is_enabled=is_enabled)         
Esempio n. 16
0
 def __init__(self, *,
              continue_forever: bool,
              loops: int = 1,
              is_sheduler_enable: bool = False,
              sheduler_duration: int = 0,
              sheduler_delay: int = 0,
              name: str = 'BasicThreadGroup',
              comments: str = '',
              is_enabled: bool = True,
              num_threads: int = 1,
              ramp_time: int = 0,
              on_sample_error: ThreadGroupAction = ThreadGroupAction.CONTINUE,):
     self.continue_forever = continue_forever
     self.loops = loops
     self.is_sheduler_enable = is_sheduler_enable
     self.sheduler_duration = sheduler_duration
     self.sheduler_delay = sheduler_delay
     IncludesElements.__init__(self)
     BasicThreadGroup.__init__(self,
                               name=name,
                               comments=comments,
                               is_enabled=is_enabled,
                               num_threads=num_threads,
                               ramp_time=ramp_time)
Esempio n. 17
0
    def __init__(
            self,
            *,
            name: str = 'HTTP Request',
            host: str = '',
            path: str = '/',
            method: Method = Method.GET,
            protocol: Protocol = Protocol.HTTP,
            port: Union[int, None] = None,
            content_encoding: str = '',
            auto_redirect: bool = False,
            keep_alive: bool = True,
            do_multipart_post: bool = False,
            browser_comp_headers: bool = False,
            # Advanced scope
            implementation: Implement = Implement.NONE,
            connect_timeout: Union[int, None] = None,
            response_timeout: Union[int, None] = None,
            retrieve_all_emb_resources: bool = False,
            parallel_downloads: bool = False,
            parallel_downloads_no: Union[int, None] = None,
            url_must_match: str = '',
            source_type: Source = Source.HOSTNAME,
            source_address: str = '',
            proxy_scheme: str = '',
            proxy_host: str = '',
            proxy_port: Union[int, None] = None,
            proxy_username: str = '',
            proxy_password: str = '',
            comments: str = '',
            is_enabled: bool = True):
        """

        :type source_type: object
        """
        IncludesElements.__init__(self)
        BasicSampler.__init__(self,
                              name=name,
                              comments=comments,
                              is_enabled=is_enabled)
        self.host = host
        self.path = path
        self.method = method
        self.protocol = protocol
        self.port = port
        self.content_encoding = content_encoding
        self.auto_redirect = auto_redirect
        self.keep_alive = keep_alive
        self.do_multipart_post = do_multipart_post
        self.browser_comp_headers = browser_comp_headers
        self.implementation = implementation
        self.connect_timeout = connect_timeout
        self.response_timeout = response_timeout
        self.retrieve_all_emb_resources = retrieve_all_emb_resources
        self.parallel_downloads = parallel_downloads
        self.parallel_downloads_no = parallel_downloads_no
        self.url_must_match = url_must_match
        self.source_type = source_type
        self.source_address = source_address
        self.proxy_scheme = proxy_scheme
        self.proxy_host = proxy_host
        self.proxy_port = proxy_port
        self.proxy_username = proxy_username
        self.proxy_password = proxy_password
        self.variables = ''
        self.text = ''
        self._upload_file_list: List[FileUpload] = []
        self._user_defined_variables: List[UserDefinedVariables] = []