tsung icon indicating copy to clipboard operation
tsung copied to clipboard

how to use protobuffer in websocket

Open huang2287832 opened this issue 8 years ago • 2 comments

I use websocket to test myproject , but I dont know how to edit xml in protobuffer , please help, thanks

huang2287832 avatar Sep 09 '17 10:09 huang2287832

Since protobuf is a binary format, directly editing this in Tsung's XML configuration is not really an option.

I don't really see an easy option here, aport from writing some Erlang code yourself to generate protobuf messages on-the-fly. An alternative for generating the entire protobuf messages could be to base64 encode them and use base64:decode/1 to decode them (also Erlang code, but a lot less complex). This will only work though if your message is static.

tisba avatar Jun 02 '18 11:06 tisba

You can always just dump the protobuf contents to a file and POST that using the contents_from_file attribute.

fatso83 avatar Feb 24 '20 21:02 fatso83