从 HTTPSampleResult 获取 HTTPSamplerBase 对象
要从 HTTPSampleResult 获取 HTTPSamplerBase 对象,可以使用以下代码:
HTTPSamplerBase sampler = (HTTPSamplerBase) sampleResult.getSampler();
在上述代码中,'sampleResult' 是一个 HTTPSampleResult 对象,而 'sampler' 是一个 HTTPSamplerBase 对象。将 HTTPSampleResult 对象强制转换为 HTTPSamplerBase 对象可以获得 HTTPSamplerBase 的属性和方法。

原文地址: http://www.cveoy.top/t/topic/pG9v 著作权归作者所有。请勿转载和采集!