Difference between revisions of "Impact on Test Cases when the GX KB changes"

From GXtest Wiki
Jump to: navigation, search
Line 4: Line 4:
  
 
== Files necessary to follow this example ==
 
== Files necessary to follow this example ==
To complete the following guide you need to download the following files:  
+
To complete the following guide you need to download the following file:  
* [[Media:AjaxSampleCompleta.xpz |AjaxSampleCompleta]]: This file contains the first version of the AjaxSample KB
+
 
* [[Media:AjaxSampleCompleta_modificada.xpz |AjaxSampleComplete Modified]]: this file contains a modified version (changes that could have been made by developers) of the AjaxSample KB
+
[[Media:UpdateAjaxSample.rar‎ |UpdateAjaxSample.rar‎]]: Compressed .rar file with:
* [[Media: Casos de prueba de Ejemplo.zip|Test Cases for the tutorial]]: this is a ZIP archive that contains the Clients Test Case and the Invoices Test Case.
+
 
 +
* 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.  
 
Once these files are downloaded you can begin the tutorial.  
Line 13: Line 16:
 
== Impact analysis (updating a KB) step by step ==
 
== Impact analysis (updating a KB) step by step ==
  
=== Step 1: Loading ===
+
=== Step 1: Create the project ===
First you need to create a new project that needs to be associated with the AjaxSampleComplete.xpz KB. For more help on doing this see [[Starting out with GXtest]].  
+
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 Clients and Invoices Test Cases. For more details see [[Exporting and Importing a Test Case]].
+
Then import the project (file AjaxSample.zip).
  
=== Step 2: Updating a KB ===
+
=== 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 substitute the AjaxSampleComplete_modified.xpz which is the same as the first file but with a few changes. To get GXtest to use the new KB you must perform the following steps:
+
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:
* delete AjaxSampleComplete.xpz
+
* Knowledge Base -> Edit Properties
* rename AjaxSampleComplete_modified.xpz  to AjaxSampleComplete.xpz
+
* Change the path to NewAjaxSample.gxt
  
 
The changes made in the AjaxSampleComplete_modified.xpz KB are the following:  
 
The changes made in the AjaxSampleComplete_modified.xpz KB are the following:  
* A new object: ObjNew
+
* A renamed object (Client is now SuperClient)
* A renamed object that is used in a test case (Home > SuperHome). Upon using it in the Test Case it will create a conflict that has to be resolved.
+
* A renamed control (confirmar > enter)
* A renamed object that is not used in a test case (Product > SuperProduct). Since it is not used, it will not create a conflict.
+
* A renamed attribute (ClientFirstName -> ClientName)
* A new control for an object that is not used in a test case (City, TextBoxHello)
+
* In the Invoice object used in the Test Case the following changes have been made:
+
** A new control: TextBox:Hellooooo
+
** A renamed control that continues to have the same caption associated with it (btn_enter > Superbtn_enter)
+
** A renamed control that continues to be the same type (Grid 1 > SuperGrid1)
+
** A renamed button used in the Test Case in which the caption was changed but it continues to point to the same event (The Cancel button is deleted, and Button1 has been added that points to the Cancel event)
+
** A control that was used but now has been deleted (InvoiceLineQty)
+
  
=== Step 3: Refreshing ===
+
Note: This changes will also change objects generated by Work With Pattern.
Now you are ready to perform the impact, to do so go to KB > Refresh
+
  
==== Choosing a KB ====
+
=== Step 3: Update KB Information ===
This opens a window where you can choose the KB that is to be impacted.
+
Now you are ready to perform the impact, to do so go to KB > Update KB Information
  
[[Image:ImpactKB_Paso1.jpg]]
+
==== Pre Impact ====
 +
[[Image:ImpactKB Paso1.png]]
  
After you choose the KB press the Next button.
+
In this screen, we will see:<BR>
 +
* Knowledge Base's changes
 +
* Test Case's changes
  
==== List of objects to be deleted ====
+
==== Knowleadge Base ====
[[Image:ImpactKB_Paso2.jpg]]
+
We'll see: <BR>
 +
* New Objects
 +
* Modified Objects
 +
* Deleted Objects
  
This window displays the objects that are to be deleted because the aren't found in the current KB (it was renamed to SuperProduct). These objects can be deleted without problems because they are not being used in any Test Case. If the KB you are working with is from GeneXus X, GXtest will automatically recognize that it was renamed. To continue click Next.  
+
You can see a detailed list, by clicking "Show details" link. <br>
 +
This changes will be committed when "Update" button is pressed.
  
==== Object Level Impact ====
+
==== Conflicts ====
[[Image:ImpactKB_Paso3.jpg]]
+
When developers rename objects or controls, the test cases need to be updated.<BR>
 
+
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.<BR>
This screen shows the macro level conflicts, however you can only see the conflicts in the objects and not in the content itself. The following sections can be seen:
+
You can resolve this kind of conflicts later<BR>
* Conflicted Objects: this is a list of objects that are used in a test case but that cannot be found in the new KB. The Home object is shown first because it was renamed and it is being used in the Test Case.  
+
* Suggested Objects: when you select a conflicted object it will suggest a list of possible objects to be substituted.
+
* Resolved conflicts: when you match an object with a conflict with a new object the conflicted object will be removed form the list of Conflicted Objects and will move to the Resolved conflicts list as well the available object will be removed from the list of available objects.  
+
* Available objects: Displays a list of the available objects (new objects that have not been matched with a conflicted object). In this case three objects are displayed: ObjNuevo, SuperHome and SuperProduct
+
 
+
You must now tell GXtest that the Home object is now called SuperHome. To do so click on the Home object and then on the SuperHome object and click Resolved.
+
 
+
To match up an object with a conflict to an available object, select the conflicted object from the list and then an available or suggested object from the list. Then click Resolved.
+
  
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
|-
 
|-
! style="background:#efefef;" | It’s important to keep in mind that if you are using GeneXus X or higher GXtest will automatically detect which objects have been renamed and it isn’t necessary for you to do so.  
+
! style="background:#efefef;" | 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
  
To continue click Next.
+
Another kind of conflicts, is when GXtest is not 100% sure about a change, and warning you to see detailed issue.
 
+
e.g.<BR>
==== Control Level Impact ====
+
* Control BUTTON_1 is used but is no longer available (deleted), but, control BUTTON_2 is new and is handling the same event.
[[Image:ImpactKB_Paso4.jpg]]
+
 
+
This windows displays the objects that have been affected by the changes made. At the top of the window it is possible to navigate through the different objects using the arrow buttons.
+
 
+
Each object has a similar layout to the previous window where you can choose which controls have been renamed or substituted for others.  
+
 
+
In the case in particular the only conflicted object is the Invoice object. In the same object you can see that there are the following conflicted controls:
+
* InvoiceLineQty
+
* btn_cancel
+
* Grid1
+
* btn_enter
+
  
Upon clicking on btn_cancel, Grid1 and btn_enter a suggestion is made for an appropriate substitution. Click Resolve for each of the suggestions and then click Next.  
+
This will generate a warning (yellow conflict). <BR>
  
==== Report ====
+
To know more about resolving conflicts, you may see: [[Resolving Conflicts | Resolving Conflicts]]
[[Image:ImpactKB_Paso5.jpg]]
+
  
Lastly the report screen displays the results of the changes made.
+
== See too ==
 +
[[GXtest Manager Tutorial]]

Revision as of 16:19, 27 January 2011

Categoría: GXtest Guides

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

See too

GXtest Manager Tutorial