Apache JMeter Scripting Challenge 1
Вставка
- Опубліковано 15 жов 2024
- Apache JMeter Scripting Challenge 1 #jmeter #youtubevideo #performance #viralvideo #testing #softwaretesting #tech #technology #software #performancetesting #JMeterScriptingChallenges #JMeterIssues #java #javascript #groovy #beanshellScripting #viral #youtuber
****************************************************************************
Apache JMeter Scripting Challenge 1
***********************************
Convert GMT TimeZone To EST TimeZone JMeter Scripting Challenge
***************************************************************
Scenario:
*********
I have one Application one Business Scanario, i have recorded that business flow
GMT Time Zone is running. i have completed the Recording the Script,After i will done
Customization of Script Means Correlation, Parameterization remaining When ever i will
run the script its failed due to "GMT Time Zone" issue. The Testing System Available in
USA EST Time Zone. Now we need to Convert GMT Time Zone to EST Time Zone This is the
Scanario.
Solution:
*********
Apache JMeter Script Which Transaction Which request is failed that request right click
add the "JSR223 Pre-Processor" Element and Write the below Code.
JSR223 Pre-Processor
Java Code:
Import java.text.simpledateformat;
Import java.Util.*;
Date today=new date();
simpledateformat sdf=new simpledateformat("yyyy-mm-dd"T"HH:mm:ss.sss");
Timezone tz1=timezone.getdefault();
log.info(tz1.getid());
String localtimezone=sdf.format(today);
log.info("localtimezone is"+localtimezone);
timezone tz2=timezone.gettimezone('GMT');
log.info(tz2.getid());
sdf.settimezone(tz2);
String GMTtimezone=sdf.format(today);
log.info("GMTtimezone is"+GMTtimezone);
vars.put("dt1",GMTtimezone);
${dt1} -- Correlate
Click on the failed request where ever showing failed GMT timezone example
Error: timezone its not matching
2023:02:23 T 01:30:30
{2023:02:23 T 01:30:30} -- Correlate
${dt1} -- Correlate
When you correlate the timezone values and passed to the ${dt1} that time, the time will
converted GMT to EST the issue will be resolved.This is way the i have solve this
Issue.
**************************************************
Its very nice video
hi sir ,good video ,how to explain the work load model
i will create a work load model video with real time scenarios
Hey Goury Shankar, How are you man
hi, where is this challenge address?