JMeter JDBC Call returns the value as parameter name if the value received from DB is null

Maniram

I am using a JDBC PreProcessor in JMeter to fetch a value from the DB before firing a SOAP call which needs to be enriched with that information.

I have assigned a variable XYZ to fetch the value returned from DB. If there is a value returned from DB, i am able to get that value using ${XYZ_1} successfully, however if the value returned from DB is nothing (null) (as seen in DB), the value returned using ${XYZ_1} is shown as ${XYZ_1}.

I am using this variable in Sampler as <Location>${XYZ_1}</Location>

Ex: If DB returns value as 'California', i get it as <Location>California</Location>

If DB returns value as nothing (null), the value looks like <Location>${XYZ_1}</Location>.

Now my issue here is, if DB returns the value as nothing (null), i want the value to be set as nothing. So it should like like below

<Location></Location>

Any suggestions on this?

UBIK LOAD PACK

You could modify your SQL so that instead of null it returns empty.

Another option is to put a JSR223 Post Processor + Groovy (or Beanshell Post Processor) after your JDBC Post Processor that would test the variable and if null put empty String instead.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Method call returns null value

From Dev

ajax call returns value but variable is null

From Dev

Value cannot be null, Parameter name: path

From Dev

Value cannot be null. Parameter name: entitySet

From Dev

Value cannot be null. Parameter name: extent

From Dev

"value cannot be null parameter name: key"

From Dev

Value Cannot be null, Parameter name: dataTable

From Dev

Value cannot be null. Parameter name: baseUri

From Dev

Value cannot be null. Parameter name: entity

From Dev

Value cannot be null. Parameter name: type

From Dev

Value Cannot be null, Parameter name: dataTable

From Dev

Value cannot be null. Parameter name: httpContext

From Dev

Value cannot be null. Parameter name: incomingMarkupParser

From Dev

Value cannot be null. Parameter name: first

From Dev

Value cannot be null. Parameter name: value, CreateIdentityAsync?

From Dev

Value cannot be null. Parameter name: value Sitecore

From Dev

C# XML - Value cannot be null. Parameter name: value

From Dev

Call by Name/Call by Value

From Dev

Call by Name/Call by Value

From Dev

Value from JavaScript object returns null

From Dev

Null value returns from AddressBook framework in swift

From Dev

Getting a value from parent activity returns null

From Java

JPA Repository.findById() returns null but the value is exist on db

From Dev

JPA Repository.findById() returns null but the value is exist on db

From Dev

Vertx3 - Return a value from a JDBC connection? (sql db).

From Dev

Function call as parameter value?

From Dev

getLastKnownLocation returns Null value

From Dev

@Value in Springboot returns null

From Dev

getLastKnownLocation returns Null value

Related Related

HotTag

Archive