jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

Converter: CLOB to String

Open Sufi07 opened this issue 1 year ago • 1 comments

Use case

I'm working with an Oracle database, and when executing a query that returns a CLOB (Character Large Object) containing a JSON request body, I need to convert the CLOB to a string. This is crucial for comparing it with the executed API request body. I would greatly appreciate a JSR233 function or script that effectively handles this CLOB conversion in JMeter.

Possible solution

some kind of reader that convert the clob into a string.

Possible workarounds

No response

JMeter Version

5.6.2

Java Version

java version "20.0.2" 2023-07-18

OS Version

Microsoft Windows 10.0.19045

Sufi07 avatar Nov 17 '23 11:11 Sufi07

Currently, JDBC Sampler uses rs.getObject(int).toString(), however, we should use rs.getString(...) so the JDBC driver makes the proper conversions. I'm not sure if .getString(...) alone is enough to fetch CLOB value as string.

vlsi avatar Dec 30 '23 08:12 vlsi