Skip to main content

Manual Running Endpoint Test

Prerequisites

  1. Need Java installed (I have Java 8 update 261)
    • Just download the latest.
    • If you only want to run the CLI, then Java may not be needed.
  2. JMeter unpacked or installed
    • We have an unpacked version "\src\Utopia\UtopiaTesting\3rdParty".
    • Might be able to just download, but our zipped version has additional plugins already installed.
  3. A JMeter (.jmx) test file
    • All Tests are here "\src\Utopia\UtopiaTesting"
    • Templates - "\src\Utopia\UtopiaTesting\TestTemplates"
    • Modules - "\src\Utopia\UtopiaTesting\TestModules"
    • "Full" Tests - "\src\Utopia\UtopiaTesting\Tests"
    • Resource Files - "C:\Coding\Work\src\Utopia\UtopiaTesting\Resources"

JMeter Icon Simple Overview

image.png - Main Test being ran, can only have one test plan at a time loaded into JMeter.
image.png - A Results page after running a test.
image.png - Configuration file used to create JMeter "Properties"/variable
image.png - "Thread Group" but used to contain all controllers and relevant test operations.
image.png - A Controller that in the results page will group things for better readability
image.png - HTTP Request, the actual creation of the information to be sent.
image.png - PreProccessor, will run script code before execution of parent (or used as a script before a set of operations)
image.png - PostProccessor, how we set or create JMeter "Properties"/variable for later use (typically return data)

Manual Running of Endpoint Test

  1. Load into JMeter
    image.png

  2. Open "\src\Utopia\UtopiaTesting\Tests\LoadTests\LocalFullEndpointTest.jmx".

  3. Fix configurations for your local instance
    image.png
    a. Make sure your protocol and Port are correctly lined up with Utopia (Might need to run and check your IIS in your menu tray).
    b. Make sure to use a valid Admin User in your Local DB.
    c. Some tests have used the Names.CSV file to generate "User names" or folder names...

  4. This should ALWAYS be the first thing called (http sent to the server)
    image.png

  5. Make sure the test and any controllers or child items are Turned on/Enabled.
    image.png
    This image shows "Delete User Settings" as disabled and "Delete Account Items" as enabled.

  6. Run the Test and check the result pages to verify if the test passed.
    image.png
    a. Green arrow is to run the test
    b. Stop sign is to stop the test mid run
    c. Broom is to clear test results, otherwise each run will just be appended to result pages.

  7. (Optional) CLI run
    jmeter -n -t C:\...\Utopia\UtopiaTesting\Tests\LoadTests\LocalFullEndpointTest.jmx -l C:\...\EndPointTestResport.csv -j C:\...\EndPointTestLog.log -e -o C:\...\ComprehensiveTest
    this statement has several options:
    a. First path is Test location
    b. Second path is file to save results,
    c. Third path is file to save log information,
    d. Fourth path is the Dashboard creation directory.

Basic Steps to Creating new Endpoints

  1. Make sure to do this in a new Thread group, or in another JMeter Window (can have several instances open of the same test). Or do the hard thing, and disable all tests in the endpoint test and create a new controller structure for new end point.

  2. Structure your Module (new Endpoint) correctly, follow already made examples in EndPoint Test.
    https://dev.azure.com/eFileCabinet/Utopia/_wiki/wikis/Utopia.wiki/39/Test-Module

  3. Made sure to "Create" any data needed a head of time in the Setup parts of the structure.

  4. Create the HTTP Request "sample" and fill in all the data needed to hit the new end point server side. Also include any "Mock" or fake data in the body as a full JSON structure. Use other end points as an example.

  5. If HTTP request requires additional data Parameters or Files Upload can be used. Typically will need a Resource File if it can't be "Mocked" with simple data.