quick usage guide - qlik-oss/gopherciser GitHub Wiki

Quick Usage Guide

  • Gopherciser simulates user actions (such as opening a hub, logging in, etc.) by sending HTTP requests and managing WebSocket (ws) communication, effectively replicating real-world interactions with a web application.

  • As a user, you simply need to trigger the desired actions. For example, to open the hub, you just call the OpenHub action.

Creating Your First Script

Let's create a simple Gopherciser script that performs a login and opens the hub.

The script should include the following key sections:

Settings Section

Defines how performance metrics, execution details, and errors are recorded in the execution log file, which, in this example, is located at "./logs/executionLogFileName.log".

More details here.

"settings": {
  "timeout": 300,
  "logs": {
    "metrics": false,
    "debug": false,
    "traffic": false,
    "filename": "./logs/executionLogFileName.log"
  }
}
Scheduler Section

Defines how the performance test is scheduled and executed.

The execution continues for the duration in seconds specified by executiontime or until the defined iterations are completed, whichever occurs first.

More details here.

In this eaxmple:

  • The test runs for 1 hour (executiontime: 3600 seconds).
  • 100 users (concurrentusers: 100) will continuously perform all actions (iterations: -1) until execution ends.
  • The script launches 1 user every second (rampupdelay: 1.0), reaching 100 concurrent users after 100 seconds.
  • If an iteration completes in less than 60 seconds duration, the script will wait until the full 60 seconds have passed before starting the next one.
"scheduler": {
  "type": "simple",
  "settings": {
    "executiontime": 3600,
    "iterations": -1,
    "rampupdelay": 1.0,
    "concurrentusers": 100,
    "reuseusers": false
  },
  "iterationtimebuffer": {
    "mode": "minduration",
    "duration": "60s"
  }
}
Connection Settings section

Defines the server configuration and handles user authentication.

More details here.

"connectionSettings": {
  "server": "DOMAIN.com",
  "mode": "ws",
  "security": true
}
Login Settings section

Defines the server and the configuration for a secure connection using WebSocket (ws)

More details here

"loginSettings": {
  "type": "prefix",
  "settings": {
    "directory": "ANY_DIR",
    "prefix": "USER"
  }
}
Scenario section

The Scenario section defines the sequence of actions to be performed.

List of supported actions

In the below example:

  • All users will sequentially open the hub OpenHub, launch "PT4MSSD" app OpenApp then switch to "qmGcYS" sheet ChangeSheet within that app.
  • will restart from the beginning and continue until either the specified number of iterations iterations or the execution time limit executiontime is reached.
  • Remember to simulate user think time using thinktime.
"scenario": [
  {
    "label": "OpenHub",
    "action": "OpenHub"
  },
  {
    "label": "TimerDelay",
    "action": "thinktime",
    "settings": {
      "type": "uniform",
      "mean": 12.5,
      "dev": 2.5
    }
  },
  {
    "label": "OpenApp",
    "action": "OpenApp",
    "settings": {
      "appmode": "name",
      "app": "PT4MSSD"
    }
  },
  {
    "label": "TimerDelay",
    "action": "thinktime",
    "settings": {
      "type": "uniform",
      "mean": 12.5,
      "dev": 2.5
    }
  },
  {
    "label": "ChangeSheet",
    "action": "ChangeSheet",
    "settings": {
      "id": "qmGcYS"
    }
  },
  {
    "label": "TimerDelay",
    "action": "thinktime",
    "settings": {
      "type": "uniform",
      "mean": 12.5,
      "dev": 2.5
    }
  }
]

Script Execution

  • Download Gophereciser from here
  • Execute the following command in the command prompt: Gopherciser.exe x -c .\PATH_TO_YOUR_SCRIPT
  • As the script executes, relevant information will be displayed in the command prompt.
  • In the example below, there are currently no errors or warnings. One user has performed 9 actions, resulting in 70 HTTP requests.

2025-04-03T19:07:29+02:00 Err<0> Warn<0> ActvSess<1> TotSess<1> Actns<4> Reqs<10> 2025-04-03T19:07:09+02:00 Err<0> Warn<0> ActvSess<0> TotSess<0> Actns<0> Reqs<0> 2025-04-03T19:07:19+02:00 Err<0> Warn<0> ActvSess<1> TotSess<1> Actns<2> Reqs<1> 2025-04-03T19:07:29+02:00 Err<0> Warn<0> ActvSess<1> TotSess<1> Actns<4> Reqs<10> 2025-04-03T19:07:39+02:00 Err<0> Warn<0> ActvSess<1> TotSess<1> Actns<6> Reqs<18> 2025-04-03T19:07:49+02:00 Err<0> Warn<0> ActvSess<1> TotSess<1> Actns<7> Reqs<70> 2025-04-03T19:07:59+02:00 Err<0> Warn<0> ActvSess<1> TotSess<1> Actns<8> Reqs<70> TotErrors<0> TotWarnings<0> TotActions<9> TotRequests<79> Duration<51.5440913s>

Results Analysis

  • Download Scalability Results Analyzer
  • Upload this App to your tenant and launch it.
  • Go to "Data Load Editor" and upload the execution log file.
  • Click on "Load Data"
  • Go to "Sheet".
    • "ReadMe": A brief overview of the app and the available filters.
      • RelativeTime: Displays all results relative to the start of execution, instead of using their actual execution timestamps as in ClockTime.
      • "Time Granuality": aggregate the results by min, 10min, hour or day.
    • "Main": General overview of all execution log files. Examples include test duration, total response times, and more.
    • "Response times, MS":
      • Provides details on the action level.
      • Examples:
        • Response times and error% aggregated per action.
        • Response times, latency and error rates overtime.
        • Detailed aggregate report for every action per file.
    • "Errors": Provides the error count and detailed information about each error.
    • "Gopherciser, Metric": Similar to the "Response times, MS" sheet, but provides more detailed information based on the endpoint rather than the action.
⚠️ **GitHub.com Fallback** ⚠️