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

From GXtest Wiki
Jump to: navigation, search
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Categoría: Guías de GXtest]]
+
{{Idiomas| Como impactar los casos de prueba cuando cambia la KB GX| Impact on Test Cases when the GX KB changes | GeneXus の KB の変更がテストケースに及ぼす影響の分析}}
 +
[[Category: GXtest Guides]]
  
In this tutorial you will see how to [[GXtest_Designer_User_Manual#Updating_a_KB:_Impacting_the_KB.E2.80.99s_change_on_Test_Cases | Update a KB: Impacting the KB’s changes in Test Cases]] in a concrete example.  
+
In this tutorial you will see how to [[GXtest_and_the_GeneXus_KB#Updating_your_KB:_Impacting_the_KB.E2.80.99s_change_on_Test_Cases | Update a KB: Impacting the KB’s changes in Test Cases]] in a concrete example.  
  
== Files necessary to follow this example ==
+
== Needed files to follow this example ==
To complete the following guide you need to download the following files:
+
To complete the following guide you will 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: 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.
+
  
Once these files are downloaded you can begin the tutorial.  
+
[[Media:UpdateAjaxSample.rar‎ |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
  
 
== 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 the KB path ===
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 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 (confirmation > 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 ===
+
Now you are ready to perform the impact, to do so go to KB > Refresh
+
 
+
==== Choosing a KB ====
+
This opens a window where you can choose the KB that is to be impacted.
+
 
+
[[Imagen:ImpactKB_Paso1.jpg]]
+
  
After you choose the KB press the Next button.
+
Note: This changes will also change objects generated by Work With Pattern.
  
==== List of objects to be deleted ====
+
=== Step 3: Update KB Information ===
[[Imagen:ImpactKB_Paso2.jpg]]
+
Now you are ready to perform the impact, to do so go to Knowledge Base->Update KB Information
  
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.  
+
==== Pre Impact ====
 +
[[Image:ImpactKB Paso1.png]]
  
==== Object Level Impact ====
+
In this screen, we will see:<BR>
[[Imagen:ImpactKB_Paso3.jpg]]
+
* Knowledge Base's changes
 +
* Test Case's changes
  
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:  
+
==== Knowledge Base ====
* 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.
+
We'll see: <BR>
* Suggested Objects: when you select a conflicted object it will suggest a list of possible objects to be substituted.
+
* New Objects  
* 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.
+
* Modified 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
+
* Deleted Objects
  
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.  
+
You can see a detailed list, by clicking "See details" link. <br>
 +
This changes will be committed when "Update" button is pressed, but you should check what issues (if any) will appear in the test cases.
  
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.  
+
==== Issues ====
 +
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 object used in a test case), then, a red issue will appear.<BR>
 +
You can resolve this kind of issues later.<BR>
  
 
{| 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, impacting in that way all the test cases.
  
To continue click Next.  
+
Another kind of issues, is when GXtest is not 100% sure about a change, and warns you to see detailed issue.
 +
e.g.<BR>
 +
* Control BUTTON_1 is used but is no longer available (deleted), but, control BUTTON_2 is new and is handling the same event.
  
==== Control Level Impact ====
+
This will generate a warning (yellow issue). <BR>
[[Imagen: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. 
+
=== Resolving Issues ===
  
Each object has a similar layout to the previous window where you can choose which controls have been renamed or substituted for others.  
+
After applying the changes in the KB the test cases will be in one of those three states
 +
* Ready: there is no issue to verify
 +
* Pending Review: automatically changes were made and they should be verified
 +
* Disabled: the test refers to an object that does not exist or something similar, which makes it impossible to run.
  
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:
+
Changes in the KB can make the test case disabled until a user manually corrects missing references. This can happen if you delete an object used in a test, perhaps by changes in requirements, etc..
* 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.
 
  
==== Report ====
 
[[Imagen:ImpactKB_Paso5.jpg]]
 
  
Lastly the report screen displays the results of the changes made.
+
== See also ==
 +
[[GXtest Manager Tutorial]]

Latest revision as of 04:42, 21 February 2014

Spanish.gif
English.gif
Japan.gif

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

Contents

Needed files to follow this example

To complete the following guide you will 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

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 the KB path

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 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 (confirmation > 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 Knowledge Base->Update KB Information

Pre Impact

ImpactKB Paso1.png

In this screen, we will see:

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

Knowledge Base

We'll see:

  • New Objects
  • Modified Objects
  • Deleted Objects

You can see a detailed list, by clicking "See details" link.
This changes will be committed when "Update" button is pressed, but you should check what issues (if any) will appear in the test cases.

Issues

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 object used in a test case), then, a red issue will appear.
You can resolve this kind of issues 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, impacting in that way all the test cases.

Another kind of issues, is when GXtest is not 100% sure about a change, and warns 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 issue).

Resolving Issues

After applying the changes in the KB the test cases will be in one of those three states

  • Ready: there is no issue to verify
  • Pending Review: automatically changes were made and they should be verified
  • Disabled: the test refers to an object that does not exist or something similar, which makes it impossible to run.

Changes in the KB can make the test case disabled until a user manually corrects missing references. This can happen if you delete an object used in a test, perhaps by changes in requirements, etc..


See also

GXtest Manager Tutorial