AJAX TruClient - Issue in Multiple Iteration

Hi Team,

 

When I am trying to iterate "Action" part more than one time, application session is getting expired.

 

I have put login part of application in "Init" Section and logout part in "End" section.

 

After last step of action part, we are getting blank page in browser.

 

Please find the attached screenshot for reference.

 

Regards,

Deepak

 

Parents
  • Hi, I am bumping into a similar problem with TruClient Ajax where the session ID of the logged in user is also lost due to private browsing, however the solution provided to untick the option in runtime settings: "Simulate a new user on each iteration" does not resolve my particular problem.

     

    i am using HP Loadrunner 11.52 and I have recorded a session through the HP TeamSite web application which is a content management suite based upon ExtJS JavaScript framework, Ajax calls, and other J2EE backend.

     

    What I see happening is that the script logs in the user into the UI, then the user wants to click on a portlet link, but the portlet link has a login dialog due to the fact that the private browsing removed the session id.

     

    How can I script the session id into the TruClient script. Can someone point me to a resource that explains specifically how to develop this javascript into the script?

     

  • Hi,

    Can you share the script? which version are you using?

    If you can elaborate more on the BP it would be great.

  • The test suite I am trying to build is attached.

     

    With BP you mean business plan or business case?

     

    The customer has an objective of having 25 concurrent users kick off this workflow at some stage in 2014. We are testing internally in HP the scalability of the workflow scripts. The workflow uses a combination of Perl and Java scripts to do backend processing of incoming content in the form of XML. The content management tool includes a session based UI. Session is being checked during the life cycle of a content item which includes several approval steps in the workflow.

     

    Let me know where you want me to elaborate more on.

    TruClientIE_eCMI.zip
  • Hi,

    1. BP - Business Process

    2. Which LR version are you using?

    3. It is TC IE script but you mentioned private browsing (which exists only in TC FF).

    4. The script is empty...

     

  • 1.  The business process can be illustrated by this example:

    I am working in the marketing department and I want our client care representative to say to our customers: "Thanks for calling our help line, what can I assist you with today?". This has to be translated in 10 languages. Once I have updated the content item in the HP TeamSite web application's web form, I publish this content item. HP TeamSite copies the content update onto new or existing language versions of the content and updates the status of each of these items in the user interface's widget to show all stakeholders the updated status. The translator then takes on translation for each of the languages and approves. Then, a validator validates the work and passes the workflow job onto a final business approver. After the approver finalizes the work, the asset is being copied across to be picked up by an application that renders the phrases into the interview scripts that the client care rep uses in a phone conversation with the customer.

     

    This is one of the use cases of this business process.

     

    2.  I am using LR11.52 to support performance analysis of the workflows

     

    3.  I tried to use several protocols in my efforts and i have been moved into the direction of TruClient Ajax by HP Loadrunner experts in a Lync forum. I am really a novice, but I find that the recoding of the BP has gone allright end-to-end apart from the loss of the session ID in step 20. I think I do not want private browsing to take out my session cookie, but the TruClient seems to be fit-for-purpose to my objectives apart from this feature.

    4. I am trying again with the attachment loader. If it fails again, I will email you the zip file instead, is that ok?

    TruClientFirefox-BNPP-eCMI-CC-Edit-Workflow.zip
Reply
  • 1.  The business process can be illustrated by this example:

    I am working in the marketing department and I want our client care representative to say to our customers: "Thanks for calling our help line, what can I assist you with today?". This has to be translated in 10 languages. Once I have updated the content item in the HP TeamSite web application's web form, I publish this content item. HP TeamSite copies the content update onto new or existing language versions of the content and updates the status of each of these items in the user interface's widget to show all stakeholders the updated status. The translator then takes on translation for each of the languages and approves. Then, a validator validates the work and passes the workflow job onto a final business approver. After the approver finalizes the work, the asset is being copied across to be picked up by an application that renders the phrases into the interview scripts that the client care rep uses in a phone conversation with the customer.

     

    This is one of the use cases of this business process.

     

    2.  I am using LR11.52 to support performance analysis of the workflows

     

    3.  I tried to use several protocols in my efforts and i have been moved into the direction of TruClient Ajax by HP Loadrunner experts in a Lync forum. I am really a novice, but I find that the recoding of the BP has gone allright end-to-end apart from the loss of the session ID in step 20. I think I do not want private browsing to take out my session cookie, but the TruClient seems to be fit-for-purpose to my objectives apart from this feature.

    4. I am trying again with the attachment loader. If it fails again, I will email you the zip file instead, is that ok?

    TruClientFirefox-BNPP-eCMI-CC-Edit-Workflow.zip
