Friday, 28 February 2014

Unable to replay NCA script

Problem detail:  when replay the Oracle-NCA script, after executing following coldes,it hangs and keeps sending heart beat request.
nca_java_action("CS_FIND_CONTRACT_GRID_ITEM_GRID_0", "msgRequested", "");

lr version: 11.03

Problem Solution: Changing the NcaTimerWaitMode will delay the replay engine in searching for the item in case there is an active timer. This is disabled by default as it is not required in most of the cases. The NcaTimerWaitMode can be changed under the [NCA_GENERAL] section in the default.cfg file located under the script folder.

where "value" is number from 0 to 3.

NcaTimerWaitMode=0 The timer expired message is kept in the client message queue until next client terminate message. If an NCA replay function started its object search, but the object was not found and there is active timer in the system, replay waits for timer expiration, flushes the message queue by client terminate messages, and after an answer from a server, tries to find required object.

NcaTimerWaitMode=1 When the NCA replay function is called and there is active timer in the system, always wait for its expiration, flush the message queue, and only then try to find the required object. This mode is useful when a required replay object already exists (no error on this step), but some requested data or form is not ready yet.

NcaTimerWaitMode=2 When a client receives the timer schedule message, it just waits for requested time, generates an expired message, and sends it immediately. There are no messages between the server and client in this case.

NcaTimerWaitMode=3 Differs from mode 1 by immediate message queue flush when an expired message is generated. This mode may be useful when there is no message flush due to NCA replay function execution.
The nca_get_top_window function is called in a script. This function does not produces client messages, so, cannot flush message queue.

Note: The default timer mode in LoadRunner 8.1 onward is set to 3. Hence, NcaTimerWaitMode=3 specifies the default mode in LR 8.1 and newer versions.

Related articles:
Document ID 11913 - How-to and troubleshooting guide for Oracle NCA Vusers
Document ID 12538 - How-to and troubleshooting guide for Multi Protocol (NCA/WEB) Vusers