Best Python code snippet using yandex-tank
plugins.py
Source:plugins.py
...13from localstack.services.cloudformation import cloudformation_listener, cloudformation_starter14# register default plugins15def register_localstack_plugins():16 try:17 register_plugin(Plugin('es',18 start=start_elasticsearch_service))19 register_plugin(Plugin('elasticsearch',20 start=es_starter.start_elasticsearch,21 check=es_starter.check_elasticsearch))22 register_plugin(Plugin('s3',23 start=start_s3,24 check=s3_starter.check_s3,25 listener=s3_listener.UPDATE_S3))26 register_plugin(Plugin('sns',27 start=start_sns,28 listener=sns_listener.UPDATE_SNS))29 register_plugin(Plugin('sqs',30 start=sqs_starter.start_sqs,31 listener=sqs_listener.UPDATE_SQS))32 register_plugin(Plugin('ses',33 start=start_ses))34 register_plugin(Plugin('ssm',35 start=start_ssm))36 register_plugin(Plugin('sts',37 start=start_sts))38 register_plugin(Plugin('iam',39 start=start_iam))40 register_plugin(Plugin('secretsmanager',41 start=start_secretsmanager))42 register_plugin(Plugin('apigateway',43 start=start_apigateway,44 listener=apigateway_listener.UPDATE_APIGATEWAY))45 register_plugin(Plugin('dynamodb',46 start=dynamodb_starter.start_dynamodb,47 check=dynamodb_starter.check_dynamodb,48 listener=dynamodb_listener.UPDATE_DYNAMODB))49 register_plugin(Plugin('dynamodbstreams',50 start=start_dynamodbstreams))51 register_plugin(Plugin('firehose',52 start=start_firehose))53 register_plugin(Plugin('lambda',54 start=start_lambda))55 register_plugin(Plugin('kinesis',56 start=kinesis_starter.start_kinesis,57 check=kinesis_starter.check_kinesis,58 listener=kinesis_listener.UPDATE_KINESIS))59 register_plugin(Plugin('redshift',60 start=start_redshift))61 register_plugin(Plugin('route53',62 start=start_route53))63 register_plugin(Plugin('cloudformation',64 start=cloudformation_starter.start_cloudformation,65 listener=cloudformation_listener.UPDATE_CLOUDFORMATION))66 register_plugin(Plugin('cloudwatch',67 start=start_cloudwatch))68 register_plugin(Plugin('logs',69 start=start_cloudwatch_logs))70 register_plugin(Plugin('stepfunctions',71 start=stepfunctions_starter.start_stepfunctions,72 listener=stepfunctions_listener.UPDATE_STEPFUNCTIONS))73 except Exception as e:74 print('Unable to register plugins: %s' % e)...
main.py
Source:main.py
...25 jid = input('Ingresa tu JID:\t\n')26 password = input('ingresa tu contrasena:\t\n')27 user = Client(jid, password)28 # Plugin registration.29 user.register_plugin("xep_0004") # Data forms30 user.register_plugin("xep_0030") # Service Discovery31 user.register_plugin("xep_0066") # Out-of-band Data32 user.register_plugin('xep_0071') # XHTML-IM33 user.register_plugin("xep_0085") # Chat State Notifications34 user.register_plugin('xep_0128') # Service Discovery Extensions35 user.register_plugin("xep_0199") # XMPP Ping36 user.register_plugin('xep_0045') # Multi-User-Chat37 user.register_plugin('xep_0363')38 # Connect to the XMPP server and start processing XMPP stanzas.39 user.connect()40 # Send the message and expect a reply.41 user.process()42 elif respuesta=='2':43 jid = input('Ingresa tu JID:\t\n')44 password = input('ingresa tu contrasena:\t\n')45 xmpp = Client(jid, password)46 xmpp.register_plugin('xep_0030')47 xmpp.register_plugin('xep_0004')48 xmpp.register_plugin('xep_0199')49 xmpp.register_plugin('xep_0066')50 xmpp.register_plugin('xep_0077')51 xmpp['xep_0077'].force_registration = True52 xmpp.connect()...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!