CN109669871B - Method for realizing Oracle Form automatic test - Google Patents

Method for realizing Oracle Form automatic test Download PDF

Info

Publication number
CN109669871B
CN109669871B CN201811579426.1A CN201811579426A CN109669871B CN 109669871 B CN109669871 B CN 109669871B CN 201811579426 A CN201811579426 A CN 201811579426A CN 109669871 B CN109669871 B CN 109669871B
Authority
CN
China
Prior art keywords
module
obtaining
oracle form
jab
directory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811579426.1A
Other languages
Chinese (zh)
Other versions
CN109669871A (en
Inventor
陈锋
蒋凌云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fengguo Manulife Information Technology Service Chengdu Co ltd
Original Assignee
Fengguo Manulife Information Technology Service Chengdu Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fengguo Manulife Information Technology Service Chengdu Co ltd filed Critical Fengguo Manulife Information Technology Service Chengdu Co ltd
Priority to CN201811579426.1A priority Critical patent/CN109669871B/en
Publication of CN109669871A publication Critical patent/CN109669871A/en
Application granted granted Critical
Publication of CN109669871B publication Critical patent/CN109669871B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for realizing Oracle Form automatic test, which comprises the following steps: configuring a CASSRunner operating environment; writing a custom library in a Robot Framework; compiling an automatic test case on a Robot Framework; the custom library calls a dynamic link library JabToPython.dll of the CASRUnner through a Com component, and the dynamic link library JabToPython.dll calls a JAB of the bottom layer to operate elements on the Oracle Form page. The invention realizes the automatic test of the system developed by the Oracle Form technology, and builds an integral automatic test scheme, so that the systems can be connected for automatic test, the traditional manual test is replaced, and the test efficiency is improved.

Description

Method for realizing Oracle Form automatic test
Technical Field
The invention relates to the technical field of automatic testing, in particular to a method for realizing automatic testing of Oracle Form.
Background
At present, a system developed by using an Oracle Form technology is generally tested manually, and in the field of automatic testing, no solution for response exists in the industry at present. Therefore, after other systems capable of automatically testing or platform tests are completed, the Oracle Form system cannot be directly connected for automatic testing, and the problems of low testing efficiency and inconvenience in testing are caused.
Disclosure of Invention
The invention aims to provide a method for realizing automatic test of Oracle Form, which is used for solving the problems that the Oracle Form in the prior art can not be automatically tested and can not be connected with other automatic test systems for testing.
The invention solves the problems through the following technical scheme:
a method for realizing Oracle Form automatic test comprises the following steps:
step S100: configuring a CASSRunner operating environment;
step S200: compiling a custom library according to the service requirements of the test project, and placing the custom library in the project of the Robot Framework, wherein the custom library comprises functions required to be used in the test project;
step S300: a tester compiles an automatic test case on a Robot Framework;
step S400: the Robot Framework refers to the custom library, the custom library calls a dynamic link library JabToPython.dll of the CASRUnner through a Com component, the dynamic link library JabToPython.dll is used for realizing an interface for calling the basic function of the Oracle Form at the bottom layer, and the dynamic link library JabToPython.dll calls a JAB at the bottom layer to operate elements on the Oracle Form page.
The Robot Framework operates the elements on the Oracle Form by calling a dynamic link library in the CASRUnner, namely JabToPython. In addition, the Robot Framework can be connected with Web Site through a Selenium2Library and connected with a database MySQL through a databaseLibrary, so that automatic testing can be performed on connection among systems such as an Oracle Form system, a net and a Java developed Web system, automatic testing of connection of multiple platforms (such as C #, Python) is realized, and a unified automatic testing solution is established.
Further, the dynamic link library jabtopython.dll in step S400 includes an attribute checking module, an element information module, a JSON formatting module, an open JVM module, a return result module, a directory, and an element operation method, where:
the attribute checking module is used for providing an interface for checking the attribute of the element on the Oracle Form;
the Com helper module is used for calling a user32 interface in the Com component;
the element information module is used for defining the attribute and the method of the element;
the JSON formatting module is used for JSON format serialization;
the method comprises the steps of opening a JVM module for opening a java virtual machine containing Oracle Form;
a result returning module for returning success or failure message;
the directory comprises a JAB directory and a keyword directory, wherein the JAB directory comprises basic operations on elements, and the keyword directory comprises basic operations on services.
Further, the JAB directory includes basic operations on elements specifically including: obtaining a current element object, obtaining the current element object through attributes, obtaining the current element object through indexes, finding an element ID through attributes, finding the element ID through indexes, circulating messages, waiting for the appearance of an element containing a specified text in a specified Oracle Form window within a specific time (a set time or a time meeting a set condition), obtaining an element text through the ID, and checking whether the value of the element is input.
Further, the keyword directory includes basic operations on the service, including: text box input, acquiring a value of a control, drop-down box selection, button clicking, judging whether the control exists, waiting for the control to appear, setting TopMost, running a program or a script, and waiting for a window to be activated and a window to be maximized.
Further, the element operation method includes: the method comprises the steps of obtaining a mouse cursor, waiting for the mouse to be in an available state, searching a java window, obtaining element attributes, searching elements, recursively obtaining element nodes, obtaining appointed element nodes, judging whether the appointed elements meet specific requirements or not, analyzing a locator, obtaining a result to be obtained and analyzing an xpath node.
Further, the step S100 specifically includes:
step S110: installing a Java running environment, installing a JAB file, and restarting after checking that JAB configuration is successful;
step S120: installing a Robot Framework;
step S130: and configuring a Python operating environment.
After the operating environments are configured in sequence, the CAS1.0 is opened through Ride and checked by the case, so that interface operation is guaranteed.
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) the invention realizes the automatic test of the system developed by the Oracle Form technology, and builds an integral automatic test scheme, so that the systems can be connected for automatic test, the traditional manual test is replaced, and the test efficiency is improved.
(2) The invention provides a method for operating elements on an Oracle Form page by a Robot Framework, realizes automatic connection test among systems, can replace the traditional manual test of Oracle From, and is convenient and efficient.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a schematic diagram of an automated multi-platform connection test according to the present invention.
Detailed Description
Before describing the specific embodiments, the terms referred to herein are first explained as follows:
TopMost: sometimes, an application program needs to always locate a frame at the forefront of a screen, and the frame can be seen even if the application program switches to other frames, and the frame is called a TopMost frame;
oracle Form: the method is equivalent to a webpage, a plurality of controls are arranged on the webpage, and the controls need to be operated in the automatic test;
CASRunner: the method is a set of solution, and realizes the operation of Oracle From;
JAB, Java Access Bridge is a technology for disclosing Java Access API in Microsoft Windows DLL, and Java application programs and applets for realizing the Java Access API can be visible to auxiliary technologies on the Microsoft Windows system.
The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.
Example 1:
referring to fig. 1, a method for implementing an Oracle Form automated test includes:
step S100: configuring a CASSRunner operating environment;
step S200: compiling a custom library according to the service requirements of the test project, and placing the custom library in the project of the Robot Framework, wherein the custom library comprises functions required to be used in the test project;
step S300: a tester compiles an automatic test case on an automatic test Framework Robot Framework, and the automatic test case converges to operate a plurality of platforms (including Oracle Form) to perform data entry in the test process;
step S400: the Robot Framework refers to the custom library, the custom library calls a dynamic link library JabToPython.dll of the CASRUnner through a Com component, the dynamic link library JabToPython.dll is used for realizing an interface for calling the basic function of the Oracle Form at the bottom layer, and the dynamic link library JabToPython.dll calls a JAB at the bottom layer to operate elements on the Oracle Form page.
As shown in FIG. 2, the Robot Framework realizes the automatic test of the Oracle Form system by calling the dynamic link library in the CASRunner, namely JabToPython. In addition, the Robot Framework can be connected with Web Site through a Selenium2Library and connected with a database MySQL through a databaseLibrary, so that automatic testing can be performed on connection among systems such as an Oracle Form system, a net and a Java developed Web system, automatic testing of connection of multiple platforms (such as C #, Python) is realized, and a unified automatic testing solution is established.
Example 2:
on the basis of embodiment 1, the dynamic link library jabtopython.dll in step S400 includes an attribute checking module, an element information module, a JSON formatting module, an open JVM module, a return result module, a directory, and an element operation method, where:
the attribute checking module is used for providing an interface for checking the attribute of the element on the Oracle Form;
the Com helper module is used for calling a user32 interface in the Com component;
the element information module is used for defining the attribute and the method of the element;
the JSON formatting module is used for JSON format serialization;
the method comprises the steps of opening a JVM module for opening a java virtual machine containing Oracle Form;
a result returning module for returning success or failure message;
the directory comprises a JAB directory and a keyword directory, wherein the JAB directory comprises basic operations on elements, and the keyword directory comprises basic operations on services.
Further, the JAB directory includes basic operations on elements specifically including: obtaining a current element object, obtaining the current element object through attributes, obtaining the current element object through indexes, finding an element ID through attributes, finding the element ID through indexes, circulating messages, waiting for the appearance of an element containing a specified text in a specified Oracle Form window within a specific time, obtaining an element text through the ID, and checking whether the value of the element is input.
Further, the keyword directory includes basic operations on the service, including: text box input, acquiring a value of a control, drop-down box selection, button clicking, judging whether the control exists, waiting for the control to appear, setting TopMost, running a program or a script, and waiting for a window to be activated and a window to be maximized.
Further, the element operation method includes: the method comprises the steps of obtaining a mouse cursor, waiting for the mouse to be in an available state, searching a java window, obtaining element attributes, searching elements, recursively obtaining element nodes, obtaining appointed element nodes, judging whether the appointed elements meet specific requirements or not, analyzing a locator, obtaining a result to be obtained and analyzing an xpath node.
For example, login needs to input an account password:
(1) calling an input method in a custom library in a Robot Framework to input an account number and a password;
(2) the user-defined library calls an input method of a keyword directory in JabToPython.
(3) The input method of the keyword directory calls JAB to search the coordinate of the account password on Oracleform, clicks the coordinate by moving a mouse, and then inputs the account password by a keyboard;
(4) in the same way, the coordinates of the login button are found, the mouse is moved to the coordinates, and the left button of the mouse is clicked;
(5) the login is completed.
Further, the step S100 specifically includes:
step S110: installing a Java running environment, installing a JAB file, and restarting after checking that JAB configuration is successful;
step S120: installing a Robot Framework;
step S130: and configuring a Python operating environment.
Although the present invention has been described herein with reference to the illustrated embodiments thereof, which are intended to be preferred embodiments of the present invention, it is to be understood that the invention is not limited thereto, and that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure.

Claims (5)

1. A method for realizing Oracle Form automatic test is characterized by comprising the following steps:
step S100: configuring a CASSRunner operating environment;
step S200: compiling a custom library according to the service requirements of the test project, and placing the custom library in the project of the Robot Framework, wherein the custom library comprises functions required to be used in the test project;
step S300: a tester compiles an automatic test case on a Robot Framework;
step S400: the Robot Framework refers to the custom library, the custom library calls a dynamic link library JabToPython.dll of the CASRUnner through a Com component, the dynamic link library JabToPython.dll is used for realizing an interface for calling the basic function of the Oracle Form at the bottom layer, and the dynamic link library JabToPython.dll calls a JAB at the bottom layer to operate elements on the Oracle Form page;
the dynamic link library jabtopython.dll in step S400 includes an attribute checking module, an element information module, a JSON formatting module, an open JVM module, a return result module, a directory, and an element operation method, where:
the attribute checking module is used for providing an interface for checking the attribute of the element on the Oracle Form;
the Com helper module is used for calling a user32 interface in the Com component;
the element information module is used for defining the attribute and the method of the element;
the JSON formatting module is used for JSON format serialization;
the method comprises the steps of opening a JVM module for opening a java virtual machine containing Oracle Form;
a result returning module for returning success or failure message;
the directory comprises a JAB directory and a keyword directory, wherein the JAB directory comprises basic operations on elements, and the keyword directory comprises basic operations on services.
2. The method for realizing Oracle Form automated testing according to claim 1, wherein the JAB directory includes basic operations on elements specifically including: obtaining a current element object, obtaining the current element object through attributes, obtaining the current element object through indexes, finding an element ID through attributes, finding the element ID through indexes, circulating messages, waiting for the appearance of an element containing a specified text in a specified Oracle Form window within a specific time, obtaining an element text through the ID, and checking whether the value of the element is input.
3. The method for realizing Oracle Form automated testing according to claim 1, wherein the keyword directory includes basic operations on services such as: text box input, acquiring a value of a control, drop-down box selection, button clicking, judging whether the control exists, waiting for the control to appear, setting TopMost, running a program or a script, and waiting for a window to be activated and a window to be maximized.
4. The method for realizing Oracle Form automated testing according to claim 1, wherein the element operation method comprises: the method comprises the steps of obtaining a mouse cursor, waiting for the mouse to be in an available state, searching a java window, obtaining element attributes, searching elements, recursively obtaining element nodes, obtaining appointed element nodes, judging whether the appointed elements meet specific requirements or not, analyzing a locator, obtaining a result to be obtained and analyzing an xpath node.
5. The method for realizing Oracle Form automated testing according to claim 1, wherein the step S100 specifically comprises:
step S110: installing a Java running environment, installing a JAB file, and restarting after checking that JAB configuration is successful;
step S120: installing a Robot Framework;
step S130: and configuring a Python operating environment.
CN201811579426.1A 2018-12-24 2018-12-24 Method for realizing Oracle Form automatic test Active CN109669871B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811579426.1A CN109669871B (en) 2018-12-24 2018-12-24 Method for realizing Oracle Form automatic test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811579426.1A CN109669871B (en) 2018-12-24 2018-12-24 Method for realizing Oracle Form automatic test

Publications (2)

Publication Number Publication Date
CN109669871A CN109669871A (en) 2019-04-23
CN109669871B true CN109669871B (en) 2021-05-18

Family

ID=66147073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811579426.1A Active CN109669871B (en) 2018-12-24 2018-12-24 Method for realizing Oracle Form automatic test

Country Status (1)

Country Link
CN (1) CN109669871B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110554967B (en) * 2019-09-10 2023-09-08 浙江中控技术股份有限公司 Testing method and device for nonstandard control

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224464A (en) * 2015-11-10 2016-01-06 浪潮(北京)电子信息产业有限公司 A kind of parallel automated testing method
CN106095678A (en) * 2016-06-08 2016-11-09 上海爱数信息技术股份有限公司 Automatization's result inspection method of data bank service operation under windows platform
CN106383784A (en) * 2016-09-20 2017-02-08 上海爱数信息技术股份有限公司 Software automated test method and system
CN106951345A (en) * 2017-03-28 2017-07-14 上海爱数信息技术股份有限公司 A kind of conformance test method and device of magnetic disk of virtual machine data
CN108762955A (en) * 2018-05-30 2018-11-06 平安普惠企业管理有限公司 Interface call method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224464A (en) * 2015-11-10 2016-01-06 浪潮(北京)电子信息产业有限公司 A kind of parallel automated testing method
CN106095678A (en) * 2016-06-08 2016-11-09 上海爱数信息技术股份有限公司 Automatization's result inspection method of data bank service operation under windows platform
CN106383784A (en) * 2016-09-20 2017-02-08 上海爱数信息技术股份有限公司 Software automated test method and system
CN106951345A (en) * 2017-03-28 2017-07-14 上海爱数信息技术股份有限公司 A kind of conformance test method and device of magnetic disk of virtual machine data
CN108762955A (en) * 2018-05-30 2018-11-06 平安普惠企业管理有限公司 Interface call method, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Robot Framework+Oracle;zhengyihan1216;《https://www.cnblogs.com/zhengyihan1216/p/6892086.html?utm_source=itdadao&utm_medium=referral》;20170522;1-3 *

Also Published As

Publication number Publication date
CN109669871A (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN107979508B (en) Micro-service test method and device
US7210066B2 (en) Method and system for determining computer software test coverage
US9740506B2 (en) Automating interactions with software user interfaces
US8370811B2 (en) Modularizing and aspectizing graphical user interface directed test scripts
US8875103B2 (en) Method of testing multiple language versions of a software system using one test script
CN108845940B (en) Enterprise-level information system automatic function testing method and system
US8677194B2 (en) Method and system for site configurable error reporting
US7454660B1 (en) System and method for testing applications at the business layer
US20100083225A1 (en) Dynamic Autocompletion Tool
CN108536593A (en) CS Framework Softwares automated testing method based on UI and system
US20120005520A1 (en) Simplifying automated software maintenance of data centers
CN111061489B (en) Multi-platform compiling detection method, device, equipment and medium
US20220350581A1 (en) Generating applications for versatile platform deployment
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
CN111090431A (en) Data processing method and device
CN114818565A (en) Simulation environment management platform, method, equipment and medium based on python
CN112199284A (en) Program automation testing method and corresponding device, equipment and medium
CN109669871B (en) Method for realizing Oracle Form automatic test
CN111679976A (en) Method and device for searching page object
CN114217789A (en) Function component expansion method, device, equipment, storage medium and program product
CN113297081B (en) Execution method and device of continuous integrated pipeline
CN108427645B (en) Method and system for realizing unattended operation in automatic test platform without command line interface
CN106598841A (en) Self-installing method and system for automatic test frame
CN112905469B (en) Method and apparatus for detecting applet capability features
CN111367796B (en) Application program debugging method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant