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

From GXtest Wiki
Jump to: navigation, search
(Página nueva: Categoría: Guías de GXtest En este ejemplo se verá como se puede [[Manual de Usuario de GXtest Designer#Actualizar la KB: Impactar los cambios de la KB en los casos de prueba ...)
 
 
(18 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]]
  
En este ejemplo se verá como se puede [[Manual de Usuario de GXtest Designer#Actualizar la KB: Impactar los cambios de la KB en los casos de prueba | Actualizar la KB: Impactar los cambios de la KB en los casos de prueba]] con un ejemplo concreto.
+
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.  
  
== Archivos necesarios para seguir el ejemplo ==
+
== Needed files to follow this example ==
 +
To complete the following guide you will need to download the following file:
  
Para realizar completamente el presente ejemplo se deben bajar los siguientes archivos:
+
[[Media:UpdateAjaxSample.rar‎ |UpdateAjaxSample.rar‎]]: Compressed .rar file with:
* [[Media:AjaxSampleCompleta.xpz |AjaxSampleCompleta]]: archivo con la versión inicial de la KB de AjaxSample
+
* [[Media:AjaxSampleCompleta_modificada.xpz |AjaxSampleCompleta Modificada]]: archivo con la versión modificada (algunos cambios que podrían haber intoducido los desarrolladores) de la KB de AjaxSample
+
* [[Media: Casos de prueba de Ejemplo.zip| Caso de pruebas de ejemplo]]: es un archivo comprimido zip que contiene dentro el caso de prueba Clientes y el caso de prueba Facturas
+
  
Una vez descargados dichos archivos se puede empezar a seguir el ejemplo.
+
* 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
  
== Análisis de impacto (actualización de la KB) paso a paso ==
+
== Impact analysis (updating a KB) step by step ==
  
=== Paso 1: carga inicial===
+
=== 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]].
  
Primero se debe crear un proyecto nuevo al cual se le debe asociar la KB AjaxSampleCompleta.xpz. Por más ayuda sobre como realizar esto ver [[Empezando con GXtest]]. <br>
+
Then import the project (file AjaxSample.zip).
Luego importar los casos de prueba de facturas y clientes. Por más detalle ver [[Exportar e Importar un TestCase]].<br>
+
  
 +
=== 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
  
=== Paso 2: modificar la KB ===
+
The changes made in the AjaxSampleComplete_modified.xpz KB are the following:  
El objetivo de este articulo es justamente ver como impactan los cambios en el desarrollo en los casos de prueba. Para ver esto se debe cambiar la KB con la cual GXtest está trabajando. Con este fin es que suministra el archivo AjaxSampleCompleta_modificada.xpz, el cual contiene la misma KB pero con algunos cambios. Para que GXtest consulte la nueva kb se deben realizar los siguientes pasos:<br>
+
* A renamed object (Client is now SuperClient)
* borrar el archivo AjaxSampleCompleta.xpz
+
* A renamed control (confirmation > enter)
* renombrar el archivo AjaxSampleCompleta_modificada.xpz a AjaxSampleCompleta.xpz
+
* A renamed attribute (ClientFirstName -> ClientName)
  
Los cambios realizados en la KB AjaxSampleCompleta_modificada.xpz se describen a continuación:
+
Note: This changes will also change objects generated by Work With Pattern.
* Un Objeto nuevo: ObjNuevo
+
* Un objeto renombrado que se usaba en un caso de prueba (Home->SuperHome). Al usarse en un caso de prueba se genera un conflicto a resolver.
+
* Un objeto renombrado que no se usaba en ningún caso de prueba (Product->SuperProduct). Al no utilizarse no se genera ningún conflicto.
+
* Un control nuevo en un objeto que no se usaba en un caso de prueba (City, TextBox:Hola)
+
* Dentro del objeto Invoice usado en un caso de prueba se realizan los siguientes cambios:
+
** Un control nuevo: TextBox:Holassss
+
** Un control en uso que se "renombro" pero que sigue con el mismo caption asociado (btn_enter->Superbtn_enter)
+
** Un control en uso que se "renombro" pero que sigue siendo del mismo tipo (Grid1->SuperGrid1)
+
** Un boton en uso que se "renombro" y se cambio el caption pero que sigue apuntando al mismo evento (Se borró el botón Cancel, se agregó el botón Button1 que apunto a el evento Cancel)   
+
** Un control en uso que simplemente se quito (InvoiceLineQty)
+
  
=== Paso 3: hacer Refresh! ===
+
=== Step 3: Update KB Information ===
Bien ahora estamos listos para realizar el impacto, para esto debemos ir a KB->Refresh
+
Now you are ready to perform the impact, to do so go to Knowledge Base->Update KB Information
  
==== Selección de la KB ====
+
==== Pre Impact ====
Esto nos abrirá la siguiente ventana para seleccionar la KB sobre la cual se realizará el impacto
+
[[Image:ImpactKB Paso1.png]]
[[Imagen:ImpactKB_Paso1.jpg]]
+
  
Luego de seleccionar la KB se debe presionar el botón Next.
+
In this screen, we will see:<BR>
 +
* Knowledge Base's changes
 +
* Test Case's changes
  
==== Lista de objetos a eliminar ====
+
==== Knowledge Base ====
[[Imagen:ImpactKB_Paso2.jpg]]
+
We'll see: <BR>
 +
* New Objects
 +
* Modified Objects
 +
* Deleted Objects
  
En esta pantalla se muestra el objeto Product que se va a eliminar porque no se encuentra en la KB actual (el mismo fue renombrado por SuperProduct). Este objeto se puede eliminar sin problemas porque no está siendo utilizado en ningún caso de prueba. Si la KB sobre la cual estamos trabajando es de GeneXus X, entonces automáticamente GXtest se da cuenta cuales objetos fueron renombrados.
+
You can see a detailed list, by clicking "See details" link. <br>
Para continuar presionar Next.
+
This changes will be committed when "Update" button is pressed, but you should check what issues (if any) will appear in the test cases.
  
==== Impacto a nivel de los objetos ====
+
==== Issues ====
[[Imagen: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 object used in a test case), then, a red issue will appear.<BR>
En esta pantalla se muestran los conflictos a nivel macro, ya que solo se pueden ver aquellos conflictos en los objetos y no en el contenido de los mismos. Las secciones que se pueden ver son las siguientes:
+
You can resolve this kind of issues later.<BR>
* ''Objetos con conflictos'': contiene la lista de objetos que son utilizados en algún caso de prueba pero no se encuentran en la nueva KB. En este caso se muestra el objeto Home, ya que el mismo fue renombrado y se estaba utilizando en los casos de prueba.
+
* ''Objetos sugeridos'': cuando se selecciona una objeto en conflicto se sugiere en caso de ser posible otros objetos para sustituir el mismo.
+
* ''Conflictos resueltos'': cuando se indica que un objeto en conflicto se corresponde con un nuevo objeto, el objeto en conflicto se va de la lista de Objetos con conflictos y pasa a la lista Conflictos resueltos, a su vez el objeto disponible sale de la lista de objetos disponibles.
+
* ''Objetos disponibles'': muestra la lista actual de objetos disponibles (objetos nuevos que no se ha indicado que se correspondan con algún objeto en conflicto). En este caso inicialmente muestra tres objetos: ObjNuevo, SuperHome y SuperProduct
+
 
+
Lo que se debe hacer en esta pantalla es indicar que el objeto Home ahora se llama SuperHome. Para esto se debe seleccionar (con un clic) el objeto Home y luego seleccionar el objeto SuperHome y presionar el botón Resolved.
+
 
+
 
+
Para indicar que un objeto en conflicto se corresponde con un objeto disponible, marcar el objeto en conflicto y luego marcar el objeto disponible o sugerido. Luego presionar el botón Resolved.
+
  
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
|-
 
|-
! style="background:#efefef;" | Es importante tener en cuenta si se está utilizando GeneXus X o superior automáticamente se detectan cuales objetos fueron renombrados y no es necesario que el usuario lo indique.
+
! 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.
  
 +
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.
  
Luego presionar  Next.
+
This will generate a warning (yellow issue). <BR>
 
+
==== Impacto a nivel de los Controles ====
+
[[Imagen:ImpactKB_Paso4.jpg]]
+
  
En esta pantalla se van a poder recorrer los distintos objetos que han sido afectados con los cambios. Si se observa en la parte superior se puede navegar por los mismos.
+
=== Resolving Issues ===
  
Para cada objeto se tiene un esquema similar al de la pantalla anterior en donde se puede indicar que controles han sido renombrados, o sustituidos por otros.
+
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.
  
En este caso en particular el único objeto con conflictos es el objeto Invoice. En el mismo podemos ver que tenemos los siguientes controles en conflicto:
+
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
+
  
Al hacer clic arriba de btn_cancel, Grid1 y btn_enter se sugiere adecuadamente cuales son los controles por los cuales se debería sustituir. Esas sugerencias son en base a heurísticas.
 
Presionar Resolve para cada una de las sugerencias y luego presionar Next.
 
  
==== Reporte ====
 
[[Imagen:ImpactKB_Paso5.jpg]]
 
  
Por último se muestra un reporte donde se visualiza el resultado de la actualización realiada
+
== 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