Custom ZebraTester Plugins
Generic JDBC Plugin
This JDBC Plugin can connect to any Database and execute queries , the only important thing is the database driver jar file need to be in the class path (Add to external resources)
For example this jar for MSSQL mssql-jdbc-10.2.0.jre11.jar
Example input parameters to be passed to this plugin ; Db Driver - com.microsoft.sqlserver.jdbc.SQLServerDriver, DB Url - "jdbc:sqlserver://localhost;database=Apica;", Username , Password and DB Query . You can also pass an additional parameter for dynamic id or any other things , which is part of the DB Query.
We have support for load testing & ASM with JDBC.
HTTP2 Plugin
Latest modification adds support for multiple HTTP response codes.
Adds HTTP2 compatibility to ZT using an external HTTP2 compliant HTTP Client.The call should be disabled from the ZT point of view. The plugin will execute the call using the external library okHttp.
Response data needs to be handled in inline script as the plugin returns ALL response data in a single string.
Assigning request data will however work normally with all the regular assignment methods available in ZT.
Dependencies:
ZebraEventListener.jar okio-2.2.2.jar okhttp-3.12.1.jar kotlin-stdlib-common-1.3.21.jar kotlin-stdlib-1.3.21.jar annotations-13.0.jar
xbootclasspath: alpn-boot-7.1.1.v20141016.jar
Instructions: Input parameters: Output parameters Limitations: |
---|
GWT Serialisation and Deserialisation
Both recording / load test plugins - Created for B2B Automation use case
GWTPayLoadSerializer.java GWTResponsePayLoadDeserializer.java RecorderPluginGWTPayLoadHandler.java , Dependencies jars - GWT-Parser.jar and gwt-servlet.jar
gRPC application execution support
ExecuteGRPCCall.java , the plugin calls the go lib https://ghz.sh/docs/install
WebService Security Plugins fo SOAP message
Sign and Encrypt Plugin for Request Content
WSSecurityEncryptSOAPMessage.java
Decrypt and Content Verify Plugin for Response Content
WSSecurityDecryptSOAPMessage.java
Dependencies jars commons-codec-1.7.jar commons-lang3-3.7.jar cxf-core-3.2.4.jar cxf-rt-frontend-jax ws-3.2.4.jar cxf-rt-ws-security-3.2.4.jar expressions-1.0.0.jar jakarta.activation.jar jakarta.xml.bind-api.jar jaxb-impl.jar jaxb-jxc.jar jaxb-xjc.jar logback-classic-1.0.13.jar logback-core-1.0.13.jar message-flow-1.0.0.jar slf4j-api-1.7.25.jar ws-security-sign-encrypt-decrypt.jar wss4j-bindings-2.2.1.jar wss4j-ws-security-common-2.2.1.jar wss4j-ws-security-dom-2.2.1.jar wss4j-ws-security-stax-2.2.1.jar xmlsec-2.1.1.jar
Message Queue Plugin for sending Payloads to the Queue
IBM_Message_Queue_Runner_V1.java and IBM_Message_Queue_RunnerWithAuth.java, Dependencies jars com.ibm.mq.allclient-9.1.4.0.jar javax.jms-api-2.0.1.jar
Add Request Header
adds custom request header to url requests
Add Slash
adds slash in between last and second to the last character of a string.
AppDynamics Integrations Plugins
AppdynamicsIntegrationV1
Adds two headers to each call that forces appdynamics to trigger a snapshot of that transaction and tags it with a unique GUID. This allows one to track the transactions inside appdynamics by searching for the Header-ApicaGUID and the GUID associated with that loop among the transaction snapshots in the appdynamics controller. To search for a specific series of snapshots associated with that loop you go to the controller and click on the application that's being targeted > Transaction Snapshot > All snapshots and click Show Filters. In the Search Criteria you expand the Data Collector Data and enter Header-ApicaGUID in the name field and the GUID in the value field. This will bring up all snapshots associated with that loop.
AppdynamicsIntegrationV2
Works in the same way as the V1 but it adds one input field that is set to false by default. False will give the trigger snapshot header the value false and will not trigger a snapshot wile true will force a snapshot. To use this plugin in WPM you need to add the following line to the Additional Options field in the check setup: -vTriggerSnapshot true. if -vTriggerSnapshot true or false is not added to the check setup the check will not run.
AppdynamicsIntegrationV3
Works in the same way as the V2 but generates a 13 long alphanumeric value as ApicaGUID.
AppdynamicsIntegrationV4
Plugin to insert custom request headers that can be used with AppDynamics to correlate data with Apica.
Headers: ApicaGUID: (some GUID), ApicaPageName: (Page Break's name/Transaction name)
Set vTriggerSnapshot to true to enable plugin, otherwise false
Credentials Manager (Apica version)
Retrieve encrypted username/password from API then plugin will decrypt data to be used in the proxysniffer script. To store username/password to server run plugin from command line and pass necessary parameters. Batch process encrypting/updating password. BEFORE USING: Replace the value for "KEY" with some password key and "AUTH_TICKET_PROD" with customer's own API auth_ticket.
Usage:
TO ADD A NEW RECORD
-------------------
Argument[0] = "encrypt"
Argument[1] = (username)
Argument[2] = (password)
Argument[3] = (environment - possible value:[dev,uat,prod])
TO UPDATE EXISTING RECORD
-------------------------
Argument[0] = "update"
Argument[1] = (username)
Argument[2] = (password)
Argument[3] = (environment - possible value:[dev,uat,prod])
TO TEST IF THE RECORD HAS BEEN WRITTEN AND CONTAINS THE PROPER DATA
-------------------------------------------------------------------
Argument[0] = "decrypt"
Argument[1] = (username)
Argument[2] = "<passkey-string>" (pass the same value as SYMMETRIC_KEY)
Argument[3] = (environment - possible value:[dev,uat,prod])
TO PROCESS MULTIPLE ID/PASSWORD BY EITHER ADDING OR UPDATING
------------------------------------------------------------
Argument[0] = "batch"
Argument[1] = (file name including full path of .txt file in csv format [action,username,password])
Argument[2] = "<passkey-string>" (pass the same value as SYMMETRIC_KEY)
Argument[3] = (environment - possible value:[dev,uat,prod])
Credentials Manager 2
Retrieve encrypted text like credentials from ASM API to be decrypted on the fly and used in a ZebraTester script. Use the separate GUI to manage credentials. Additional documentation available in Confluence and KB.
Confluence: Credentials Manager for ZebraTester
KB: Credentials Manager for ZebraTester
Credentials Manager Lite
Simplified version of Credentials Manager where passing in shared secret key and encrypted text will output decrypted text.
Extract Chars From Front Of String
Plugin to extract certain number of characters from front of input string.
Extract Substring In Between
Extracts a substring in between two given strings
Extract Values From JSON
Plugin to extract specific values from a JSON string input. Pass the array name and node name to extract.
Generate GUID
Plugin to generate globally unique ID. Replaces x with random hex digit so you can set a static value instead of x.
Generate MD5 Plugin
Generates a MD5 hash from an input value. require a var populated by a value either extracted or predefined as a stand alone var then hashes that value and populate the output var with that value.
Generate SHA1 Plugin
Generates a SHA1 hash from tre values (uri_string, token_string and salt) to generate a SHA1 hash. require the tre vars to be populated by values either extracted or predefined as a stand alone var then hashes them and populate the output var with that value.
Generate random characters
Generates a string of random characters with a specified length based on the value in the specified var. this works just as the generate random numbers plugin thats in ProxySniffer by default.
Generate Random Email Address
Generate random email address with a specified length (number of characters) as email name and adss a custom domain.
Generate Unix Timestamp
Generates current unix timestamp 10 digits long.
GetPercentOfANumber
Plugin to return the percent of a number. First input is the number to get percent from and second number is the percent.
Generate oauth 1.0 signature
Generates an oauth 1.0 signature, timestamp and nonce.
User can pass in values for oauth_key, oauth_secret, realm and optional values for oauth_timestamp, oauth_nonce,oauth_signature_method, oauth_token and oauth_token_secret. Plugin will generate values for oauth_signature, timestamp and nonce.
Modify Error Snapshots
Used to mask password from output logs and error snapshots. Pass in username as parameter (optional parameters: proxy host and proxy port). Used in conjunction with CredentialsMgrApica plugin. (note: this was created separately since this plugin runs after url execution versus pre url execution for Credentials Manager).
String Joiner
Combines two or more strings together (concatenate) into one.
Trim String
plugin to trim a string from the front and back with user specified length as integer.
Day Difference
Used to compare a date towards todays date. Must be a date which is in the future.
Day Difference Reversed
Used to compare a date towards todays date. Must be a date which is in the past.
GET ASM dictionary
Uses the GET-request from the ASM (Zebratester) API to get the request outside of ZebraTester to not affect the overall timings. Might need to manually change silo in the plugin code.
PUT ASM dictionary
Running the ASM API Dictionary PUT HTTP Request outside of ZebraTester to not affect the overall timings. Might need to manually change silo in the plugin code.
SFTP plugin (upload and download)
Plugin to download or upload file using SFTP and displays metrics using transactions. Modify execute method to download and/or upload from SFTP server. Uses built-in jsch from prxsniff.jar.
SFTP download file
This plugin connects to a sftp host, downloads a file and returns the file size and download time. Requires jsch-0.1.54.jar
SSH and run command
This plugin connects to a remote host, runs a terminal command and returns the output. Requires jsch-0.1.54.jar
ActiveMQ Support for ZT - Author Thomas Wiik
Adds support for ActiveMQ within ZT. Requires a base64 encoded string containing the following settings: "Host Port Message Keystore Queue"
Requires the following libraries: activation-1.1.1.jar activemq-artemis-native-1.0.2.jar activemq-client-5.14.5.jar activemq-openwire-legacy-5.14.5.jar airline-0.8.jar annotations-13.0.jar artemis-amqp-protocol-2.14.0.jar artemis-boot.jar artemis-commons-2.14.0.jar artemis-core-client-2.14.0.jar artemis-dto-2.14.0.jar artemis-hornetq-protocol-2.14.0.jar artemis-hqclient-protocol-2.14.0.jar artemis-jdbc-store-2.14.0.jar artemis-jms-client-2.14.0.jar artemis-service-extensions-2.14.0.jar artemis-tools-2.14.0.jar artemis-web-2.14.0.jar geronimo-jaspic_1.0_spec-1.0.jar geronimo-jms_2.0_spec-1.0-alpha-2.jar geronimo-json_1.0_spec-1.0-alpha-1.jar geronimo-jta_1.1_spec-1.1.1.jar jms-1.1.jar qpid-jms-client-0.51.0.jar slf4j-api-1.7.21.jar slf4j-jboss-logmanager-1.0.4.GA.jar management-api-1.1-rev-1.jar hawtbuf-1.11.jar
No Class added as Plugin needs Customer Customization.
IBM_WebsphereMQ for ZT - Author Thomas Wiik
Adds support for IBM_WebsphereMQ within ZT. Requires a base64 encoded string containing the following settings.
Convert Timestamp to Unix
Using the format "yyyy-mm-dd hh:mm:ss" does also support "yyyy-mm-ddThh:mm:ss:MMM"
Converts into Unix seconds
Upload Custom Integer Value as Response Value in ASM GUI
Allows for upload of a custom integer value which is calculated in ZebraTester to the "Value" column of the Check Details view in ASM (replaces response time, etc)
Update Kerberos Username & PasswordB64 with input parameters/stand alone variables.
Allows for changing Kerberos credentials using raw strings (Password will be encoded in the plugin).
OTP/MFA Code Generator (Authenticator)
Generate one-time password by passing in secret key to the plugin.