| Age | Commit message (Collapse) | Author |
|
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.
|
|
Remove call to ParseMultipartform since the request type is
x-www-form-urlencoded not multipart/form-data.
|
|
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.
|
|
|
|
The NavLink struct now has field OpenInIFrame. If its true, the Href
will be opened inside an iframe in the same window, otherwise it
will opened in new tab.
|
|
Using Trunks.RegisterNavLink, one can register custom link into
left navigation menu.
|
|
The internal/cmd/trunks-example is not run and provide an example only
now, its include the workers to build, recompile, re-embeded files.
|
|
The "cmd" directory on module should be reserved for installable
program that can be executed outside of this repository.
The trunks-example is development server should be run on root of this
repository only, not installable to $GOBIN.
|
|
Currently we are experimenting changing the layout for grouping input
fields from flat layout into fieldset, so user can see more separation
between each sub-section.
|
|
Since we will implement API using WebSocket later, we need to split
between the one that manage HTTP and one that manage WebSocket.
|
|
The endpoint for GET and POST examples now return the object like
HTTP Request which contains the HTTP Method, URL, Headers, Form,
MultipartForm, and the Body.
This will allow us to inspect the request with logging in to console.
|
|
In case two or more users access the Trunks web and set the target
variables, the last user that run any HttpTarget will set the
Target variables or HttpTarget headers/variables.
The next user that open the Trunks web will see the values of headers
and variables from the latest run.
This changes fix this issue by generating new RunRequest using request
original target
|
|
Previously, after clicking the "Run" button user need to inspect the
"Run output" to check if the request is success or fail.
This changes, display a notification everytime the "Run" finished.
It will display the notification as error or success based on the
HttpStatusCode inside the RunResponse
|
|
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.
|
|
Instead of []byte, the call to Run on WebSocketTarget can return anything,
since we will wrap it inside the EndpointRequest.Data later.
|
|
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.
|
|
Check for error where it should and remove unused return and methods.
|
|
One can register WebSocketTarget just like HttpTarget, its have ID,
Name, Headers, and Params.
Unlike HTTP, the WebSocket target only able to execute Run, it does not
have "Attack", yet.
|
|
The BaseUrl seems like not a good fit on AttackOptions since its
should never changes, so we move it to the Target.
|
|
On the top of the page, it will display currently running attack with
target name and HTTP target name. User can cancel the attack by
clicking "Cancel" button on the right.
|
|
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.
|
|
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
|