Children
  • Hi, I got over this issue just now, it was a product training issue. I learned that adding a javascript evaluation step before the failing step and adding the required cookies got me further in the test replay. This message helped me:

     

    http://h30499.www3.hp.com/t5/LoadRunner-Support-Forum/add-cookies-to-TruClient-AJAX-script/m-p/2392286/highlight/true#M137

     

    I set these cookies and I was able to continue the journey to develop the test

     

    document.cookie = 'JSESSIONID=97CC004632E930D926C9ECCE2E07D157; path=/;  domain=192.168.150.129'
    document.cookie = 'iw_user=Administrator; path=/;  domain=192.168.150.129'
    document.cookie = 'iw_domain=WIN8KTS732; path=/;  domain=192.168.150.129'
    document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744e798d9e21f64719cb3836a94daebf891c5e4c2e81704c70fa541e573c34d0f48ab7c46a157d45f51b5d6340e523e487d1f11eda8af8dafd90; path=/;  domain=192.168.150.129'

  • After I finished the first step of a full replay with 1 user session, I have now parameterized the user. Unfortunately, the cookie handling pops up again as a challenge here. Could you give me some further advice/tutorial/training with this step:

     

    In the Evaluate Javascript code step before the web application rerenders the UI, I have this now:

     

    document.cookie = 'JSESSIONID=7D5B9DC81498CDF9991DBD2DFD9A85A3; path=/;  domain=192.168.150.129' ;

    document.cookie = 'JSESSIONID=7D5B9DC81498CDF9991DBD2DFD9A85A3; path=/;  domain=192.168.150.129' ; document.cookie = 'iw_domain=WIN8KTS732; path=/;  domain=192.168.150.129' ;

    if (LR.getParam("GetUserName", "Administrator")) {  document.cookie = 'iw_user=Administrator; path=/;  domain=192.168.150.129' ;  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744e798d9e21f64719cb3836a94daebf891c2e8e18a7f0350bdf1cd93a76b008d90a44f961ea8a0f3eddba0f64c6c45302b9; path=/;  domain=192.168.150.129' ; } else if (LR.getParam("GetUserName", "contributor")) {  document.cookie = 'iw_user=contributor; path=/;  domain=192.168.150.129' ;  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744ee287f540dd4e85ee124dfc4cbe8abb826235d91b6cf5ec66f535cd2a4a795beb7b0be062bcc07f9e1bbaa36278430838; path=/;  domain=192.168.150.129' ; } else if (LR.getParam("GetUserName", "translator")) {  document.cookie = 'iw_user=translator; path=/;  domain=192.168.150.129' ;  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744ea9bb5bf04d1d53bb33fe212ce85e48f5511efb6b18305090834cdd6b30403f24c3418321512bdaf3; path=/;  domain=192.168.150.129' ; } else if (LR.getParam("GetUserName", "validator")) {  document.cookie = 'iw_user=validator; path=/;  domain=192.168.150.129' ;  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744e5f355457bb4cc22360042dad56cec3f2c54ee98ae564f257fae4bea99c1562f582f04c1ee974321d; path=/;  domain=192.168.150.129' ; } else if (LR.getParam("GetUserName", "publisher")) {  document.cookie = 'iw_user=publisher; path=/;  domain=192.168.150.129' ;  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744e6198f34689088d45f41799f9edb79d9b5ce8626d076f587be1164e241d286623a9ccebada8f7090f; path=/;  domain=192.168.150.129' ; } //fallback to administrator if nothing else works else { }

     

     

    When I replay, the administrator username seems to be parsed.

     

    I did a search on the forums and in the truclient pdfs on how to put a if else block like this in place, and how to call the parameters, but I am sure I am doing something silly here still

     

    Can you verify something obvious I am doing wrong ?

    TruClientFirefox-BNPP-eCMI-CC-Edit-Workflow-worksfor1user.zip
  • I have now put this in the javascript which works:

     

    if (LR.getParam("GetUserName", "Administrator")) {  //window.alert("username is: " LR.getParam("GetUserName"));  document.cookie = 'JSESSIONID=167362CA3DCCB8898DE275FCE1DC4B24; path=/;  domain=192.168.150.129'  document.cookie = 'iw_user=Administrator; path=/;  domain=192.168.150.129'  document.cookie = 'iw_domain=WIN8KTS732; path=/;  domain=192.168.150.129'  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744e798d9e21f64719cb3836a94daebf891c5e4c2e81704c70fa541e573c34d0f48ab7c46a157d45f51b30281a34b3a5dcb32610883742608ce4; path=/;  domain=192.168.150.129' } else if (LR.getParam("GetUserName", "contributor")) {  //window.alert("username is: " LR.getParam("GetUserName"));  document.cookie = 'JSESSIONID=167362CA3DCCB8898DE275FCE1DC4B24; path=/;  domain=192.168.150.129'  document.cookie = 'iw_user=contributor; path=/;  domain=192.168.150.129'  document.cookie = 'iw_domain=WIN8KTS732; path=/;  domain=192.168.150.129'  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744ee287f540dd4e85ee124dfc4cbe8abb8219434127cf3ec0021f057867ea6973150f15047088c77d5d3d662599facfd7fd40c630a4a8b40091; path=/;  domain=192.168.150.129' } else if (LR.getParam("GetUserName", "translator")) {  //window.alert("username is: " LR.getParam("GetUserName"));  document.cookie = 'JSESSIONID=167362CA3DCCB8898DE275FCE1DC4B24; path=/;  domain=192.168.150.129'  document.cookie = 'iw_user=translator; path=/;  domain=192.168.150.129'  document.cookie = 'iw_domain=WIN8KTS732; path=/;  domain=192.168.150.129'  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744ea9bb5bf04d1d53bb33fe212ce85e48f519af766107d01f60bc07db86572cfe169d9db85c89868505d02bdf1336be4afae7eb0bbdc3584ee5; path=/;  domain=192.168.150.129' } else if (LR.getParam("GetUserName", "validator")) {  //window.alert("username is: " LR.getParam("GetUserName"));  document.cookie = 'JSESSIONID=167362CA3DCCB8898DE275FCE1DC4B24; path=/;  domain=192.168.150.129'  document.cookie = 'iw_user=validator; path=/;  domain=192.168.150.129'  document.cookie = 'iw_domain=WIN8KTS732; path=/;  domain=192.168.150.129'  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744e5f355457bb4cc22396b96b6b6a455cf84f75371d8a9dc096fa644e1c68b2d799d0da7be32774ef45b8483a22f211739be9085705f9e7a16f; path=/;  domain=192.168.150.129' } else if (LR.getParam("GetUserName", "publisher")) {  //window.alert("username is: " LR.getParam("GetUserName"));  document.cookie = 'JSESSIONID=167362CA3DCCB8898DE275FCE1DC4B24; path=/;  domain=192.168.150.129'  document.cookie = 'iw_user=publisher; path=/;  domain=192.168.150.129'  document.cookie = 'iw_domain=WIN8KTS732; path=/;  domain=192.168.150.129'  document.cookie = 'IWAUTH=52616e646f6d49561e14f912701a744e6198f34689088d45ae902d2640ce04db8337b3a60927b544f8b0e24be59f8ade45331884db591608503ef342d96d03e23836c014234d0c5c; path=/;  domain=192.168.150.129'

     } else {  window.alert("nothing to do"); }

    window.setTimeout(function(){}, 1000);

    //window.alert("IWAUTH is: " getCookie("IWAUTH"));

    function getCookie(cname) { var name = cname "="; var ca = document.cookie.split(';'); for(var i=0; i<ca.length; i )   {   var c = ca[i].trim();   if (c.indexOf(name)==0) return c.substring(name.length,c.length); } return ""; }

     

     


  •  wrote:

    Good to hear.


    Boa tarde Guy.

     

    Estou com um problema diferente e não encontreis posts aqui........

    Sou iniciante em LoadRunner, e não estou conseguindo aceder paginas que preciso através da gravação.......parece-me estar relacionado com o STS, tenho a seguinte mensagem de retorno " O pC não confia no certificado de segurança do Site.

    Código Erro: DLG_FLAGS_INVALID_CA

    As vezes para aqui e as vezes permite seguir em frente, mas quano vou em frente ele diz password inválida, mas estou usando a password correta.

    Os certificados estão ativos e com validade até 2023.

    Pode ajudar?  Notei que vc é ativo aqui e tem muita experiência.

    Obrigado.

    Antonio Moraes