Impact on Test Cases when the GX KB changes

From GXtest Wiki
Revision as of 17:37, 27 January 2011 by Ftoledo (Talk | contribs)

Jump to: navigation, search


In this tutorial you will see how to Update a KB: Impacting the KB’s changes in Test Cases in a concrete example.

Contents

Files necessary to follow this example

To complete the following guide you need to download the following file:

UpdateAjaxSample.rar‎: Compressed .rar file with:

  • AjaxSample.gxt: This file contains the first version of the AjaxSample KB
  • NewAjaxSample.gxt: this file contains a modified version (changes that could have been made by developers) of the AjaxSample KB
  • AjaxSample.zip: It's a project with 3 test cases

Once these files are downloaded you can begin the tutorial.

Impact analysis (updating a KB) step by step

Step 1: Create the project

First you need to create a new project that needs to be associated with the AjaxSample.gxt file. For more help on doing this see Starting out with GXtest.

Then import the project (file AjaxSample.zip).

Step 2: Change KB path (or overwrite the oldest file)

The purpose of the article is to see how changes during development impact Test Cases. In order to see these changes you must change the KB that GXtest is working with. To do this you can change the KB Path to NewAjaxSample.gxt, which is the same as the first file but with a few changes. To get GXtest to use the new KB you must go to:

  • Knowledge Base -> Edit Properties
  • Change the path to NewAjaxSample.gxt

The changes made in the AjaxSampleComplete_modified.xpz KB are the following:

  • A renamed object (Client is now SuperClient)
  • A renamed control (confirmar > enter)
  • A renamed attribute (ClientFirstName -> ClientName)

Note: This changes will also change objects generated by Work With Pattern.

Step 3: Update KB Information

Now you are ready to perform the impact, to do so go to KB > Update KB Information

Pre Impact

ImpactKB Paso1.png

In this screen, we will see:

  • Knowledge Base's changes
  • Test Case's changes

Knowleadge Base

We'll see:

  • New Objects
  • Modified Objects
  • Deleted Objects

You can see a detailed list, by clicking "Show details" link.
This changes will be committed when "Update" button is pressed.

Conflicts

When developers rename objects or controls, the test cases need to be updated.
Many times, it's impossible to update a test case (think what happen if you delete an used object), then, a red conflict will appear.
You can resolve this kind of conflicts later

It’s important to keep in mind that if you are using GeneXus X or higher GXtest will automatically detect which objects and controls have been renamed and it isn’t necessary for you to do so.

In general, GXtest updates every change automatically

Another kind of conflicts, is when GXtest is not 100% sure about a change, and warning you to see detailed issue. e.g.

  • Control BUTTON_1 is used but is no longer available (deleted), but, control BUTTON_2 is new and is handling the same event.

This will generate a warning (yellow conflict).

To know more about resolving conflicts, you may see: Resolving Conflicts