| Age | Commit message (Collapse) | Author |
|
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.
|
|
Previously, we use pointer to indicated that the Target can be attacked
or not.
Since HTTPTarget now have AllowAttack, this options can be changes to
non-pointer.
|
|
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
|
|
The goal is to remove duplicate code in testing and show the example on
how to create Gorankusu service from godoc.
Implements: https://todo.sr.ht/~shulhan/gorankusu/5
|
|
This release rename the project from "trunks" to "gorankusu".
The original idea of "trunks" is because the core library that we use
for load testing is named vegeta (from Dragon Ball), 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".
=== New features
* all: allow submit free form request body in HTTPTarget
* all: implement form input file
* all: add type to customize how to dump HTTP request and response
* all: support parameter binding in HTTP Path
=== Enhancements
* _www: check HTTP response status greater or equal 400
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
The correct options to run tsc on specific directory is "--project" not
"-b".
|
|
Any HTTP status code below 400 are still processable and not an error.
|
|
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.
|
|
|
|
This release only have chores, it should not break anything.
* go.mod: update all dependencies
This changes set minimum Go version to version 1.20.
The vegeta module finally has some update to v12.11.1.
* gitmodules: use https instead of git scheme
Using git scheme require private key to clone the remote repository.
* _www: update wui module
* _www: setup eslint for linting TypeScript files
This changes also apply all eslint recommendations.
* Makefile: replace the Go linter and apply all their recommendations
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.
|
|
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.
|
|
|
|
|
|
While at it reformat all files using default prettier.
|
|
Using git scheme require private key to clone to remote repository.
|
|
This changes set minimum Go version to version 1.20.
|
|
=== Bug fixes
* all: fix panic when attacking HTTP due to nil Attack handler
=== Enhancements
* _www: replace WebSocket handlers with HTTP endpoints
* all: add boolean Kind for FormInput, FormInputKindBoolean
* all: check and call ConvertParams when running HttpTarget
=== Chores
* all: move the _doc directory under _www
* all: convert the README from asciidoc to markdown
* all: remove WebSocket server
* go.mod: set Go version to 1.19 and update all dependencies
|
|
This is to minimize symlinks in the repository.
|
|
I use two remote repositories: GitHub and SourceHut.
GitHub support rendering README using asciidoc while SourceHut not.
This cause the repository that use README.adoc rendered as text in
SourceHut which make the repository page less readable.
Also, the pkg.go.dev now render README but only support Markdown.
Since we cannot control the SourceHut and go.dev, the only option is
to support converting Markdown in ciigo so I can write README using
Markdown and the rest of documentation using Asciidoc.
|
|
Using WebSocket for communication in client require additional
setup, especially if its behind proxy.
For example, if we server the trunks server under domain testing.local
behind proxy, we need to setup route for the WebSocket too.
|
|
The Attack and attack Cancel now call the HTTP endpoints.
|
|
This endpoints similar that we have in the WebSocket.
The idea is to replace the WebSocket endpoints with this one.
|
|
|
|
In attack endpoint, check if the Attack is nil before we push the request
to attack queue.
|
|
The FormInputKindBoolean only used for convertion, for example
ToJsonObject.
In the WUI, it still rendered as string, not as checkbox.
FormInput with this Kind will be converted to true in ToJsonObject if
the Value is either "true", "yes", or "1".
|
|
The req, RunRequest instance, is from request so the
HttpTarget.ConvertParams need to be set from the original HttpTarget.
This fix the conditional rr.HttpTarget.ConvertParams == nil always true
when calling runHttpTarget.
|
|
|
|
If the ConvertParams field is set, use it to convert the parameters into
desired type.
|
|
This release set the minimum Go version to 1.18 and update all modules.
== Chores
* all: group all documentations under directory _doc
* example: fix the HTTP POST handler
* all: remove unused field Locker in RunRequest
* all: fix all linter warnings
|
|
The _doc directory provides an entry point for all documentation.
While at it we reformat the README to use AsciiDoc markup.
|
|
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.
|
|
|
|
This changes replace any usage of ioutil with os and io package.
|