Hi,

I'm using Jmeter 1.8.1 and jdk 1.4 to do some interface testing on a legacy
application which uses nasty text over tcp sockets for interprocess comms.

I've implemented a SocketSampler which extends JavaSamplerClient and will
write a command (as specified in the UI) to the socket, then return the
response line as the SamplerResult response data:

        long start = System.currentTimeMillis();
        byte[] response = makeRequest(request);  //does the nasty socket thing
        long finish = System.currentTimeMillis();
        SampleResult result = new SampleResult();
        result.setDataType(SampleResult.TEXT);
        result.setResponseData(response);
        result.setTime(finish - start);

The only problem is that when I try to use the AssertionVisualizer I get a
null pointer exception at AssertionVisualilzer:116 and the test run never
exits.  I know that the SleepTest sample has the same problem.

AssertionVisualizer:116
        textArea.append(sample.getSamplerData().toString());

So, I try to add result.setSamplerData(this); to my class - but then none of
the visualizers work!  SamplerData is a TestElement - what TestElement is
expected?  It seems to be only for adding a label to the panel anyway.

Can anyone tell me what I have to do to get the AssertionVisualizer working?
(without hacking the JMeter source - I want to give this test set to 3rd
parties and I want to keep on the development track!)

Thanks




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to