| Age | Commit message (Collapse) | Author |
|
Using [route.String] does not works if the parameter can be empty,
while [route.Path] replace all keys and return the path as is.
|
|
On the "lib/http" we refactoring RequestMethod and RequestType type
from int to string for readability, when the value is encoded, for
example to JSON.
So instead of 0, 1 or 2; it will print "GET", "CONNECT", or "HEAD".
|
|
|
|
Previously, the default HTTPRunHandler is hidden, called dynamically
based on Run is nil or not.
This changes make it exported as function that return HTTPRunHandler
to show how define and create a custom HTTPRunHandler.
|
|
The DefaultParamsConverter define default function to convert
[HTTPTarget.Params] to its equivalent parameters in HTTP, either as query
in URL or as bytes in body.
This changes introduce breaking changes in HTTPTarget where field
ConvertParams renamed to ParamsConverter.
|
|
Instead of function that use the signature of HTTPRequestDumper/
HTTPResponseDumper; change it to function that _return_ HTTPRequestDumper/
HTTPResponseDumper.
In this way, the documentation can show the clear relation between
function and its type.
|
|
Previously, the function for Attack need to be coded manually.
This changes introduce new function DefaultHTTPAttack that generate
HTTPAttackHandler based on the HTTPTarget method, request type, and
Params; if AllowAttack is true and Attack is nil.
Implements: https://todo.sr.ht/~shulhan/gorankusu/4
|
|
In HTTPTarget the field RawBody can be filled by anything by user.
Those field can be activated by setting WithRawBody.
Implements: https://todo.sr.ht/~shulhan/gorankusu/3
|
|
The original idea of "trunks" is because the core library that we
use for load testing is named "vegeta" (from Dragon Ball) [1][2], and
Vegeta has a son named Trunks.
In English, trunks also have multiple meanings.
In order to have a unique name, we rename the project to "gorankusu",
which is a combination of "go" (the main programming language
that built the application) and "torankusu" the Hepburn of "Trunks".
[1]: https://github.com/tsenart/vegeta/
[2]: https://en.wikipedia.org/wiki/Vegeta
Implements: https://todo.sr.ht/~shulhan/gorankusu/2
|
|
The FormInput now can be set to FormInputKindFile that will rendered
as "<input type='file' ...>" on the web user interface.
Once submitted, the file name, type, size, and lastModification will
be stored under FormInput Filename, Filetype, Filesize, and Filemodms.
Implements: https://todo.sr.ht/~shulhan/trunks/1
|
|
The HTTPRequestDumper define an handler to convert [http.Request] into
[RunResponse] DumpRequest.
The HTTPResponseDumper define an handler to convert [http.Response]
into [RunResponse] DumpResponse.
|
|
Most of the fixes related to naming variables with acronyms, for example
HTTP, JSON, URL, and so on.
|
|
If HTTP Path contains key, for example "/:book", and the Params contains
the same key, the Path will be filled with value from Params.
The same key in Params will be deleted and not send on query parameter
or body.
|
|
Previously, we use golangci-lint as linter.
This linter does not provides any useful recommendation lately and the
development is quite a mess, sometimes its break when using Go tip.
In this changes we replace it with revive, fieldalignment, and shadow;
and fix all of their recommendations.
|
|
The mlog functions automatically add new line to each format, so we
did not need to add it manually.
|
|
Some linter, govet, warns about possible copied Mutex on HttpRequest.
To fix this we implement method clone and Stringer on HttpRequest.
|
|
|
|
See https://kilabit.info/journal/2022/gpl for more information.
|
|
Changes,
* AttackResult storage size decreased -24 bytes
* Environment storage size decreased -32 bytes
* HttpTarget storage size decreased -24 bytes
* RunRequest storage size decreased -32 bytes
* RunResponse storage size decreased -8 bytes
* Target storage size decreased -16 bytes
* WebSocketTarget storage size decreased -8 bytes
|
|
The WebSocket API replace the HTTP APIs for running and canceling
attack. Later, it will use to notify the result of attack.
|
|
This changes refactor the KeyValue from map[string]string into
map[string]FormInput, where FormInput is a struct with Label, Hint,
Kind, Value, Max, and Min.
With the available of Hint field, the web user interface can render it
as description of input.
This changes also make all input hint to be displayed on the first render.
|
|
The "Hint" provide a general description for Target, a single HttpTarget,
and WebSocketTarget.
|
|
The ConvertParams is a function that will be called inside the Run
handler to convert the Params values to type that will be send as
request.
|
|
Previously, we display the actual response of the HTTP target only
on the user interface.
This changes make the Run function to display the actual HTTP request and
response that being send and received on HTTP target.
|
|
Previously, the HttpTarget Method, Path, and RequestType is fixed.
Once its declared, the Run method will use the defined values to
generate and call HTTP request.
This changes add IsCustomizable field on HttpTarget. If its true,
client or web user interface can modify the request method, path, and
type. The values send by client to server after changes will be used
instead of the fixed values.
This changes also make the Run handler on HttpTarget to be optional.
If its not defined, it will generated the HTTP request from the method,
path, and type passed to server.
|
|
Previously, the HttpTarget Name field is optional, and the ID is derived
from Path.
This changes make the Name field become required and changes the ID to
be derived from Name instead of Path, because one or more same path
can be used by more HttpTarget.
|
|
Check for error where it should and remove unused return and methods.
|
|
The BaseUrl seems like not a good fit on AttackOptions since its
should never changes, so we move it to the Target.
|
|
When user clicking the "Delete" button on attack result item, it will
send request to API to delete the selected item. Server will check
if the requested result file name exist and delete them from file system
if its exist, otherwise it will return 404 Not found.
|
|
When the service started, it will load all previous attack results
from directory Environment.ResultsDir.
It will only scan the file name and append it to HttpTarget.Results
due to the size and time to load one of them can take time.
Through the web interface, user can click "Show" button to load
the result and display it on the screen.
|
|
* Increase the DEBUG value to 3 to match with latest libhttp fix
debug output of client request
* _www: fix rendering HTTP headers, missing "target" parameter
* Remove unused "IsRunning" from AttackResult
* example: add an example endpoint for POST with x-www-form-urlencoded
* Remove parameter Target on HttpRunHandler. The Target value can be
retrieved from RunRequest.Target.
* Target: change the field Vars type from map[string]string to KeyValue
* Trunks: merge Target and HttpRequest from request to original Target
and HttpTarget respectively before calling Run
* Prefix the result file name with Target.ID
* Move the package documentation to doc.go
|
|
|
|
When the user click "Attack" it will call the API to run the load testing.
If there is load testing currently, it will return with an error.
On success, the result of load testing will be stored on directory
defined in Environment.ResultsDir with file named
<HttpTarget.ID>.<date_time>.<RPS>x<Duration>s.<ResultsSuffix>.bin
This file contains the vegeta.Results.
|
|
The correct module name registered on go.mod is
github.com/tsenart/vegeta/v12.
|
|
Trunks is a library and HTTP service that provide web user interface
to test HTTP service, similar to Postman, and for load testing.
For the load testing we use vegeta [1] as the backend.
[1] https://github.com/tsenart/vegeta
|