Hidden Gems with looksoftware - The Test Recorder

Posted by Vas Mintzikos on Nov 14, 2013 8:25:13 PM


Test_recorderIt's all about powerful functionality on your IBM i. Discover the strengths...

As a developer you will often be faced with a situation where you may not recall the reason why a particular host form override was created, or why a filter was added that searched for “ABC” and changed it to “XYZ”. This is most true when a project had been completed many months or years ago and you have a bad memory like me, but it even applies to those situations where you may not have been the original developer.

In a recent Hidden Gems blog post we discussed Change History Management and how that can be used to keep track of changes. This can go a long way to helping explain why a particular customization was added, but what if we hadn’t turned on this feature or what if we are dealing with filters that don’t allow for comments?

One of the many strengths of the looksoftware development tools, is the ability to add generic rules in the form of filters, subfile markers and even generic host form overrides, that can cater from just a couple to over hundreds of screens. Such powerful functionality also comes with associated risks as making changes to a filter, or a generic override within a mature solution, could run the risk of producing unwanted changes to screens you did not anticipate.

So how do you mitigate those risks and minimize or even eliminate manual user testing?

This is where the looksoftware Test Recorder and playback tool comes in.


So what is the Test Recorder/Player?

The looksoftware Test Recorder tool allows you to easily record navigation through your host application to create a snapshot of the application’s current state with the customization you have in place. This recording captures each screen as a unique offline file (NL) and for each of those screens it also stores an XML file that contains detailed characteristics of every field on the screen.

The Test Player allows you easily replay the test completely offline against the same screens as originally recorded and will report back any screens that have changed from the original recording.

The beauty of the Test Recorder/Player is that it very quickly allows you to examine the effect that a change made to your solution has had on the screens within your application.


So how would you use the Test Recorder/Player?

Unlike most tools in the refacing market, newlook and soarchitect do not require you to touch every screen in your application in order to modernize it so, for example, very often you can have a very compact solution consisting of 10 filters and 10 generic host form customization catering for a 200+ screen host application.

One of the most common concerns with filters is not knowing all of the screens where the filter applies. Since the solution doesn’t need to store a capture (scrape) of every host application screen it isn’t immediately obvious to a developer what screens a filter applies to and that’s where the Test Recorder and player comes in.

You simply record a snapshot of your application before making the filter change, then modify, remove or even add a new filter and then playback your test. The Test Player will highlight every screen that has been affected by that filter change and then you can open that screen directly offline (or navigate to the live version if you prefer) and determine if the change was expected or not.

Similarly the same process can be applied with generic host form overrides.


Launching the Test Recorder

The Test Recorder can be launched from the IDE runtime as shown in Figure 1.



Figure 1 : Launching the Test Recorder


Once the Test Recorder has been launched you’ll see s simple dialog shown in Figure 2. At this point you can connect to your host application within the IDE runtime window and click on the record button in the Test Recorder to begin recording.



Figure 2 : The Test Recorder


Every screen you navigate to will be captured and stored under my documents\looksoftware\tests. You may choose to navigate your whole application as a single test or, if you prefer, you can break the tests down into smaller components that reflect different parts of your application.


Playing back the recorded tests

Once you have recorded your tests they can be accessed from within the IDE by selecting the Tests icon within the developer bar as shown in Figure 3.


Figure 3 : Accessing the recorded tests


From the tests tab you can select the appropriate recorded test and then click on the ‘Run Test’ button to execute the test.



Figure 4 : Running a recorded test


Once the test is run a new window will appear showing the results (refer to Figure 5). Note that in the example all tests have been successful.



Figure 5 : Test Player window


At this point let’s assume we decide to make a change to our solution and test the impact of that change. We’ll create a new filter that searches for ‘User’ and changes that to ‘Username’. The filter itself has no range restrictions so will search to the ‘User’ text in all possible locations of the screen.

After making the change we re-run the test and note that several screens are marked as failed/changed (refer to Figure 6). We can double click on each failed step to obtain a summary of what has changed.

When we originally created the filter we expected that the SignOn screen would be the only one affected but clearly more screens are impacted than anticipated which now allows us to go back and review the change and make the necessary adjustments.

Similarly if we had chosen to remove or change an existing filter, host form override, macro/script or even modify a recognition category, the Test Player will show us the affected screens.



Figure 6 : Test Player window after testing a change



The Test Recorder and player provider a powerful method for testing the impact of change to an existing solution.

If you have any questions on using the Test Recorder and Player, or even suggestions for improvement, please be sure to contact the looksoftware support team at support@looksoftware.com or post a question to the looksoftware community forums here : http://www.looksoftware.com/customer-area/forum.aspx

(You will be required to login, so please have your username and password handy.)

Vas Mintzikos
Vas Mintzikos
Support Manager, looksoftware


Topics: Application Modernization, looksoftware