jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shyam Panjiyar" <shyam.panji...@5nance.com.INVALID>
Subject RE: Want to get Integer value only from rational number
Date Fri, 10 May 2019 12:42:00 GMT
Thanks for Reply

Resolved now

try 
{
 int number = ${__jexl3((${FinPlanIDGen} + 0.0 ).intValue().toString())}; 
 log.info("The converted integer is " + number);
 vars.put("FinPlanIDGenerated", String.valueOf(number));
}
catch (Exception ex){
    log.warn("Error in my script", ex);
    throw ex; // elsewise JMeter will "swallow" the above exception
}

Thanks & Regards,
Shyam Kishor Panjiyar
 
-----Original Message-----
From: Shyam Panjiyar <shyam.panjiyar@5nance.com> 
Sent: 10 May 2019 16:24
To: 'JMeter Users List' <user@jmeter.apache.org>
Subject: Want to get Integer value only from rational number

Hi ,

Could you please help with Bean Shell Sampler Script for below  requirement :-

Input - String sequence from JSON Extractor as 123.0

Output - String sequence in variable as 123

Thanks & Regards,
Shyam Panjiyar



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Mime
View raw message