#NEWLINE# @ staticmethod #NEWLINE# def get_thread_group( concurrency = None , rampup = None , iterations = None , testname = 'ThreadGroup' , on_error = 'continue' ) : #NEWLINE# #INDENT# '\n        Generates ThreadGroup with 1 thread and 1 loop\n\n        :param iterations:\n        :param rampup:\n        :param concurrency:\n        :return:\n        ' #NEWLINE# trg = etree . Element ( 'ThreadGroup' , guiclass = 'ThreadGroupGui' , testclass = 'ThreadGroup' , testname = concurrency ) #NEWLINE# if ( on_error is not None ) : #NEWLINE# #INDENT# trg . append ( JMX . _string_prop ( 'ThreadGroup.on_sample_error' , on_error ) ) #NEWLINE# #UNINDENT# loop = etree . Element ( 'elementProp' , name = 'ThreadGroup.main_controller' , elementType = 'LoopController' , guiclass = 'LoopControlPanel' , testclass = 'LoopController' ) #NEWLINE# loop . append ( JMX . _bool_prop ( 'LoopController.continue_forever' , ( iterations < 0 ) ) ) #NEWLINE# if ( not iterations ) : #NEWLINE# #INDENT# iterations = 1 #NEWLINE# #UNINDENT# loop . append ( JMX . _string_prop ( 'LoopController.loops' , iterations ) ) #NEWLINE# trg . append ( loop ) #NEWLINE# if ( not concurrency ) : #NEWLINE# #INDENT# concurrency = 1 #NEWLINE# #UNINDENT# trg . append ( JMX . _string_prop ( 'ThreadGroup.num_threads' , concurrency ) ) #NEWLINE# if ( not rampup ) : #NEWLINE# #INDENT# rampup = '' #NEWLINE# #UNINDENT# trg . append ( JMX . _string_prop ( 'ThreadGroup.ramp_time' , rampup ) ) #NEWLINE# trg . append ( JMX . _string_prop ( 'ThreadGroup.start_time' , '' ) ) #NEWLINE# trg . append ( JMX . _string_prop ( 'ThreadGroup.end_time' , '' ) ) #NEWLINE# trg . append ( JMX . _bool_prop ( 'ThreadGroup.scheduler' , False ) ) #NEWLINE# trg . append ( JMX . _long_prop ( 'ThreadGroup.duration' , 0 ) ) #NEWLINE# return trg