?????????????
????????????Groovy?????б?д??????????????????????runner??????????????????
????interface Runner {
????def init(Test app)
????def run(Test app?? String log)
????def destroy(Test app)
????}
??????Thrift?????????
class TestServiceRunner implements Runner {
RPCService.Client _client
TTransport _transport;
@Override
def init(Test app) {
def conf = app.config // ??????????
_transport = new TFramedTransport(new TSocket(conf.get("thrift_service_host") as String?? conf.get("thrift_service_port") as int))
TProtocol protocol = new TBinaryProtocol(_transport)
_client = new RPCService.Client(protocol)
_transport.open()
}
@Override
def run(Test app?? String log) {
TestRequest req = Vcr.deSerialize(log?? TestRequest.class) // ???????????????л?
_client.echo(req) // ????????
}
@Override
def destroy(Test app) {
_transport.close() // ??????
}
}
???????????
?????????????????????y??д?????
??????????????Web???洴????????????????????????????????????????á?

???????????
???????????????????????????????????????

??????????
????????????????????????????20??????????????δ????飬??????????????????15??30?????????????????????????????????????????????????????????????????
??????????????????????????????