Sebb, has there been any news on this enhancement? I'm not sure if you
filed a bug or not.
It would be great to get this in, for me, so I don't have to package
jmeter and distribute our own version of JMeter internally. I don't
have "complete" code (to submit a patch) - just as much as I needed to
get access to the actual resultSet data for select statements. What can
I do to help? I don't want to finish coding this up if my patch is just
going to be rejected anyways. Whats the process here?
sebb wrote:
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]