On 07/01/2008, Abram Catalano <[EMAIL PROTECTED]> wrote:
>  > This can get complicated, so it might be useful to extend the JDBC
> sampler to make such checks easier.
> Yeah, I'm not bad at regex, but I'd rather deal with columns, values and
> newlines as structured data.
>
>  > Bugzilla can be used for enhancement requests too ... but it might be
> best to discuss the proposal on JMeter user first. I'll start a thread
> if no-one beats me to it.
>
>
> What I've done locally here is add 1) "rawResponseData" to
> SampleResult.java

This may perhaps affect JTL files.

> 2) add res.setRawResponseData(data) in JDBCSampler.
> Code below.  There are a bunch of cases I didn't catch with this  (when
> _queryType != SELECT).
>
>  if (SELECT.equals(_queryType)) {
>                stmt = conn.createStatement();
>                ResultSet rs = null;
>                try {
>                    rs = stmt.executeQuery(getQuery());
>                    Data data = getDataFromResultSet(rs);
>                    res.setRawResponseData(data);
>                    res.setResponseData(data.toString().getBytes());
>                } finally {
>                    close(rs);
>                }
>
>
> Then, I have the rawResponseData Data object available in BeanShell.

Which for some people may be as hard as using an RE     ;-)

> Quick example:
>
>  (BeanShell code)
>
> import org.apache.jorphan.collections.*;
> System.out.println("Headers");
> header = SampleResult.getRawResponseData().getHeaders();
> System.out.println("header length = "+header.length);
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to