Apache JMeter Scripting Challenge 5

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 เม.ย. 2023
  • Apache JMeter Scripting Challenge 5 #jmeter #testing #performance #youtubeshorts #youtubevideo #java #javaprogramming #javascipt #software #softwaretesting #interview #interviewquestionsandanswers #youtuber #youtubevideo #youtubers #groovy #beanshell #jexl #computer #technology #tech
    ****************************************************************************
    Apache JMeter Scripting Challenge 5
    ***********************************
    Scenario:
    *********
    Example:
    i have record the 1 script the transactions is
    1.Launch URL
    2.Login
    3.Flight Booking
    4.Flight Details
    5.Search Flight
    6.Passenger list
    7.SignOff
    The Correlation Parameterization Pageverification is completed but the problem is
    "Flight Booking" Transaction backed is not working, what are the dynamic values is
    generated login transaction that is correlation is done. but "cookie manager"
    generated another dynamic value response is flight booking transaction in
    "view results tree" and response body but cookie manager generated dynamic value not
    available in transaction list.
    Solution:
    *********
    i need to do cookie manager generated dynamic value store to the i am already correlated
    dynamic value solve this issue.
    Testplan
    threadgroup
    userdefined variables
    http request default
    http cache manager
    http cookie manager
    1.Launch URL
    2.Login
    3.Flight Booking
    4.Flight Details
    5.Search Flight
    6.Passenger list
    7.SignOff
    view results tree
    view results table
    agrregate report
    Beanshell Post processor
    ************************
    the Generated Dynamic value -- cookie manager
    set_cookie: OSCSID=0022hddhdjk567jfjjfjjfkfk; path=/domain=newtours.demoaut.com
    props.put("mycookie","${cookie_oscsid}";
    Beanshell Pre processor
    ***********************
    import org.apache.jmeter.protocol.http.control.cookiemanager;
    import org.apache.jmeter.protocol.http.control.cookie;
    cookiemanager manager=ctx.getcurrentsample().getcookiemanager();
    cookie cookie=new cookie("OSCSID",props.get("mycookie"),newtours.demoaut.com","/",
    false,0);
    manager.add(cookie);
    ************************
    goto jmeter bin folder open jmeter.properties file and search cookie manager.save.cookie
    you have got the
    #cookiemanager.save.cookies=true
    cookiemanager.save.cookies=true
    *******
    CookieManager behaviour - should Cookies be stored as variables?
    Default is false
    #CookieManager.save.cookies=false
    ******
    save the file and close start the execute the script.
    **************************************************

ความคิดเห็น •