Administrator
|
socket 은 bootstrap class 라 인스투르멘테이션이 않됩니다. 다음과 같이 하세요.
@BeforeProcess
public static void beforeProcess() {
test = new GTest(1, "Test1")
grinder.logger.info("before process.")
}
@BeforeThread
public void beforeThread() {
socket = new Socket();
test.record(this, "doConnect");
}
public doConnect(Socket socket, InetSocketAddress inetSocketAddress ) {
socket.connect(inetSocketAddress, 3000)
}
@Test
public void test(){
InetSocketAddress inetSocketAddress = new InetSocketAddress("192.168.1.112", 20804)
doConnect(socket, inetSocketAddress);
assertThat(socket.isConnected(), is(true))
}
|