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 platform connects to the socket server and receives an example of the return value * @author Mengfeiyang * */public class Testsocket extends webelementactionproxy{ private static String Casename = ""; @Overridepublic linkedlist<unitlogbean> Run (Caselogbean arg0) {init (casename, ARG0); Nettelnet n = new Nettelnet ("10.161.88.64", 8889); System.out.println (N.sendcommand ("Test", "Password:"));//Send the test instruction to the server and receive the character N.disconnect () at the end of the Password: keyword; return Getunitlog (); }}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Phoenixframe platform connects to the socket server and receives an example of the return value