A MoonBit module for k6 load testing scripts, providing utilities and abstractions to enhance the development experience of k6 scripts using MoonBit.
Dependencies
pub struct ApiKeyAuth {
key : String
header_name : String
}pub struct BasicAuth {
username : String
password : String
}pub struct BearerAuth {
token : String
}pub struct OAuthToken {
access_token : String
token_type : String
expires_in : Int?
refresh_token : String?
}fn RequestBuilder::api_key_auth(self : RequestBuilder, key : String, header_name : String) -> RequestBuilderfn RequestBuilder::basic_auth(self : RequestBuilder, username : String, password : String) -> RequestBuilderfn RequestBuilder::headers(self : RequestBuilder, headers_map : Map[String, String]) -> RequestBuilderpub struct Scenario {
executor : String
vus : Int?
iterations : Int?
duration : String?
start_time : String?
graceful_stop : String?
exec : String?
}pub struct Stage {
duration : String
target : Int
}fn b64decode_with_format(input : String, encoding : String, format : String) -> Stringfn b64encode_with_encoding(input : String, encoding : String) -> Stringfn[T] check_value(val : T, name : String, condition : (T) -> Bool) -> Boolfn connect(url : String, params : WebSocketParams, callback : (Socket) -> Unit) -> WebSocketResponsefn create_api_key_header(key : String) -> Stringfn create_basic_auth_header(username : String, password : String) -> Stringfn create_bearer_auth_header(token : String) -> Stringfn every_n_iterations(n : Int, f : () -> Unit) -> Unitfn group_every_n_iterations(n : Int, name : String, body : () -> Unit) -> Unitfn group_on_first_iteration(name : String, body : () -> Unit) -> Unitfn group_on_vu(vu_id : Int, name : String, body : () -> Unit) -> Unitfn md5(data : String, output_encoding : String) -> Stringfn[T] measure_time_with_duration(f : () -> T) -> (T, Double)fn on_first_iteration(f : () -> Unit) -> Unitfn on_iteration(n : Int, f : () -> Unit) -> Unitfn open(filename : String) -> Stringfn pace_random(min_seconds : Double, max_seconds : Double) -> Unitfn random_seed(seed : Int) -> Unitfn request_oauth_token(token_url : String, client_id : String, client_secret : String) -> OAuthTokenfn ripemd160(data : String, output_encoding : String) -> Stringfn sha1(data : String, output_encoding : String) -> Stringfn sha256(data : String, output_encoding : String) -> Stringfn sha384(data : String, output_encoding : String) -> Stringfn sha512(data : String, output_encoding : String) -> Stringfn sha512_256(data : String, output_encoding : String) -> Stringfn sleep(duration : Double) -> Unitfn tagged_group_request(group_name : String, builder : RequestBuilder, tags : Map[String, String]) -> Responsefn test_auth_required(url : String) -> Boolfn test_basic_auth(url : String, username : String, password : String) -> Boolfn think_random(min_seconds : Double, max_seconds : Double) -> UnitInstall
Download zipA MoonBit module for k6 load testing scripts, providing utilities and abstractions to enhance the development experience of k6 scripts using MoonBit.
Dependencies