[英]extract fun:bad result in erlang module using Tsung
我正在使用由 erlang 模塊擴展的 tsung 編寫測試,但我總是遇到同樣的錯誤,甚至不向服務器發送任何內容。
錯誤是:
=INFO REPORT==== 7-Oct-2019::21:12:17 ===
ts_search:(7:<0.181.0>) found module name: "test"
=INFO REPORT==== 7-Oct-2019::21:12:17 ===
ts_search:(7:<0.181.0>) found function name: "authenticate"
=INFO REPORT==== 7-Oct-2019::21:12:17 ===
ts_search:(4:<0.181.0>) extract fun:bad result <<57,...,49>>
我的 tsung session 是:
<sessions>
<session name="authenticate" weight="1" type="ts_raw">
<request subst="true">
<raw data="%%test:authenticate%%" ack="local"></raw>
</request>
</session>
</sessions>
我的模塊是:
-module(test).
-include("test_protobuf.hrl").
-export([authenticate/1]).
authenticate({Pid, DynData}) ->
test_protobuf:encode_msg(#'Authenticate'{user="user", pass="pass"}).
我正在使用 erlang 編譯器: https://github.com/tomas-abrahamsson/gpb
我應該怎么辦?
The Tsung function that calls your authenticate/1
function, ts_search:extract_function/5
, expects a return value of either an integer or a string, but your function is returning a binary. 將其更改為
authenticate({Pid, DynData}) ->
binary_to_list(test_protobuf:encode_msg(#'Authenticate'{user="user", pass="pass"})).
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.