JMeter Beginner Tutorials | Tips n Tricks 12 💡 How to use TIME FUNCTION

Поділитися
Вставка
  • Опубліковано 15 вер 2024
  • Today we will learn
    1. How to refer current time stamp in JMeter
    2. How to get timestamp in required format
    3. How to get shifted time in required format
    References : help.sumologic...
    ________________________________________________________________
    Do like, share and subscribe
    Keep Learning,
    Raghav
    _________________________________________________________________
    _______ ONLINE COURSES TO LEARN _______
    automationstep...
    ----------- UI TESTING -----------
    Selenium Beginners - bit.ly/2MGRS8K
    Selenium Java Framework from Scratch - bit.ly/2N9xvR6
    Selenium Python - bit.ly/2oyMp5x
    Selenium Tips - bit.ly/2owxc50
    Selenium Builder - bit.ly/2MKNtlq
    Katalon Studio - bit.ly/2wARFdi
    Robot Framework - bit.ly/2Px6Ue9
    ----------- API TESTING -----------
    Web Services (API) - bit.ly/2MGafL7
    SoapUI - bit.ly/2MGahmd
    Postman - bit.ly/2wz8LrW
    General - bit.ly/2PYdwmV
    ----------- MOBILE TESTING -----------
    Mobile Playlist - bit.ly/2PxpeUv
    ----------- CI | CD | DEVOPS -----------
    Jenkins Beginner - bit.ly/2MIn8EC
    Jenkins Tips & Trick - bit.ly/2LRt6xC
    Docker - bit.ly/2MInnzx
    ----------- VERSION CONTROL SYSTEM -----------
    Git & GitHub - bit.ly/2Q1pagY
    ----------- PERFORMANCE TESTING -----------
    JMeter Beginner - bit.ly/2oBbtIU
    JMeter Intermediate - bit.ly/2oziNVB
    JMeter Advanced - bit.ly/2Q22Y6a
    JMeter Tips & Tricks - bit.ly/2NOfWD2
    Performance Testing - bit.ly/2wEXbLS
    ----------- JAVA -----------
    Java Beginners - bit.ly/2PVUcXs
    Java Tips & Tricks - bit.ly/2CdcDnJ
    ----------- MAVEN -----------
    Maven - bit.ly/2NJdDRS
    ----------- OTHERS -----------
    Redis- bit.ly/2N9jyCG
    Misc - bit.ly/2Q2q5xQ
    Tools & Tips - bit.ly/2oBfwoR
    QnA Friday- bit.ly/2NgwGpw
    Sunday Special - bit.ly/2wB23BO
    Ask Raghav - bit.ly/2CoJGWf
    Interviews - bit.ly/2NIPPxk
    All Playlists - bit.ly/2LSiezA
    Keep Learning,
    Raghav
    Website - automationstep...
    LifeCharger - lifecharger.org/
    Udemy Courses - www.udemy.com/...
    Facebook - / automationstepbystep
    Twitter - / automationsbs
    UA-cam - / automationstepbystep

