This shows you the differences between two versions of the page.
host_adaptor_3270 [2021/01/15 07:47] montse [Connection] |
host_adaptor_3270 [2024/12/10 13:23] (current) montse [Predefined functions] |
||
---|---|---|---|
Line 5: | Line 5: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | This adapter is used to run tests on the Host Adaptor 3270. This Adaptor is currently under construction, so its information is not yet complete.. Therefore, the information will be updated as the development progresses. | + | This adapter is used to run tests on the 3270 Host Adapter. This adapter allows us on the one hand to run tests on HOST mainframe screens and also to generate macros that allow us to automate tests on "transformed to HTML" systems. |
===== Configuration ===== | ===== Configuration ===== | ||
Line 12: | Line 11: | ||
- | ===== Initialization Parameters ===== | + | ===== Initialization parameters ===== |
====Connection==== | ====Connection==== | ||
- | * **Host:** Name of the machine or IP address. Required. SESSION_HOST | + | * **Host:** name of the machine or IP address. Required. SESSION_HOST. |
- | * **Port:** Connection port. Required.SESSION_HOST_POST. | + | * **Port:** connection port. Required. SESSION_HOST_POST. It is 23 by default. |
- | * **LU_Name:** Name of the connection LU, optional. | + | * **Use proxy:** check this if you want to use a proxy. |
- | * **Enhanced:** Indicates whether the Enhanced protocol is used. (by default is not checked). SESSION_TN_ENHANCED. | + | * **Proxy host:** name of the proxy or IP address. It is localhost by default. |
- | * **Telnet_Negotiated:** The telnet information. | + | * **Proxy port:** port of the proxy. It is 1080 by default. |
- | * **Server_Authentication:** Information of authentication to the 3270 Server. | + | * **LU_Name:** name of the connection LU, optional. |
- | * **Client_Certificate_Autentication:** Certificate for Authentication. | + | * **Enhanced:** indicates whether the Enhanced protocol is used. (by default is not checked). SESSION_TN_ENHANCED. |
- | * **Personal_Certificate:** Personal certificate for Authentication. | + | * **Telnet_Negotiated:** the telnet information. |
- | * **Personal_Certificate_File Path:** Path to the Certificate for Authentication. | + | * **Server_Authentication:** information of authentication to the 3270 Server. |
- | * **Personal_Certificate_pass:** Pass to the Certificate for Authentication. | + | * **Client_Certificate_Autentication:** certificate for Authentication. |
- | * **Certificate_Name:** Name of the Certificate. | + | * **Personal_Certificate:** personal certificate for Authentication. |
- | * **Certificate_Pass:** Pass to the Certificate. | + | * **Personal_Certificate_File Path:** path to the Certificate for Authentication. |
- | * **Certificate_Source:** Source to the Certificate. | + | * **Personal_Certificate_pass:** pass to the Certificate for Authentication. |
- | * **Certificate_URL:** Url to Certificate. | + | * **Certificate_Name:** name of the Certificate. |
- | * **Prompt_Required:** PromptRequired. | + | * **Certificate_Pass:** pass to the Certificate. |
- | * **Certificate_Based_Keys:** Certificate Based Keys. | + | * **Certificate_Source:** source to the Certificate. |
+ | * **Certificate_URL:** url to Certificate. | ||
+ | * **Prompt_Required:** promptRequired. | ||
+ | * **Certificate_Based_Keys:** certificate Based Keys. | ||
* **SSL:** SSL. | * **SSL:** SSL. | ||
- | * **KeyStore_FilePath:** KeyStore File Path. | + | * **KeyStore_FilePath:** keyStore File Path. |
* **P12_FilePath:** P12 File Path. | * **P12_FilePath:** P12 File Path. | ||
- | * **KeyStore_Pass:** KeyStore Pass. | + | * **KeyStore_Pass:** keyStore Pass. |
- | * **Certificate_Trusted:** Certificate for Authentication. | + | * **Certificate_Trusted:** certificate for Authentication. |
- | * **Code_Page:** Code Page. | + | * **Code_Page:** code Page. By default it is INTERNAL – Built-in EBCDIC conversion (CP037). |
- | * **Session_Type:** Session Type. | + | * **Session_Type:** session Type. |
- | * **Security_Type:** Security Type. | + | * **Security_Type:** security Type. |
- | * **Protocol:** Protocol. | + | * **Protocol:** protocol. |
- | * **Protocol_Version:** Protocol Version. | + | * **Protocol_Version:** protocol Version. |
- | * **Certificate_Type:** Certificate Type.\\ \\ **3270 Adapter Connection to execute diagrams in Tast**\\ \\ 3270 – We are going to fill in the necessary parameters of the adapter.\\ \\ **Adapter =** 3270\\ **Session Name =** Name that we want to give.\\ **Host:**\\ - VPS = 127.0.0.1\\ - TAST1 = vipadpre.scger.pre.corp\\ **Port:**\\ - VPS = 3270\\ - TAST1 = 23\\ **TN3270E =** For the 2 environments marked.\\ | + | * **Certificate_Type:** certificate Type.\\ \\ **3270 Adapter Connection to execute diagrams in Tast**\\ \\ 3270 – We are going to fill in the necessary parameters of the adapter.\\ \\ **Adapter =** 3270\\ **Session Name =** Name that we want to give.\\ **Host:**\\ - VPS = 127.0.0.1\\ - TAST1 = vipadpre.scger.pre.corp\\ **Port:**\\ - VPS = 3270\\ - TAST1 = 23\\ **TN3270E =** For the 2 environments marked. It is checked by default.\\ |
- | ===== Predefined Functions ===== | + | ===== Predefined functions ===== |
- | * **connect3270:** Allows you to connect to the 3270. (It is not necessary to create the message, the Adapter executes the connection in its creation). | ||
- | * **containsText(Text):** This function evaluates whether within the host screen, there is a specific text that we define in said function.\\ | + | * **clearAndWriteField**: clears and writes a text in a field in the indicated field. |
- | *Parameter Text: In the message mapping, the text that we want to find is added in the "Value field". | + | * Parameter Field: field number starting with 1 |
+ | * Parameter Offset: offset in the field starting with 1 | ||
+ | * Parameter Value: text. | ||
- | * **disconnect3270:** Allows you to disconnect to the 3270. | + | * **clearField**: clears the field with field number entered in the parameter. |
- | * **nextScreen:** This function directly advances to the next navigation screen (previously you will have had to go through it to find it). It does not require parameters in the encoding. | + | * **containsText(Text):**this function evaluates if within a host screen, there is a specific text that we define in this function.\\ |
+ | *Parameter Text: in the message mapping, the text that we want to find is added in the "Value field". | ||
- | * **play:** Plays the navigation 7 execution into the 3270 Host. It’s necessary to record the navigation previously. | + | * **getLenghField**: gets the length of the field with field number entered in the parameter. |
- | * **previusScreen:** This function directly advances to the previus navigation screen. It does not require parameters in the encoding. | + | * **nextScreen:** this function advances directly to the next navigation screen (you will have previously had to go through it to find it). It requires no parameters in its coding. |
- | * **readField(Field,Offset,Length):** This function reads a field that we define in its parameters.\\ | + | * **previusScreen:** this function advances directly to the previous navigation screen. No coding parameters are required. |
- | *Parameter Field: Position (numeric) in which the field is located. | + | |
- | *Parameter Offset: Position within the field from which you want to read. | + | * **readField(Field,Offset,Length):** this function reads a field that we define in its parameters.\\ |
- | *Parameter Length: Length of the field that we are going to read.\\ These 3 parameters are obtained by pressing the right button of the mouse, on the field that we want to read.\\ | + | *Parameter Field: position (numeric) in which the field is located. |
+ | *Parameter Offset: position within the field from which you want to read. | ||
+ | *Parameter Length: length of the field to be read.\\ \\ These 3 parameters are obtained by clicking the right mouse button, on the field we want to read.\\ | ||
{{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | {{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | ||
- | * **readRow(Row):** This function reads a certain line from the screen. The whole line.\\ | + | * **readRow(Row):** this function reads a particular line on the screen. The whole line.\\ |
- | *Parameter Row: Position (numeric) where the line is located.\\ This parameter is obtained by pressing the right button of the mouse, on the line that we want to read.\\ | + | *Parameter Row: position (numerical) in which the line is located.\\ \\ This parameter is obtained by clicking the right mouse button on the line we want to read.\\ |
{{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | {{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | ||
- | * **readScreen:** This function reads the screen you are positioned on. Function without parameters. | + | * **readScreen:** this function reads the screen on which you are positioned. Function without parameters. |
- | * **rec:** Records the navigation 7 execution into the 3270 Host. | + | * **readScreenByRows**: reads the current screen by rows. |
- | | + | |
- | * **rowContaintsText(Text,Row):** This function checks if there is a certain text in a screen free.\\ | + | * **rowContaintsText(Text,Row):** this function checks if a certain text exists in a screen line.\\ |
- | *Parameter Text: We introduce the text to search. | + | *Parameter Text: enter the text to search for. |
- | *Parameter Row: Position (numeric) of the line.\\ These parameters are obtained by pressing the right button of the mouse, on the line that we want to find the defined text.\\ | + | *Parameter Row: position (numeric) of the line.\\ \\ These parameters are obtained by pressing the right mouse button, on the line we want to find the defined text.\\ |
{{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | {{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | ||
- | * **waitCRC(screen_CRC):** This function waits for the screen we want to see next to appear.\\ | + | * **waitCRC(screen_CRC):** this function waits for the screen we want to see next.\\ |
- | *Parameter screen_CRC: Value -> It is obtained by pressing the right mouse button on the screen that we want to show.\\ | + | *Parameter screen_CRC: value -> Obtained by right-clicking on the screen we want to display.\\ |
{{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | {{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | ||
- | * **waitForChange(TimeOut(msec)):** This function waits for the next screen to be displayed. | + | * **waitFor**: wait for the time in seconds received in the parameter to elapse. |
- | *Parameter TimeOut (msec): Value -> Time in msec to wait to be displayed. | + | |
- | * **waitForText(Text, Row, Column):** This function waits for a certain text to appear before displaying the next screen.\\ | + | * **waitForChange(TimeOut(msec)):** this function waits for time for the next screen to be displayed. |
- | * Parameter Text: Value-> Text that should appear | + | *Parameter TimeOut (msec): value -> Time in msec to wait to be displayed. |
- | * Parameter Row: Word line | + | |
- | * Parameter Column: Column of the word | + | |
- | * **writeAftherLabel (Label,Text):** This function writes any text to the screen, after the label that we have defined in the Label parameter has been shown (on the screen).\\ | + | * **waitForText(Text,Row,Column):** This function waits for a certain text to appear before displaying the following screen.\\ |
- | *Parameter Label: Value-> Text to appear. | + | *Parameter Text: value-> Text to be displayed. |
- | *Parameter Text: Text that we are going to write. | + | *Parameter Row: row of the word. |
+ | *Parameter Column: column of the word. | ||
- | * **writeBeforeLabel (Label,Text):** This function writes any text to the screen before the label that we have defined in the Label parameter has been shown (on the screen).\\ | + | * **writeAftherLabel (Label,Text):** this function writes to the screen any text, after the label we have defined in the Label parameter has been displayed (on the screen).\\ |
- | *Parameter Label: Value-> Text to appear. | + | *Parameter Label: value-> Text to be displayed. |
- | *Parameter Text: Text that we are going to write. | + | *Parameter Text: text that we are going to write. |
+ | |||
+ | * **writeBeforeLabel (Label,Text):** this function writes to the screen any text, before the label we have defined in the Label parameter has been displayed (on the screen).\\ | ||
+ | *Parameter Label: value-> Text to be displayed. | ||
+ | *Parameter Text: text that we are going to write. | ||
+ | |||
+ | * **writeField (Text,Field,Offset):** this function writes to a given field the value we defined in the Text parameter.\\ | ||
+ | *Parameter Text: value-> Text to appear. | ||
+ | *Parameter Field: field to be written. | ||
+ | *Parameter Offset: position of the field.\\ \\ These parameters are obtained by right-clicking on the screen we want to display. | ||
- | * **writeField (Text,Field,Offset):** This function writes in a certain field the value that we define in the Text parameter.\\ | ||
- | *Parameter Text: Value-> Text that should appear. | ||
- | *Parameter Field: Field that we are going to write. | ||
- | *Parameter Offset: Field position\\ These parameters are obtained by pressing the right mouse button on the screen that we want to show.\\ | ||
{{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | {{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | ||
* **writeKey (Key):** This function executes a predefined key on the screen.\\ (ENTER, PF8, PF4, etc…). | * **writeKey (Key):** This function executes a predefined key on the screen.\\ (ENTER, PF8, PF4, etc…). | ||
- | *Parameter Key: Value-> Function key. | + | *Parameter Key: value-> Function key. |
+ | |||
+ | * **writeKeyUntilFind(Key, Text)**: This function executes the function key (Key) and waits for the text (Text) to appear on the screen. | ||
+ | |||
+ | * **writeText (Text,Row,Column):** This function writes a text in a defined position.(line and column). | ||
+ | *Parameter Text: value-> Text to write. | ||
+ | *Parameter Row: value-> Row Number. | ||
+ | *Parameter Column: value-> Column number.\\ \\ These parameters are obtained by right-clicking on the screen we want to display.\\ | ||
+ | {{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ \\ | ||
+ | |||
+ | |||
+ | ===== Macro generation===== | ||
+ | |||
+ | As already mentioned in the Introduction, with this adapter, it is possible to generate macros that allow to automate tests in systems "transformed to HTML". We are going to explain how to record a series of keyboard actions, in order to execute them later.\\ \\ We connect to the 3270 emulator: | ||
+ | |||
+ | {{ :1emulador3270.png?&400 |}}\\ | ||
+ | |||
+ | Click on the Macro option to record the test and then check the Record option in the drop-down menu that appears.\\ | ||
+ | |||
+ | {{ :2emulador3270.png?&400 |}}\\ | ||
+ | |||
+ | Give a file name.\\ | ||
+ | |||
+ | {{ :31emulador3270.png?&400 |}}\\ | ||
+ | |||
+ | And we start recording, confirming by clicking the OK checkbox.\\ | ||
+ | |||
+ | |||
+ | {{ :4emulador3270.png?&400 |}}\\ | ||
+ | |||
+ | |||
+ | Once we finish, we stop recording by clicking Stop recording in the drop-down menu.\\ | ||
+ | |||
+ | {{ :5emulador3270.png?&400 |}}\\ | ||
+ | |||
+ | And confirm the stop by clicking on the OK checkbox.\\ | ||
+ | |||
+ | {{ :6emulador3270.png?&400 |}}\\ | ||
+ | |||
+ | This process generates a **toExport** file that is automatically saved in the following path:\\ **C:\Users\xxxxx\jagacy_data**\\ where **xxxxx** will vary depending on the name of each user. Later we will need to find this file to import it.\\ | ||
- | * **writeText (Text,Row,Column):** This function writes a text in a defined position.\\(line and column). | ||
- | *Parameter Text: Value-> Text to write. | ||
- | *Parameter Row: Value-> Line Number. | ||
- | *Parameter Column: Value-> Column number.\\ These parameters are obtained by pressing the right mouse button on the screen that we want to show.\\ | ||
- | {{ :en:image_2021_01_11t12_08_14_736z.png?400 |}}\\ | ||
+ | Next, access the TAST tool. | ||
+ | * We check the new diagram box and access Domain, Project, Folder, Diagram name and Diagram description, as we always do when we design a new diagram. Then the Canvas or blank canvas appears. | ||
+ | * Access the toolbar and click on the Assistants box. | ||
+ | * A drop-down menu with different options will appear. The options to choose are:\\ - Import from 3270 to 3270.\\ - Import from 3270 to HTML.\\ | ||
+ | * We import from the wizard the **toExport** file that we have recorded and saved in the **C:** Drive.\\ | ||
+ | * In any of the two options provided by the Assistants box, a diagram will be automatically generated, which will reflect step by step, the whole recording process of the different actions performed and in which two adapters will appear, the User Object adapter and the 3270 adapter. | ||
+ | * Save and validate the diagram. | ||
+ | * And finally, we will take it to the TAST client to execute it. | ||
+ | | ||