Skip to content

Eclypses/mte-relay-python-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MTE Relay Client Demo (Python)

Demo for MTE Relay

Using MTE version 4.x.x

Introduction

Language Interface Unit Test

Introduction

This project utilizes locust to simulate multiple users making many requests against the MTE relay server.

IMPORTANT

Please note the solution provided in this tutorial does NOT include the MTE library or supporting MTE library files. Please contact Eclypses Inc. if the MTE SDK (which contatins the library and supporting files) has NOT been provided. The solution will only work AFTER the MTE library and other files have been incorporated.

MTE Relay Client Demo

Setup

Ensure that the python module "locust" is installed.

MTE Directory and File Setup

  1. Copy the "lib" directory and contents from the MTE SDK into the root directory.
  2. Copy the "src/py" directory and contents from the MTE SDK into the root directory.
  3. In the file locustRequest.py, locate the line in the source code ```Python if not MteBase.init_license("LicenseCompany", "LicenseKey"): ``` and replace "LicenseCompany" and "LicenseKey" with the appropriate company and license key provided by the Eclypses Applied Technology Team https://eclypses.com/get-started/

Usage

  1. Open a command line interface:
    • Windows: Open Command Prompt or PowerShell
    • Linux: Open Terminal
    • macOS: Open Terminal
  2. Navigate to the project directory:
cd path/to/project
  1. Run Locust:
locust -f locustRequest.py --headless -u 100 -r10 -t 10m --csv a.csv --host https://aws-relay-server.eclypses.com/ --test_type login --mte_type 1 --total_pairs 10

Program Arguments

There are several program arguments that can be used to control the client test. They can be used either in the terminal or in a "launch.json" file. There are many that locust itself offers; this covers the main ones this application utilizes, along with several custom arguments. These custom arguments are specific to MTE testing capabilities.

  • -f: The name of the python file that locust will use. In this application, it should always be locustRequest.py. Other python files will be incorporated as needed.
  • --headless: Disables the web interface.
  • -u: The peak number of concurrent users.
  • -r: The rate at which users are spawn.
  • -t: The total run time. For example, "10m" will run for 10 minutes.
  • --csv: Stores statistics to CSV format files.
  • --host: Host to load test against.
  • --test_type: The particular test to run. *Custom argument*
  • --mte_type: 1 or "mke" to use the MKE add-on, otherwise it will use the core MTE. *Custom argument*
  • --total_pairs: The total number of encoder/decoder states that will match up with the server. *Custom argument*

Contact Eclypses

Email: [email protected]

Web: www.eclypses.com

Chat with us: Developer Portal

All trademarks of Eclypses Inc. may not be used without Eclypses Inc.'s prior written consent. No license for any use thereof has been granted without express written consent. Any unauthorized use thereof may violate copyright laws, trademark laws, privacy and publicity laws and communications regulations and statutes. The names, images and likeness of the Eclypses logo, along with all representations thereof, are valuable intellectual property assets of Eclypses, Inc. Accordingly, no party or parties, without the prior written consent of Eclypses, Inc., (which may be withheld in Eclypses' sole discretion), use or permit the use of any of the Eclypses trademarked names or logos of Eclypses, Inc. for any purpose other than as part of the address for the Premises, or use or permit the use of, for any purpose whatsoever, any image or rendering of, or any design based on, the exterior appearance or profile of the Eclypses trademarks and or logo(s).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published