最近公司要测试流媒体性能,第一次接触,网上资料也很少,只有相互抄来抄去的4个函数介绍,研究2天,测试如下;
1.RTMP介绍略
flex_rtmp_connect Connects a client to an RTMP server and sets connection options.
flex_rtmp_disconnect Disconnects a client from an RTMP server.
flex_rtmp_send Sends messages to an RTMP server.
flex_rtmp_receive Receives responses from an RTMP server
2.制作测试脚本:测试协议选择Flex协议,Flex协议对RTMP支持;
配置协议:1.Run-times Settings(F4)-Flex-RTMP;在close all open RTMP*****选择,若不选择批量跑会报错【这个设置操作上应该等于flex_rtmp_disconnect函数】;
2.TOOLS-Recording Options(crtl+F7)-NetWork-Port Mapping 选择Socket level data 或者Soket level data and WinNet level data;
RTMP是通过1935端口建立的收发连接;
3.在LR帮助文档描述还需要设置下面内容,设置收发连接的字节;
In order to enable RTMP simulation, you must configure the recording options for the Flex protocol.
To enable RTMP:
1 Open the Recording Options dialog box by selecting Tools > Recording Options or clicking the Options button in the Start Recording dialog box.
2 In the Network > Port Mapping node click Options.
3 Set the Send-Receive buffer size threshold to 1500.