jmeter
jmeter copied to clipboard
Converter: CLOB to String
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
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.