Difference between revisions of "Creating a command to use a GeneXus Procedure"

From GXtest Wiki
Jump to: navigation, search
m (Reverted edits by Amyjumyhawu (Talk) to last version by Ftoledo)
Line 1: Line 1:
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://ocavyle.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 
----
 
=[http://ocavyle.co.cc CLICK HERE]=
 
----
 
</div>
 
 
[[Category: GXtest Guides]]
 
[[Category: GXtest Guides]]
  
Line 21: Line 13:
  
 
'''Rules'''
 
'''Rules'''
  Parm(in:&amp;NumA, in:&amp;NumB,
+
  Parm(in:&NumA, in:&NumB,
       out:&amp;ResultSum,out:&amp;OtherVariable);
+
       out:&ResultSum,out:&OtherVariable);
  
 
In the example there are two outputs, the result of the addition and another value, which are included only to show that it is possible to manage several output parameters at the GXtest level.  
 
In the example there are two outputs, the result of the addition and another value, which are included only to show that it is possible to manage several output parameters at the GXtest level.  
  
 
'''Source'''
 
'''Source'''
  &amp;ResultSum = &amp;NumA+&amp;NumB
+
  &ResultSum = &NumA+&NumB
  &amp;OtherVariable = 4
+
  &OtherVariable = 4
  
 
'''Propiedades'''
 
'''Propiedades'''

Revision as of 18:55, 24 November 2010


Using a GeneXus Procedure from within a GXtest Test Case makes it possible to enter validation at the data level (implementing GeneXus logic to verify the expected state of a database) or to run whatever kind of action or calculation with GeneXus programs. They can have any number of input and output parameters.

Contents

Creating a GX Proc

First you’ll see how to create a GX Proc in GeneXus so that it is exposed as a Web Service and then how to load it into GXtest.

Defining a Procedure as a GeneXus Web Service

Here is an example of how to create an addition procedure. This can be used to have GXtest add together two numbers in a Test Case.

Definition of the procedure:

Rules

Parm(in:&NumA, in:&NumB,
     out:&ResultSum,out:&OtherVariable);

In the example there are two outputs, the result of the addition and another value, which are included only to show that it is possible to manage several output parameters at the GXtest level.

Source

&ResultSum = &NumA+&NumB
&OtherVariable = 4

Propiedades

  • Call Protocol: SOAP
  • Main Program: True

Loading the Procedure into GXtest

Open the menu to create the GX Proc.

AccesoProcGX.jpg

Then click on Add GX Proc that will bring up a window where you can load the GeneXus Procedure:

DefinirProcGX.jpg

Here you can enter the URL to the GeneXus Procedure’s WSDL and click BotonRefresh.jpg.

Once done it will have loaded the procedure's definition and you can see then name and the input and output parameters for the procedure. In the addition example you can see in the following image how the parameters are displayed.

ProcSuma.jpg

Here you can edit the name that will refer to the command, the description and whether you will use Action or Validation.

Using a GX Proc

Once you have created the GX Proc it is ready to be used by GXtest the same way as any other native command, allowing you to add it and edit it manually.

UsarProgGX.jpg

Note that you can load the output parameters into variables and the input parameters can be come from a variable, fixed values and Data Pools.