КОМЕНТАРІ • 28

  • @sreenivasuluthanjavur9481
    @sreenivasuluthanjavur9481 6 років тому

    Hi Raghav, I really appreciate your JMeter videos. Whenever, i got stuck, i generally look into your videos for reference.Cool videos.

    • @RaghavPal
      @RaghavPal  5 років тому

      Glad to know this Sreenivasulu

  • @darshanaweerasekara1089
    @darshanaweerasekara1089 Рік тому

    greate

  • @darwin3615
    @darwin3615 2 роки тому

    thanks thalaivare

  • @vishalrraymal9582
    @vishalrraymal9582 5 років тому

    Great....Very Helpful

    • @RaghavPal
      @RaghavPal  5 років тому

      Glad to know this Vishal

  • @jerryberry7188
    @jerryberry7188 3 роки тому

    Sprb video

    • @RaghavPal
      @RaghavPal  3 роки тому

      Thank you so much Jerry

  • @yazh403
    @yazh403 2 роки тому

    Hi bro, i have one doubt,
    I want to run selenium web driver script. I hqve developed using jmeter. Its running in gui mode perfect.
    But while this script in non gui mode with distributed. Not working fuly 500 error.
    Can you help me on this plzzz?

    • @RaghavPal
      @RaghavPal  2 роки тому

      Hi Yazh, what does the logs say, can check this too - stackoverflow.com/questions/7817498/running-selenium-scripts-with-jmeter

  • @user-ii1zt8bc1j
    @user-ii1zt8bc1j 6 років тому

    Hello Raghav! I've got a problem. I suppose that it is connected with the time function. The problem is that after sheduled time is over the test plan execution still goes on. But the total request number being executed is greatly decreasing from 630 avg. to 1-2. what is wrong? If it does matter: test plan contains 18 test threads. Thank you!

    • @RaghavPal
      @RaghavPal  6 років тому

      Hi, most probably , once the scheduled time is reached. JMeter starts stopping the threads. It may take some time to ramp down and is not instant. Also if some threads are in progress, they will stop once their work is over. So it takes some more time.

    • @user-ii1zt8bc1j
      @user-ii1zt8bc1j 6 років тому +1

      Thank you! I'll check it out

  • @lathasree5458
    @lathasree5458 8 місяців тому

    Hello Raghav, in my script required time format is 2024-01-11T13:27:30
    I have passed as ${__time(yyyy-MM-ddThh:mm:ss)}
    Its throwing error as
    Java lang illegal argument exception: unknown pattern letter :T

    • @RaghavPal
      @RaghavPal  8 місяців тому

      Latha
      The error occurs because the `__time` function in JMeter doesn't natively support the "T" character as a separator in time patterns.
      Here are two ways to achieve the desired format:
      1. Use `__groovy` Function:
      - Employ Groovy's `SimpleDateFormat` class for more control over formatting:
      ```
      ${__groovy(new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date()),)}
      ```
      2. Generate Formatted Time in Separate Variable:
      - Use `__time` to generate basic time, then manipulate it:
      ```
      ${__time(yyyy-MM-dd_HH:mm:ss)} // Store in a variable
      ${__javaScript(vars.get("timeVar").replace("_", "T"))} // Replace "_" with "T"
      ```
      Remember:
      - Case Sensitivity: Ensure pattern letters are uppercase for `__time`.
      - Escape Colons: In Groovy, escape colons in time patterns with single quotes (`'`).
      - UTC Time: `__time` generates UTC time by default. Adjust for time zones if needed.
      Choose the method that best suits your script's structure and complexity.

  • @sudharshanfnu2289
    @sudharshanfnu2289 6 років тому

    HI Raghav, how did you change the jmeter Background color from white to carbon .....just curious.

    • @sudharshanfnu2289
      @sudharshanfnu2289 6 років тому +1

      Got it .....its new version .........Looks Good

  • @snehashah7584
    @snehashah7584 4 роки тому +1

    Is there a way I can use this function in body data for post request??

    • @RaghavPal
      @RaghavPal  4 роки тому

      Hi Sneha, not tried this, You can try and another way can be to use function in user defined variables and then refer these variables in your request stackoverflow.com/questions/50740440/using-value-of-user-defined-variable-in-another-user-defined-variable-in-jmeter

    • @utkarshshukla4212
      @utkarshshukla4212 Рік тому

      HI did u get the solution ? if you can help here

  • @sriharivankayalapati873
    @sriharivankayalapati873 6 років тому

    hi raghav
    can you please explain how to handle the LDAP timestamp in jmeter it 18-digit timestamp .

    • @RaghavPal
      @RaghavPal  5 років тому

      Not tried, will have to check Srihari

  • @nagendrareddymaasireddigar7762
    @nagendrareddymaasireddigar7762 3 роки тому

    Hi sir, I would like to capture only weekdays.....how to get ?

    • @RaghavPal
      @RaghavPal  3 роки тому

      Hi Nagendra, you can use any date, time function and give the format, can use scripting too
      stackoverflow.com/questions/66117563/how-to-pass-datesyyyy-mm-dd-falling-only-for-weekdays-in-jmeter

  • @veerepallikavitha221
    @veerepallikavitha221 3 роки тому

    How to same in json time stamp pls reply me

    • @RaghavPal
      @RaghavPal  3 роки тому

      will need to check on this