An interface automatic test method, system and medium for HIS
By using the HIS interface automation testing method and system, the problem of low interface testing efficiency has been solved, achieving efficient interface automation testing, adapting to various project requirements, reducing testing time, and improving testing efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR FINANCIAL INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2021-11-23
- Publication Date
- 2026-05-29
AI Technical Summary
Existing HIS interface testing methods are slow and time-consuming, which delays the production progress of HIS terminal products and affects user experience.
This paper provides a method and system for automated interface testing for HIS, including document configuration, interface development, and interface testing steps. By configuring interface development documents, input parameter format database, and parameter generation tools, it realizes automated testing of interface testing specifications and functional interface modules.
It adapts to the needs of various HIS projects, automates and batch tests business interfaces, greatly reduces testing time, improves testing efficiency, and has high versatility and application value.
Smart Images

Figure CN114238079B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of HIS interface adaptation technology, and in particular to an automated interface testing method, system and medium for HIS. Background Technology
[0002] The existing HIS uses a wide variety of interfaces, and the calling logic between these interfaces is complex. When developing interfaces, it is necessary to follow the calling rules between them. Similarly, during testing, each interface needs to be manually tested in turn. This interface testing method is slow and time-consuming, which ultimately delays the production progress of HIS terminal products and affects the user experience. Summary of the Invention
[0003] The present invention mainly addresses the problem that existing HIS interface testing methods are slow, time-consuming, and delay the production progress of HIS terminal products, thus affecting the user experience.
[0004] To solve the above-mentioned technical problems, one technical solution adopted by the present invention is to provide an automated interface testing method for HIS, comprising the following steps:
[0005] Document configuration steps:
[0006] Obtain project functional requirements, configure interface specification information, and configure interface development documentation based on the project functional requirements and the interface specification information;
[0007] Interface development steps:
[0008] Configure the development module, input parameter format database, and parameter generation tool; configure interface testing specification information and functional interface modules based on the interface development document, the development module, the input parameter format database, and the parameter generation tool;
[0009] Interface testing steps:
[0010] Configure the testing module and obtain the testing requirements; perform interface testing operations based on the interface testing specification information, the functional interface module, the testing module, and the testing requirements.
[0011] As an improved solution, the project functional requirements include: several functional requirements;
[0012] The interface specification information includes: several interface types, several functional information that each of the interface types matches, and several specification packages; the specification packages are configured with business interface specifications and interface call parameters.
[0013] The input parameter format database is configured with several input parameter formats that match the specifications of the aforementioned business interfaces respectively;
[0014] The test requirements specify the test interface type and test parameters.
[0015] As an improved approach, the step of configuring the interface development document based on the project functional requirements and the interface specification information further includes:
[0016] Based on the project functional requirements and the interface specification information, a first screening step is performed to obtain several functional specification packages; a unified parameter specification is set, and a specification copying step is performed on each of the several functional specification packages based on the unified parameter specification to obtain several development specification data; an empty document template is created, and the several development specification data are filled into the empty document template to obtain the interface development document.
[0017] As an improved approach, the first screening step includes:
[0018] Identify several functional requirements in the project's functional requirements; identify the interface specification information, and filter out several first functional information that matches the several functional requirements respectively from the several functional information; filter out several first interface types that match the several first functional information respectively from the several interface types; filter out several first specification packages that match the several first interface types respectively from the several specification packages; and set the several first specification packages as several functional specification packages.
[0019] As an improved approach, the specification replication step includes:
[0020] Create an empty text file; extract the first business interface specification from the functional specification package; convert the format of the first business interface specification according to the unified parameter specification to obtain the first functional interface development specification; copy the first functional interface development specification into the empty text file to obtain the development specification data.
[0021] As an improved solution, the step of configuring interface test specification information and functional interface modules based on the interface development document, the development module, the input parameter format database, and the parameter generation tool further includes:
[0022] The development module is invoked to develop interfaces according to the first functional interface development specifications in the interface development document, thereby obtaining several interfaces to be tested that match the several required functional items respectively.
[0023] Identify several first input parameter formats that match several first functional interface development specifications in the input parameter format database; call the parameter generation tool to generate several test input parameters that match several interfaces to be tested according to the several first input parameter formats;
[0024] The development module is invoked to perform a test information assembly step based on several functional specification packages, several first input parameter formats, several test input parameters, and several interfaces to be tested, to obtain the interface test specification information.
[0025] Configure the module to be encapsulated. After obtaining the interface test specification information, call the development module to encapsulate several interfaces to be tested into the module to be encapsulated, thereby obtaining the functional interface module.
[0026] As an improved approach, the test information assembly step includes:
[0027] Define several interface call parameters corresponding to several functional specification packages as several first interface call parameters; identify the call hierarchy among the several first interface call parameters;
[0028] Based on the call hierarchy, a number of first interfaces to be tested are identified from among the number of interfaces to be tested; based on the call hierarchy, a number of second interfaces to be tested that have a call relationship with the number of first interfaces to be tested are identified from among the number of interfaces to be tested.
[0029] Among the several test input parameters, identify several first test input parameters that match several first interfaces to be tested respectively; call several first interfaces to be tested to parse several first test input parameters respectively to obtain several first test output parameters;
[0030] Identify several first output parameter formats corresponding to several first test output parameters respectively; identify several second input parameter formats that match several second interfaces to be tested respectively among several first input parameter formats; set several second input parameter formats that match several first output parameter formats respectively as several sub-level parameter formats;
[0031] The second interfaces to be tested, which correspond to the sub-level parameter formats respectively, are set as the sub-level interfaces corresponding to the first interfaces to be tested respectively.
[0032] Based on the call hierarchy and several sub-level interfaces, several interface call chain information corresponding to several first interfaces to be tested are created; the several interface call chain information are packaged to obtain the interface test specification information.
[0033] As an improved approach, the interface testing operation includes:
[0034] Identify the test interface type and test parameters in the test requirements; set the interface to be tested in the functional interface module that matches the test interface type as the first business interface; confirm the first interface call chain information that matches the first business interface in the interface test specification information;
[0035] Based on the first interface call chain information, the first sub-level interface of the first service interface is confirmed in the functional interface module; the test parameters are input to the first service interface, and the first service interface and the first sub-level interface are loaded;
[0036] Identify the parameter parsing link between the first business interface and the first sub-level interface for the test parameters, and determine the correctness of the parameter parsing link based on the first interface call link information.
[0037] This invention also provides an automated interface testing system for HIS, comprising:
[0038] Documentation configuration module, interface encapsulation module, and interface debugging module;
[0039] The document configuration module is used to obtain project functional requirements and configuration interface specification information, and the document configuration module configures interface development documents based on the project functional requirements and the interface specification information.
[0040] The interface encapsulation module is used to configure the development module, input parameter format database, and parameter generation tool; the interface encapsulation module configures interface testing specification information and functional interface modules based on the interface development document, the development module, the input parameter format database, and the parameter generation tool;
[0041] The interface debugging module is used to configure the test module and obtain test requirements; the interface debugging module performs interface test operations based on the interface test specification information, the functional interface module, the test module, and the test requirements.
[0042] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the interface automation testing method for HIS.
[0043] The beneficial effects of this invention are:
[0044] 1. The interface automation testing method for HIS described in this invention can adapt to the requirements of various HIS projects, thereby developing business interfaces that meet the project requirements. At the same time, based on the hierarchical design between business interfaces, it can automatically perform batch testing on the calling and running of business interfaces, which greatly reduces the testing time, improves the testing efficiency, and has high versatility, making up for the shortcomings of existing technologies and having high application value.
[0045] 2. The interface automated testing system for HIS described in this invention can adapt to various HIS project requirements through the cooperation of a document configuration module, an interface encapsulation module, and an interface debugging module, thereby developing business interfaces that meet project requirements. At the same time, based on the hierarchical design between business interfaces, it can automatically perform batch testing on the calling and running of business interfaces, greatly reducing testing time, improving testing efficiency, and having high versatility, making up for the shortcomings of existing technologies and having high application value.
[0046] 3. The computer-readable storage medium of the present invention enables the cooperation of the guide document configuration module, interface encapsulation module, and interface debugging module to adapt to various HIS project requirements, thereby developing business interfaces that meet project needs. Furthermore, based on the hierarchical design between business interfaces, it can automatically perform batch testing of business interface calls and operations, greatly reducing testing time, improving testing efficiency, and possessing high versatility. It overcomes the shortcomings of existing technologies, has high application value, and effectively improves the operability of the automated interface testing method for HIS. Attached Figure Description
[0047] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0048] Figure 1 This is a flowchart of the interface automation testing method for HIS described in Embodiment 1 of the present invention;
[0049] Figure 2 This is a schematic diagram of the specific process of the interface automation testing method for HIS described in Embodiment 1 of the present invention;
[0050] Figure 3 This is an architecture diagram of the interface automated testing system for HIS described in Embodiment 2 of the present invention. Detailed Implementation
[0051] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more explicit definition of the scope of protection of the present invention.
[0052] In the description of this invention, it should be noted that the embodiments described in this invention are only some embodiments of this invention, not all embodiments; based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0053] In the description of this invention, it should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0054] In the description of this invention, it should be noted that: HIS (Hospital Information System) is a hospital information system; Winform is a system window application.
[0055] Example 1
[0056] This embodiment provides an automated interface testing method for HIS, such as... Figure 1 and Figure 2 As shown, it includes the following steps:
[0057] S100, document configuration steps, specifically including:
[0058] S110. Obtain project functional requirements, configure interface specification information, and configure interface development documents based on the project functional requirements and interface specification information. In this embodiment, the acquisition of project functional requirements is implemented based on business interaction with HIS. Correspondingly, this method involves underlying interaction interfaces to perform data interaction with HIS. The main purpose of step S100 is to refine the relevant functional interfaces according to the project functional requirements of HIS and finally configure the interface development documents to provide a data foundation for subsequent interface development.
[0059] Specifically, the functional requirements of the project include: several required functional items; since this method is applied to HIS, the required functional items include, but are not limited to: registration, receipt issuance, report inquiry, department allocation, etc.
[0060] The interface specification information includes: several interface types, several functional information items that match each of the interface types, and several specification packages. The interface specification information refers to the relevant specification information for developing corresponding HIS functional business interfaces. Each specification package contains business interface specifications, interface call parameters, and interface debugging specifications. The business interface specifications are the relevant interface development specifications, such as functionality, underlying framework, data structure, and interface transmission standards. The interface call parameters are the parameters used when calling the functional interface corresponding to the interface type. The interface debugging specifications are used for debugging and troubleshooting the interface after development.
[0061] Specifically, the first step is to screen development specification packages that match relevant functions to prepare for interface development. Therefore, based on the project's functional requirements and the interface specification information, a first screening step is performed to obtain several functional specification packages. A unified parameter specification is then set, which is the specification corresponding to the interface development document, such as string length or string bit information. To improve the uniformity and regularity of the interface development document and facilitate its identification, a specification copying step is performed on each of the functional specification packages based on the unified parameter specification, resulting in several development specification data. An empty document template is created, which is a blank document with padding, including but not limited to doc or txt format. The several development specification data are then filled into the empty document template to obtain the interface development document.
[0062] Specifically, the first screening step includes: identifying several functional requirements in the project's functional requirements; identifying the interface specification information, and selecting several first functional information that respectively match the several functional requirements from the several functional information, wherein the first functional information is the function that the HIS currently requires the interface developed by this method to have; therefore, selecting several first interface types that respectively match the several first functional information from the several interface types, wherein the first interface types are used for the connection between functional information and specification packages, thereby selecting specification packages that match the requirements; selecting several first specification packages that respectively match the several first interface types from the several specification packages; and setting the several first specification packages as several functional specification packages;
[0063] Specifically, the specification copying step includes: creating an empty text file, which is a subtext of an empty document template, used to fill in the specific specifications in each functional specification package, thereby facilitating differentiation and identification; extracting the first business interface specification from the first specification package; converting the format of the first business interface specification according to the unified parameter specification to obtain the first functional interface development specification; and copying the first functional interface development specification to the empty text file to obtain the development specification data. In this embodiment, the copying method does not affect the information or data in the original specification package, ensuring the effective and secure use of the data.
[0064] S200, Interface Development Steps, specifically including:
[0065] S210. Configure the development module, input parameter format database, and parameter generation tool; configure interface test specification information and functional interface modules based on the interface development document, the development module, the input parameter format database, and the parameter generation tool; in this embodiment, the development module is an interface development tool for HIS;
[0066] Specifically, the input parameter format database is configured with several input parameter formats that match the specifications of the various business interfaces. Correspondingly, the input parameter formats are the parameter formats corresponding to each business interface. In this embodiment, the matching logic between the input parameter formats and the business interface specifications is illustrated by an example. For instance, the input parameters required by the registration interface include, but are not limited to, name, department, ID card information, time information, and mobile phone number information; while the input parameters required by the department allocation interface are department number information and time information. Therefore, the input parameters required for business interfaces corresponding to different business interface specifications are different, hence the need for this input parameter format database to provide a data foundation for subsequent testing.
[0067] Specifically, the development module is invoked to develop interfaces according to the first functional interface development specifications in the interface development document, resulting in several interfaces to be tested that match the several required functional items. These interfaces are the ones for which test information is to be assembled. After the test information for these interfaces is assembled, they can be encapsulated, and the subsequent testing steps can begin. Several first input parameter formats matching the first functional interface development specifications are identified in the input parameter format database. The parameter generation tool is invoked to generate several test input parameters matching the several interfaces to be tested according to the first input parameter formats. The generation algorithm of the parameter generation tool is to randomly generate input parameters according to the input parameter formats. For example, in this embodiment, the test input parameters for the registration interface... The number can be: Wang Mou - ID number xxxxx - Registration time xx month xx day xx hour xx minute - Registration department xx department; the development module is called to perform test information assembly steps based on several functional specification packages, several first input parameter formats, several test input parameters and several interfaces to be tested, to obtain the interface test specification information; the interface test specification information is the benchmark used to judge whether there are any abnormalities in the encapsulated interface to be tested during subsequent automated batch testing; the module to be encapsulated is configured, which is an interface container that can carry the interface to be encapsulated; after obtaining the interface test specification information, the development module is called to encapsulate several interfaces to be tested into the module to be encapsulated, to obtain the functional interface module; the functional interface module is an interface integration module that can implement the corresponding functions;
[0068] Specifically, the principle of the test information assembly step is as follows: based on the calling relationship between various functional interfaces, the interface through which the parameter is initially input is identified. Then, through the functional association and calling relationship between various interfaces, the interface processing chain that the parameter passes through after input is identified. In subsequent steps, it is only necessary to determine which part of the encapsulated interface has a parameter parsing problem based on this processing chain. Correspondingly, the test information assembly step includes:
[0069] The interface call parameters corresponding to the functional specification packages are set as the first interface call parameters; the call hierarchy between the first interface call parameters is identified; in this embodiment, for the convenience of testing and application, the interface call parameters are similar to folder paths, and the various levels are related to each other, and the keywords of the call parameters between the corresponding levels will inevitably have overlapping items, so that the call relationship between the interfaces can be determined.
[0070] Based on the call hierarchy, several first test interfaces are identified from among the several test interfaces. Each first test interface is the starting point for parameter processing among the several test interfaces, i.e., the first interface to process input parameters, such as a registration interface or an information registration interface. Based on the call hierarchy, several second test interfaces are identified from among the several test interfaces that have a call relationship with each of the first test interfaces. The second test interfaces have a call relationship with the first test interfaces; this call relationship is only present, and the parameter processing chain corresponding to each first test interface needs to be determined based on the format of the input and output parameters. Therefore, several first test input parameters that match each of the several first test interfaces are identified from among the several test input parameters. The several first test interfaces are called to parse the several first test input parameters to obtain several first test output parameters. The formats of the several first test output parameters corresponding to the several first output parameters are identified. Several second input parameter formats that match each of the several second test interfaces are identified from among the several first input parameter formats. The formats that match each of the several first output parameter formats are then... The formats of the second input parameters are respectively set as several sub-level parameter formats. Correspondingly, the principle of this step is that when the format of the parameters output by the first interface to be tested is the same as the format of the input parameters of the second interface to be tested, it must mean that the second interface to be tested is used to process the parameters output by the first interface to be tested after processing. Therefore, the second interface to be tested must belong to the sub-level interface of the first interface to be tested. Therefore, according to this logic, the several second interfaces to be tested corresponding to the several sub-level parameter formats are set as the several sub-level interfaces corresponding to the several first interfaces to be tested. Finally, according to this logic, the next sub-level interface of the sub-level interface is identified in turn. Then, according to the order of each level and the calling relationship between each interface, several calling chains are set. Therefore, based on the calling level and the several sub-level interfaces, several interface calling chain information corresponding to the several first interfaces to be tested is created. The several interface calling chain information is packaged to obtain the interface test specification information. Through the interface test specification information, in conjunction with the test module in step S300, fully automated batch testing of each interface can be achieved.
[0071] S300, interface testing steps, specifically including:
[0072] S310. Configure the test module and obtain test requirements; perform interface test operations based on the interface test specification information, the functional interface module, the test module, and the test requirements.
[0073] Specifically, the test requirements include: test scenario information and test interface type and test parameters that match the test scenario information; correspondingly, in this embodiment, the test scenario information is the scenario to which the functional interface is applicable, such as different departments; the test parameters are the main input parameters of the interface corresponding to the test interface type that needs to be tested. For example, if the interface type to be tested is the registration interface class, then the main input parameters are in the same format as the test input parameters in step S200.
[0074] Specifically, the interface testing operation includes: identifying the test interface type and test parameters in the test requirements; setting the interface to be tested in the functional interface module that matches the test interface type as the first business interface; therefore, all subsequent test operations are related to this first business interface, so the first interface call chain information matching the first business interface is confirmed in the interface test specification information; identifying each sub-level interface in the first interface call chain information, and then confirming the first sub-level interface of the first business interface in the functional interface module, where the first sub-level can be one or more; inputting the test parameters into the first business interface, since the interface here has been encapsulated, the parameters are input first, and then the first business interface and the first sub-level interface are loaded simultaneously. At this time, the first business interface will parse / process the test parameters to obtain the corresponding output parameters. Subsequently, according to the hierarchy, the associated first sub-level interface will process the output parameters to generate new output parameters, and then according to the next level, the associated next level's first sub-level interface will process the output parameters to generate new output parameters. The hierarchical interface will process the new output parameter until all interfaces have been called. Based on the first interface call chain information, the correctness of the parameter parsing chain between the first business interface and the first sub-level interface is judged. Therefore, the judgment of correctness is to judge the parsing / processing chain of the test parameter in the above process. If the parameter processing flow of each interface in the parameter parsing / processing chain does not match the first interface call chain information, it indicates that there is an interface abnormality. The mismatch situation includes: 1. All interfaces are called, but there is an error in the interface guidance or error call, that is, the call hierarchy between interfaces is incorrect; 2. There is an interface that has not been called; 3. The output parameter is incorrect; 4. Interface physical failure. Correspondingly, after the above mismatch situation occurs, the correctness of the parameter parsing chain between the first business interface and the first sub-level interface is incorrect, otherwise it is correct. Correspondingly, when an incorrect situation is encountered, the faulty interface or abnormal interface is debugged according to the interface debugging specification in the specification package of step S100. After debugging, the test is performed again according to the test operation of this interface.
[0075] In this embodiment, the testing module in step S300 uses an automated testing tool developed based on Winform, which is set up in the hospital's intranet and achieves interface testing, interaction, and invocation based on the cooperation between the business server and interface server in the hospital.
[0076] Example 2
[0077] This embodiment is based on the same inventive concept as the interface automation testing method for HIS described in Embodiment 1, and provides an interface automation testing system for HIS, such as... Figure 3 As shown, it includes: a document configuration module, an interface encapsulation module, and an interface debugging module;
[0078] In the interface automated testing system for HIS, the document configuration module is used to obtain project functional requirements and configure interface specification information. The document configuration module configures interface development documents based on the project functional requirements and the interface specification information.
[0079] Specifically, the project functional requirements include: several functional items; the interface specification information includes: several interface types, several functional information that matches each of the interface types, and several specification packages; the specification packages are configured with business interface specifications and interface call parameters;
[0080] Specifically, the document configuration module performs a first filtering step based on the project functional requirements and the interface specification information to obtain several functional specification packages; the document configuration module sets a unified parameter specification, and performs a specification copying step on each of the several functional specification packages based on the unified parameter specification to obtain several development specification data; the document configuration module creates an empty document template, and fills the several development specification data into the empty document template to obtain the interface development document;
[0081] Specifically, the first screening step includes: the document configuration module identifying several functional requirements in the project's functional requirements; the document configuration module identifying the interface specification information and filtering out several first functional information that respectively match the several functional requirements from the several functional information; the document configuration module filtering out several first interface types that respectively match the several first functional information from the several interface types; the document configuration module filtering out several first specification packages that respectively match the several first interface types from the several specification packages; and the document configuration module setting the several first specification packages as several functional specification packages.
[0082] Specifically, the specification copying step includes: the document configuration module creating an empty text; the document configuration module extracting the first business interface specification from the functional specification package; the document configuration module converting the format of the first business interface specification according to the unified parameter specification to obtain the first functional interface development specification; and the document configuration module copying the first functional interface development specification into the empty text to obtain the development specification data.
[0083] In the interface automated testing system for HIS, the interface encapsulation module is used to configure the development module, the input parameter format database, and the parameter generation tool; the interface encapsulation module configures interface testing specification information and functional interface modules based on the interface development document, the development module, the input parameter format database, and the parameter generation tool.
[0084] Specifically, the input parameter format database is configured with several input parameter formats that match the specifications of the aforementioned business interfaces.
[0085] Specifically, the interface encapsulation module calls the development module to develop interfaces according to several first functional interface development specifications in the interface development document, obtaining several interfaces to be tested that match several required functional items respectively; the interface encapsulation module identifies several first input parameter formats that match several first functional interface development specifications respectively in the input parameter format database; the interface encapsulation module calls the parameter generation tool to generate several test input parameters that match several interfaces to be tested respectively according to several first input parameter formats; the interface encapsulation module calls the development module to perform a test information assembly step based on several functional specification packages, several first input parameter formats, several test input parameters and several interfaces to be tested, to obtain the interface test specification information; the interface encapsulation module configures the module to be encapsulated, and after obtaining the interface test specification information, the interface encapsulation module calls the development module to encapsulate several interfaces to be tested into the module to be encapsulated, to obtain the functional interface module;
[0086] Specifically, the test information assembly step includes: the interface encapsulation module sets several interface call parameters corresponding to several functional specification packages as several first interface call parameters; the interface encapsulation module identifies the call hierarchy among the several first interface call parameters; the interface encapsulation module identifies several first interfaces to be tested among several interfaces to be tested based on the call hierarchy; the interface encapsulation module identifies several second interfaces to be tested that have a call relationship with several first interfaces to be tested based on the call hierarchy; the interface encapsulation module identifies several first test input parameters that match several first interfaces to be tested among several test input parameters; and the interface encapsulation module calls several first interfaces to be tested to parse several first test input parameters to obtain several first test output parameters. The interface encapsulation module identifies several first output parameter formats corresponding to several first test output parameters; the interface encapsulation module confirms several second input parameter formats that match several second interfaces to be tested from among several first input parameter formats; the interface encapsulation module sets several second input parameter formats that match several first output parameter formats as several sub-level parameter formats; the interface encapsulation module sets several second interfaces to be tested that correspond to several sub-level interfaces that correspond to several first interfaces to be tested; the interface encapsulation module creates several interface call chain information corresponding to several first interfaces to be tested based on the call hierarchy and several sub-level interfaces; and packages several interface call chain information to obtain the interface test specification information.
[0087] In the interface automated testing system for HIS, the interface debugging module is used to configure the test module and obtain test requirements; the interface debugging module performs interface testing operations based on the interface test specification information, the functional interface module, the test module, and the test requirements.
[0088] Specifically, the test requirements include the test interface type and test parameters;
[0089] Specifically, the interface testing operation includes: the interface debugging module identifying the test interface type and test parameters in the test requirements; the interface debugging module setting the interface to be tested in the functional interface module that matches the test interface type as the first business interface; the interface debugging module confirming the first interface call chain information matching the first business interface in the interface test specification information; the interface debugging module confirming the first sub-level interface of the first business interface in the functional interface module based on the first interface call chain information; the interface debugging module inputting the test parameters to the first business interface and loading the first business interface and the first sub-level interface; the interface debugging module identifying the parameter parsing chain of the test parameters between the first business interface and the first sub-level interface; and the interface debugging module judging the correctness of the parameter parsing chain based on the first interface call chain information.
[0090] Example 3
[0091] This embodiment provides a computer-readable storage medium, including:
[0092] The storage medium is used to store computer software instructions used to implement the interface automation testing method for HIS as described in Embodiment 1 above. It includes a program for executing the interface automation testing method for HIS as described above. Specifically, the executable program can be built into the interface automation testing system for HIS as described in Embodiment 2. In this way, the interface automation testing system for HIS can implement the interface automation testing method for HIS as described in Embodiment 1 by executing the built-in executable program.
[0093] Furthermore, the computer-readable storage medium in this embodiment can be any combination of one or more readable storage media, wherein the readable storage medium includes an electrical, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
[0094] Unlike existing technologies, the interface automation testing method, system, and medium for HIS proposed in this application can adapt to various HIS project requirements, thereby developing business interfaces that meet project needs. Furthermore, based on the hierarchical design between business interfaces, it can automatically perform batch testing of business interface calls and operations. This system provides effective technical support for this method, ultimately greatly reducing testing time, improving testing efficiency, and exhibiting high versatility. It overcomes the shortcomings of existing technologies and has high application value.
[0095] The embodiment numbers disclosed in the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0096] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware to implement the program, which can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0097] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An automated interface testing method for HIS, characterized in that, Includes the following steps: Document configuration steps: Obtain project functional requirements, configure interface specification information, and configure interface development documentation based on the project functional requirements and the interface specification information; Interface development steps: Configure development modules, input parameter format database, and parameter generation tools; Configure interface testing specifications and functional interface modules based on the interface development documentation, the development module, the input parameter format database, and the parameter generation tool; Interface testing steps: Configure the test module and obtain test requirements; Perform interface testing operations based on the interface testing specification information, the functional interface module, the testing module, and the testing requirements; The project's functional requirements include: several required functional items; The interface specification information includes: several interface types, several functional information that each of the interface types matches, and several specification packages; the specification packages are configured with business interface specifications and interface call parameters. The input parameter format database is configured with several input parameter formats that match the specifications of the aforementioned business interfaces respectively; The test requirements specify the test interface type and test parameters. The step of configuring the interface development document based on the project functional requirements and the interface specification information further includes: performing a first screening step based on the project functional requirements and the interface specification information to obtain several functional specification packages; setting a unified parameter specification, and performing a specification copying step on the several functional specification packages based on the unified parameter specification to obtain several development specification data; creating an empty document template, and filling the empty document template with the several development specification data to obtain the interface development document; The first filtering step includes: identifying a plurality of required functional items in the project functional requirements; identifying the interface specification information, and filtering out a plurality of first functional information that respectively match the plurality of required functional items from the plurality of functional information; filtering out a plurality of first interface types that respectively match the plurality of first functional information from the plurality of interface types; filtering out a plurality of first specification packages that respectively match the plurality of first interface types from the plurality of specification packages; and setting the plurality of first specification packages as a plurality of functional specification packages. The specification copying step includes: creating an empty text file; extracting the first business interface specification from the functional specification package; converting the format of the first business interface specification according to the unified parameter specification to obtain the first functional interface development specification; and copying the first functional interface development specification into the empty text file to obtain the development specification data.
2. The automated interface testing method for HIS according to claim 1, characterized in that: The step of configuring interface test specification information and functional interface modules based on the interface development document, the development module, the input parameter format database, and the parameter generation tool further includes: The development module is invoked to develop interfaces according to the first functional interface development specifications in the interface development document, thereby obtaining several interfaces to be tested that match the several required functional items respectively. Identify several first input parameter formats that match several first functional interface development specifications in the input parameter format database; call the parameter generation tool to generate several test input parameters that match several interfaces to be tested according to the several first input parameter formats; The development module is invoked to perform a test information assembly step based on several functional specification packages, several first input parameter formats, several test input parameters, and several interfaces to be tested, to obtain the interface test specification information. Configure the module to be encapsulated. After obtaining the interface test specification information, call the development module to encapsulate several interfaces to be tested into the module to be encapsulated, thereby obtaining the functional interface module.
3. The automated interface testing method for HIS according to claim 2, characterized in that: The test information assembly step includes: Define several interface call parameters corresponding to several functional specification packages as several first interface call parameters; identify the call hierarchy among the several first interface call parameters; Based on the call hierarchy, a number of first interfaces to be tested are identified from among the number of interfaces to be tested; based on the call hierarchy, a number of second interfaces to be tested that have a call relationship with the number of first interfaces to be tested are identified from among the number of interfaces to be tested. Among the several test input parameters, identify several first test input parameters that match several first interfaces to be tested respectively; call several first interfaces to be tested to parse several first test input parameters respectively to obtain several first test output parameters; Identify several first output parameter formats corresponding to several first test output parameters respectively; identify several second input parameter formats that match several second interfaces to be tested respectively among several first input parameter formats; set several second input parameter formats that match several first output parameter formats respectively as several sub-level parameter formats; The second interfaces to be tested, which correspond to the sub-level parameter formats respectively, are set as the sub-level interfaces corresponding to the first interfaces to be tested respectively. Based on the call hierarchy and several sub-level interfaces, several interface call chain information corresponding to several first interfaces to be tested are created; the several interface call chain information are packaged to obtain the interface test specification information.
4. The automated interface testing method for HIS according to claim 3, characterized in that: The interface testing operations include: Identify the test interface type and test parameters in the test requirements; set the interface to be tested in the functional interface module that matches the test interface type as the first business interface; confirm the first interface call chain information that matches the first business interface in the interface test specification information; Based on the first interface call chain information, the first sub-level interface of the first service interface is confirmed in the functional interface module; the test parameters are input to the first service interface, and the first service interface and the first sub-level interface are loaded; Identify the parameter parsing link between the first business interface and the first sub-level interface for the test parameters, and determine the correctness of the parameter parsing link based on the first interface call link information.
5. An automated interface testing system for HIS based on the automated interface testing method for HIS according to any one of claims 1 to 4, characterized in that, include: Documentation configuration module, interface encapsulation module, and interface debugging module; The document configuration module is used to obtain project functional requirements and configuration interface specification information, and the document configuration module configures interface development documents based on the project functional requirements and the interface specification information. The interface encapsulation module is used to configure the development module, input parameter format database, and parameter generation tool; the interface encapsulation module configures interface testing specification information and functional interface modules based on the interface development document, the development module, the input parameter format database, and the parameter generation tool; The interface debugging module is used to configure the test module and obtain test requirements; the interface debugging module performs interface test operations based on the interface test specification information, the functional interface module, the test module, and the test requirements.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the interface automation testing method for HIS as described in any one of claims 1 to 4.