UFT Test Case Failure Leads to Application Freeze in WinForms Testing

Hi Team,

We have been using the Mercury.QTP.CustomServer assembly to implement UFT/QTP test in our application. We have properly implemented the test run logic based on the link mentioned below for WinForms Desktop Application.

TrackBarSrv

Record handlers:

We have created a custom control grid that offers highly flexible support for grouping flat data sources, as well as hierarchical data sources, in a WinForms desktop application. The SetCellData method records the row, column, and cell value when the user enters a value in a grid cell by implementing the method mentioned below in our QTP Extension assembly configured with UFT One using the SwfConfigUtility application.

 

Example code for recording the action in UFT/QTP method that is used for our end:

RecordFunction("SetCellData",RecordingMode.RECORD_SEND_LINE, new object[]{row, col, s});

 

Replay interface implementation:

We have implemented the Replay interface to play back the recorded action, but the action is not functioning properly. The application freezes and the action remains incomplete.

 

Example code for implementing the Replay interface in UFT/QTP method that is used for our end:

PrepareForReplay((uint)PREPARE_MASK.PM_ALLFLAGS);

//Here set the cell value

ReplayReportStep("SetCellData", EventStatus.EVENTSTATUS_PASS,new object[]{row, col, value});


Issues Arise During PrepareForReplay Process:

We have implemented the log file and checked if the reported problem occurs from our end. While investigating this issue, we found that the test case did not run because the PrepareForReplay method was continuously running in the Extension assembly implemented by our end.

Note:


Add INS settings:



Automatically export:


Sometimes we can avoid this problem by enabling the settings to automatically export the test results after each test session, as shown below.

Tools -> Options -> General -> Run Sessions -> Report Format, ->select Run Results Viewer Report and enable Automatically export run results when the run session ends.


Html Report:


We are still facing the issue when using the Html Report options as shown in the image below.

Can you please check this and provide a fix or suggest a solution to overcome this issue?

Regards,
Gokul S