Tuesday, April 7, 2009

Quick & Dirty LoadRunner AJAX Debugging Tips

Since I've been battling with AJAX and LoadRunner, I thought I'd compose a quick note about what I've found.


LR 9.5 AJAX Click & Script Protocol

If playback of Click & Script is failing, try right-clicking on the C&S code that is breaking, and select "Use alternative navigation" option. It will comment-out the existing code and try HTML level code in its place.

This has been very helpful - in many cases it saves you from having to re-record the BP in HTML mode. I have had some cases where it just comments-out the GUI code and provides nothing in its place. I have also found, maybe a coincidence (not enough solid evidence that this is a 1:1 relationship), that URL mode functions work best when this happens.


Also, when Playback fails:
Action.c(194): web_button("INPUT_4") highest severity level was "warning", 55 body bytes, 252 header bytes [MsgId: MMSG-26388]
Action.c(204): web_browser("Sync") was successful [MsgId: MMSG-26392]
Action.c(211): web_browser("FireContinueButton1") was successful [MsgId: MMSG-26392]
Action.c(216): web_browser("Sync") was successful [MsgId: MMSG-26392]
Action.c(223): Downloading URL "https://app.url/OBG/Payment/PaymentInstruction.aspx" for an ActiveX object (asynchronous POST request) [MsgId: MMSG-26000]
Action.c(223): Warning -26276: JavaScript error (id=1) in line 5: ReferenceError: A is not defined [MsgId: MWAR-26276]
Action.c(223): Warning -26276: JavaScript error (id=0) in line 1: JavaScript evaluation error when executing function (by pointer) [MsgId: MWAR-26276]
Action.c(223): Warning -26000: ActiveX callback function failed. See previous message(s) [MsgId: MWAR-26000]
Action.c(223): web_button("INPUT_4") highest severity level was "warning", 55 body bytes, 252 header bytes [MsgId: MMSG-26388]
Action.c(238): Think time - Waiting 2.00 seconds (according to limit).


This seems to be a LR failure. In the example above, it is failing on pretty common Microsoft ASP .NET code. In this particular case it was a form that had validations going on,
and some state that was not being correctly handled during playback. At this time I have found no relief from HP for this issue and had to use URL mode recording snippets to get around the offending forms.


I have found a similar behavior in two places for the app I am working on. Curiously, if playback the script in LR9.1 it gets past one of them. Ugh! Seems to be a JavaScript handler issue in both cases, just maybe works a tiny bit better in 9.1.


Debugging JavaScript in IE:
I found these links to be useful...
http://www.jonathanboutelle.com/mt/archives/2006/01/howto_debug_jav.html
http://www.codestore.net/store.nsf/unid/DOMT-5UBUVW?OpenDocument

You need some components from MS Office for this to work, but this standard MS IE debugger is just okay. It doesn't seem possible to watch values (haven't figured it out anyway), but you can at least step through the JavaScript.

Try to figure out what is happening in the browser manually that is not happening when LoadRunner is playing the script back.

As mentioned above, LR playback failure may be related to a state or trigger that is not being setup or fired correctly. If you can identify this missing link, you can likely manipulate/call it from your script to work around the issue.

Calling a JavaScript trigger is easy if you can dig the code out of the browser:
web_browser("FireContinueButton1",
ACTION,
"EvalJavaScript=WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(\"ctl00$MasterPagePlaceholder$btnContinue\", \"\", true, \"\", \"\", false, true))",
LAST);


Just make sure that you follow all the standard embedded quote escape rules.

That's all I know at this time. Good luck.

Thursday, March 26, 2009

Big-Time Handy Services

This is a small list of web sites and software services that I rely on and love.

1. SugarSync : http://www.sugarsync.com
- Absolutely amazing multi-computer sync tool. I backup individual computers, but for syncing files between computers, this has been a lifesaver.
- I can listen to podcasts that are loaded on my home system, synced to the SugarSync server, and streamed to my iPhone, while I commute!

2. Vyew : http://www.vyew.com
- Online, real-time group collaboration.
- Free web demonstration
- Free web desktop sharing
- Free document & whiteboard collaboration
- Free conference calls (LD charges apply, only)

3. Google Calendar : http://calendar.google.com
- Free group calendaring, works with iCal!

More to come.

State of our Boutique Consulting Union

SIA Consulting Group LLC has a narrow focus right now, but a larger vision for the future. The timeline for the larger vision is impacted by a lot of things, the economy of course, but part and parcel of that is how the short-term strategy pays off directly. If the short-term strategy does not work, then we need to reboot the effort with new ideas.

We are each leveraging our strengths to find work that relates to the field that we can consult into directly. Monique and I are strong in enterprise software quality and its related disciplines; Monique can also consult in the ITSM/ITIL space, and our third majority partner Jason, is the heart and soul of the SIA model - Strategy Into Action.

Short term, our team is looking at partnerships with larger consulting firms who need our skills to deliver projects. This puts us in the following position:
1. No exposure corporately to the end-customer - we are an agent of the firm that took us there.
2. No direct repeat business with the end-customer - we are not poachers
3. 2nd or 3rd tier in the payment stream - which means that we are taking fractions of the actual billing rates that the customer is willing to pay.
4. This does not help us build our end-user base, but it does help us build out a partnership base and prove ourselves as an organization that will do what is right, working hard at it.
5. As business people, we are also occupied directly in delivering services. If we're not delivering, we're not making money.
6. Wherever possible, we will bring in a sub-contractor to fill roles, which we will pay a huge margin of the rate that they are being billed at; probably better then 90% of the bill rate. This way the sub-contractor sees the benefits of working with us, and the small overhead that we take will help us work toward the long-term strategy.

By doing this, we are able to survive in the economy of Q1/Q2 2009. In all likelihood we will stay in this mode through Q4 of this year, as it is an okay place to be.

Long term, we want to work with medium/small companies (<$200M) to help them align their business practices with their stated corporate objectives. This is the ultimate SIA model. Each of the primary parters will drive their practice areas for those projects, staffing, managing, and working the projects from much higher levels than the Short-Term strategy would allow.

When this phase is manifested is unknown right now. Perhaps a year? Maybe 2? Beyond that I can't say when it might launch, but it is always in the back of our minds that this is what we are ultimately working for.

There is an interim strategy as well, a Mid-Term goal, and that is functionally somewhere in the middle; moving a step up the billing food-chain, carrying paper on some projects, and being in a position to augment the project with our own consultants. The partners would be pulling multiple-role jobs in this phase, delivering services, spinning up/down projects, seeking new customers and partnerships, and continuing to deliver IT services with the SIA spin - always looking to help our clients enact their stated strategies.

At this moment, the state of our boutique consulting union is good.