Command Line Interface
WebSurge includes two modes of command line interface:
- Simple - simple file launching for main application
- *CLI - run tests from the command line
Simple Command Line Launching (websurge.exe)
This option is a simple command line interface to the main executable which allows you to launch a specific file and optionally a specific item in the WebSurge main User Interface.
A fully qualified or relative path to the current path.
Name or URL of a request in the request list provided by
startupFilename. Search is case insensitive. Allows you to launch WebSurge with a specific request pre-selected.
WebSurge CLI (websurgecli.exe)
WebSurge runs with a small core load and testing engine and this engine is plugged into the front end application that's been described in the documentation here.
There’s also a Command Line Interface available to run WebSurge from a Windows terminal, so you can automate test runs. You can run WebSurgeCli.exe from anywhere to run tests for either an individual URL (similar to AB.exe for example) or a full Session file.
By default when it runs, WebSurgeCli shows progress every second showing total request count, failures and the requests per second for the entire test. A silent option can turn off this progress display and display only the results.
The command line interface can be useful for build integration which allows checking for failures perhaps or hitting a specific requests per second count etc.
It’s also nice to use this as quick and dirty URL test facility similar to the way you’d use Apache Bench (ab.exe). Unlike ab.exe though, WebSurgeCli supports SSL and makes it much easier to create multi-URL tests using either manual editing or the WebSurge UI.
Command Line Options
The following command line options are available:
? websurgecli usage: WebSurgeCli <SessionFile|Url> -sXX -wXX -tXX -dXX -r -yX --json --outputFile "output.json" Parameters: ----------- SessionFile Filename to a WebSurge/Fiddler Http session file Url Single URL to hit Commands: --------- -h | -? This help display Value Options (if not specified the session file settings are used) ------------- -t Number of simultaneous threads to run -s Number of seconds to run the test -w Number of seconds used for warmup -d Delay in milliseconds after each request 1-n Milliseconds of delay between requests 0 No delay, but give up cpu time slice -1 No delay, no time slice (very high cpu usage) -y Display mode for progress (3) 0 - results only 1 - banner and result 2 - banner and result 3 - banner, progress and result Switches: --------- -r Randomize order of requests in Session file Output: ------- --json Return results as JSON (silent). Combine with -y for progress display --outputFile Save Json output to a filename Examples: --------- WebSurgeCli c:\temp\LoadTest.websurge -s20 -t8 WebSurgeCli c:\temp\LoadTest.websurge -s20 -t8 --json WebSurgeCli https://localhost:5001/api/json -s20 -t8
Comment or report problem with topic