Search code examples
viewstateloadrunner

LoadRunner Viewstate


In other posts I have experienced some issues with record and playback of an app and I was told that viewstate could be something that I should look into regarding this issue.

I have a chunk of code here that is working during replay (not the same app though), but the point I am making is the same:

web_submit_data("overview.jsf", 
    "Action=https://wasapp-q1.adeo.no/some/sa/overview.jsf?execution=e4s1", 
    "Method=POST", 
    "TargetFrame=", 
    "RecContentType=text/html", 
    "Referer=https://wasapp-q1.adeo.no/some/sa/overview.jsf?execution=e4s1", 
    "Snapshot=t4.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=overviewSearchForm:searchCriteriaId", "Value=01024531232",   ENDITEM, 
    "Name=overviewSearchForm:j_id111", "Value=Get ", ENDITEM, 
    "Name=overviewSearchForm_SUBMIT", "Value=1", ENDITEM, 
    "Name=javax.faces.ViewState", "Value=cxeGmdwmyti6LtCKFbfHsLGYkE6QJ+eGozLlfTsidCNXrT2KqQ+JviDhkv7MCtdmlnxzQZVOMo9uO9ZrjUUdfpfFJMwwRfg/A09/Em5tTUJxNZ6fUe5LGK9oitXNeeBh0M5Yd7nwXn5uj1bLQzluR09kUUA2dnwrXajncw==", ENDITEM, 
    LAST);

This chunk of code is not working:

web_submit_data("hello_world_2", 
    "Action=http://d26jbsl00003.test.local:8080/wow/behold/83512/considervilkar?5-1.IBehaviorListener.0-vurdereVilkarListe-vurdereVilkarRepeater-4-considerVilkarListItem-considerHoved-innerPanel-vilkarDetaljer-vilkarForm-vilkarsregelValg",
    "Method=POST", 
    "TargetFrame=", 
    "RecContentType=text/xml", 
    "Referer=http://d26jbsl00003.test.local:8080/vedtak/behandling/83512/vurderevilkar?5", 
    "Snapshot=t4.inf", 
    "Mode=HTML", 
    ITEMDATA, 
    "Name=vilkarsregelValg", "Value=OPPFYLT", ENDITEM, 
    LAST);

Both code chunks call web_submit_data. Assuming that Viewstate has something to do with the replay issue of the last one, what does:

"Name=javax.faces.ViewState", "Value=cxeGmdwmyti6LtCKFbfHsLGYkE6QJ+eGozLlfTsidCNXrT2KqQ+JviDhkv7MCtdmlnxzQZVOMo9uO9ZrjUUdfpfFJMwwRfg/A09/Em5tTUJxNZ6fUe5LGK9oitXNeeBh0M5Yd7nwXn5uj1bLQzluR09kUUA2dnwrXajncw==", 

actually mean in LoadRunner context? Could it have something to do with my second chunk of code not working (not having a Viewstate)?


Solution

  • State is something which changes with every request. So, ViewState is something you will need to correlate for almost every request (when it is present). There is also jsessionstate that shows up on Java apps, ViewState is typically associated with ASP and ASP.Net