A method for generating a test framework, from a reference graphical user interface application, to test a target application that replicates functionality of the reference GAP or includes functionality migrated from the reference GAP, the method comprising: determining a GAP utilization ratio for the reference GAP, the GAP utilization ratio providing a suitability measure for GAP GUI elements for use as test data elements for testing the TAP; performing a comparison of the GAP utilization ratio to a suitability threshold; indicating that the reference GAP is suitable for building a test framework based on the comparison; interacting with the reference GAP through an accessibility layer supporting a hook for performing actions on the reference GAP, wherein the hook is suitable for monitoring the reference GAP and UI elements of the reference GAP for event and state changes; capturing a structural representation of a reference GAP graphical user interface screen including a GUI element, and a GAP state of the reference GAP by interacting with the reference GAP, wherein the structural representation comprises one or more of: a label, identifier and location of a UI element, and a GAP GUI screen sequence; establishing a GAP state definition that defines the GAP state, comprising: a function type for the GUI element; an element property for the GUI element; and an element value for the GUI element; establishing a test framework for testing the TAP, the test framework comprising: a test case specifying an interaction with the reference GAP through the accessibility layer based on the structural representation; and a test data element comprising an input parameter for the interaction of the test case with the reference GAP. determining a GAP utilization ratio for the reference GAP, the GAP utilization ratio providing a suitability measure for GAP GUI elements for use as test data elements for testing the TAP; performing a comparison of the GAP utilization ratio to a suitability threshold; indicating that the reference GAP is suitable for building a test framework based on the comparison; interacting with the reference GAP through an accessibility layer supporting a hook for performing actions on the reference GAP, wherein the hook is suitable for monitoring the reference GAP and UI elements of the reference GAP for event and state changes; capturing a structural representation of a reference GAP graphical user interface screen including a GUI element, and a GAP state of the reference GAP by interacting with the reference GAP, wherein the structural representation comprises one or more of: a label, identifier and location of a UI element, and a GAP GUI screen sequence; establishing a GAP state definition that defines the GAP state, comprising: a function type for the GUI element; an element property for the GUI element; and an element value for the GUI element; a function type for the GUI element; an element property for the GUI element; and an element value for the GUI element; establishing a test framework for testing the TAP, the test framework comprising: a test case specifying an interaction with the reference GAP through the accessibility layer based on the structural representation; and a test data element comprising an input parameter for the interaction of the test case with the reference GAP. a test case specifying an interaction with the reference GAP through the accessibility layer based on the structural representation; and a test data element comprising an input parameter for the interaction of the test case with the reference GAP.