标签:自动化测试 phoenixframe 接口测试 socket
package org.phoenix.cases.webservice;
import java.util.LinkedList;
import org.phoenix.action.WebElementActionProxy;
import org.phoenix.model.CaseLogBean;
import org.phoenix.model.UnitLogBean;
import org.phoenix.utils.NetTelnet;
/**
* phoenixframe平台连接socket服务器,并接收返回值的示例
* @author mengfeiyang
*
*/
public class TestSocket extends WebElementActionProxy{
private static String caseName = "";
@Override
public LinkedList<UnitLogBean> run(CaseLogBean arg0) {
init(caseName,arg0);
NetTelnet n = new NetTelnet("10.161.88.64",8889);
System.out.println(n.sendCommand("test","Password:"));//向服务器发送test指令,并接收结尾为Password:关键字的字符
n.disconnect();
return getUnitLog();
}
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
phoenixframe平台连接socket服务器,并接收返回值的示例
标签:自动化测试 phoenixframe 接口测试 socket
原文地址:http://blog.csdn.net/feiyang123_/article/details/47680255