CN110865932A - Program internal interface testing method, system, terminal and storage medium - Google Patents

Program internal interface testing method, system, terminal and storage medium Download PDF

Info

Publication number
CN110865932A
CN110865932A CN201910923284.4A CN201910923284A CN110865932A CN 110865932 A CN110865932 A CN 110865932A CN 201910923284 A CN201910923284 A CN 201910923284A CN 110865932 A CN110865932 A CN 110865932A
Authority
CN
China
Prior art keywords
interface
information
interface information
actual
type
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.)
Withdrawn
Application number
CN201910923284.4A
Other languages
Chinese (zh)
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.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology 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 Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910923284.4A priority Critical patent/CN110865932A/en
Publication of CN110865932A publication Critical patent/CN110865932A/en
Withdrawn legal-status Critical Current

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/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler
    • 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

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)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method, a system, a terminal and a storage medium for testing an internal interface of a program, wherein the method comprises the following steps: reading actual interface information in the product source code submission information; collecting requirement interface information in a user requirement document; and comparing the actual interface information with the required interface information, and if the actual interface information and the required interface information are consistent, the test is passed. The invention can greatly facilitate the engineer to find the problem inconsistent with the client requirement during testing, quickly position the problem and solve the problem.

Description

Program internal interface testing method, system, terminal and storage medium
Technical Field
The invention relates to the technical field of software product testing, in particular to a method, a system, a terminal and a storage medium for testing a program internal interface.
Background
At present, software products and manufacturers are in the same place in the software market. However, customers do not have to use only the applications of the SaaS (application) layer of a certain manufacturer, but want to provide a platform and then integrate some advantageous functions of each manufacturer for use, that is, customer requirements are shifted to the PaaS (platform) layer. Namely, the client defined interface name, the pass parameter type, and the return result type. For the requirements of such customers, the software product is tested by manual review and manual verification. However, the manual rechecking method requires a lot of manpower and time, and the accuracy of the manual rechecking cannot be guaranteed by 100%, so that the efficiency is extremely low.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, a system, a terminal and a storage medium for testing an internal interface of a program, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a method for testing an internal interface of a program, including:
reading actual interface information in the product source code submission information;
collecting requirement interface information in a user requirement document;
and comparing the actual interface information with the required interface information, and if the actual interface information and the required interface information are consistent, the test is passed.
Further, the reading of the actual interface information in the product source code submission information includes:
reading page code submission information of the git code;
acquiring an interface type, a parameter transmission type and a return result type in the submitted information;
and importing the interface type, the parameter transmission type and the return result type into an Excel table.
Further, the collecting requirement interface information in the user requirement document includes:
judging whether the Excel table has data or not:
if yes, importing the read demand interface information into the Excel table;
otherwise, outputting a test exception prompt.
Further, the comparing the actual interface information and the required interface information includes:
comparing the actual interface information with the required interface information in the Excel table;
highlighting the interface information items with inconsistent interface information items;
and printing the highlighted interface information item to a test log.
In a second aspect, the present invention provides a system for testing an internal interface of a program, including:
the actual reading unit is configured for reading actual interface information in the product source code submission information;
the system comprises a demand acquisition unit, a data processing unit and a data processing unit, wherein the demand acquisition unit is configured to acquire demand interface information in a user demand document;
and the interface comparison unit is configured for comparing the actual interface information with the required interface information, and if the actual interface information and the required interface information are consistent in content, the test is passed.
Further, the actual reading unit includes:
the code reading module is configured for reading page code submission information of the git code;
the interface acquisition module is configured to acquire an interface type, a parameter transmission type and a return result type in the submitted information;
and the information import module is configured for importing the interface type, the transmission parameter type and the return result type into an Excel table.
Further, the demand collection unit includes:
the data judgment module is configured for judging whether data exist in the Excel table or not;
the interface import module is configured to import the read required interface information into the Excel table;
and the abnormity prompting module is configured for outputting a test abnormity prompt.
Further, the interface comparison unit includes:
the information comparison module is used for comparing the actual interface information and the required interface information in the Excel table;
the highlighting module is configured to highlight the interface information items which are inconsistent;
and the information printing module is configured to print the highlighted interface information item to the test log.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the program internal interface testing method, the system, the terminal and the storage medium provided by the invention read the git codes, and obtain the interface information by obtaining the page code submission information of git when the code of a developer is submitted; reading a document, and acquiring interface information by reading a requirement document provided by a client; and comparing the interface information obtained twice to test whether the product interface information is completely consistent with the customer requirements. The invention can greatly facilitate the engineer to find the problem inconsistent with the client requirement during testing, quickly position the problem and solve the problem.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The execution subject in fig. 1 may be a program internal interface test system.
As shown in fig. 1, the method 100 includes:
step 110, reading actual interface information in the product source code submission information;
step 120, collecting requirement interface information in a user requirement document;
and step 130, comparing the actual interface information with the required interface information, and if the actual interface information and the required interface information are consistent, the test is passed.
Optionally, as an embodiment of the present invention, the reading of the actual interface information in the product source code submission information includes:
reading page code submission information of the git code;
acquiring an interface type, a parameter transmission type and a return result type in the submitted information;
and importing the interface type, the parameter transmission type and the return result type into an Excel table.
Optionally, as an embodiment of the present invention, the acquiring requirement interface information in the user requirement document includes:
judging whether the Excel table has data or not:
if yes, importing the read demand interface information into the Excel table;
otherwise, outputting a test exception prompt.
Optionally, as an embodiment of the present invention, the comparing the actual interface information and the required interface information includes:
comparing the actual interface information with the required interface information in the Excel table;
highlighting the interface information items with inconsistent interface information items;
and printing the highlighted interface information item to a test log.
In order to facilitate understanding of the present invention, the program internal interface testing method provided by the present invention is further described below with reference to the principle of the program internal interface testing method of the present invention and the process of testing the program internal interface in the embodiment.
Referring to fig. 2, the method for testing the program internal interface specifically includes:
and S1, reading the actual interface information in the product source code submission information.
Currently, software companies generally use git for code version control during product development.
In the embodiment, an Excel table is created and maintained through a readdevipper controller (a device for writing developer code data, which belongs to the reference of a source code level, inconsistent information is highlighted and written into a log at the same time), a git code is read, and when the code of a developer is submitted, the git page code submission information acquires an interface type, a parameter transmission type and a result return type. And importing the specific parameter values of the acquired interface type, the acquired transmission parameter type and the acquired return result type into an Excel table.
And S2, collecting the requirement interface information in the user requirement document.
Calling the ReadTXT controller to judge whether the Excel table finally output in the step S1 has data, and importing the requirement interface information read from the customer requirement document into the Excel table if the data has data. The requirement interface information read from the client requirement document also comprises three project parameters of an interface type, a parameter type and a return result type. When importing the Excel table, the above item parameter values need to be in one-to-one correspondence with the items in step S1. And if no data exists in the Excel table, outputting a test exception prompt.
And S3, comparing the actual interface information with the required interface information, and if the actual interface information and the required interface information are consistent, the test is passed.
And executing comparison operation, highlighting the interface comparison item with inconsistent parameter values in the Excel table, and further printing the highlighted item and corresponding parameter values into a test log, so that a tester can quickly position an interface which does not meet the requirements of customers.
As shown in fig. 3, the system 300 includes:
an actual reading unit 310 configured to read actual interface information in the product source code submission information;
the requirement acquisition unit 320 is configured to acquire requirement interface information in a user requirement document;
the interface comparison unit 330 is configured to compare the actual interface information with the required interface information, and if the actual interface information and the required interface information are consistent, the test is passed.
Optionally, as an embodiment of the present invention, the actual reading unit includes:
the code reading module is configured for reading page code submission information of the git code;
the interface acquisition module is configured to acquire an interface type, a parameter transmission type and a return result type in the submitted information;
and the information import module is configured for importing the interface type, the transmission parameter type and the return result type into an Excel table.
Optionally, as an embodiment of the present invention, the demand collection unit includes:
the data judgment module is configured for judging whether data exist in the Excel table or not;
the interface import module is configured to import the read required interface information into the Excel table;
and the abnormity prompting module is configured for outputting a test abnormity prompt.
Optionally, as an embodiment of the present invention, the interface comparing unit includes:
the information comparison module is used for comparing the actual interface information and the required interface information in the Excel table;
the highlighting module is configured to highlight the interface information items which are inconsistent;
and the information printing module is configured to print the highlighted interface information item to the test log.
Fig. 4 is a schematic structural diagram of a terminal system 400 according to an embodiment of the present invention, where the terminal system 400 may be used to execute the method for testing the program internal interface according to the embodiment of the present invention.
The terminal system 400 may include: a processor 410, a memory 420, and a communication unit 430. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 420 may be used for storing instructions executed by the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 420, when executed by processor 410, enable terminal 400 to perform some or all of the steps in the method embodiments described below.
The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 410 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 430, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Therefore, the invention reads the git code, and obtains the interface information by obtaining the page code submission information of git when the code of the developer is submitted; reading a document, and acquiring interface information by reading a requirement document provided by a client; and comparing the interface information obtained twice to test whether the product interface information is completely consistent with the customer requirements. The invention can greatly facilitate the engineer to find the problem inconsistent with the client requirement during the test, quickly position the problem and solve the problem, and the technical effect achieved by the embodiment can be referred to the description above, and is not repeated herein.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant points can be referred to the description in the method embodiment.
In the embodiments provided by the present invention, it should be understood that the disclosed system, system and method can be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, systems or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for testing an internal interface of a program is characterized by comprising the following steps:
reading actual interface information in the product source code submission information;
collecting requirement interface information in a user requirement document;
and comparing the actual interface information with the required interface information, and if the actual interface information and the required interface information are consistent, the test is passed.
2. The method for testing the program internal interface according to claim 1, wherein the reading of the actual interface information in the product source code submission information comprises:
reading page code submission information of the git code;
acquiring an interface type, a parameter transmission type and a return result type in the submitted information;
and importing the interface type, the parameter type and the return result type into an Exc el table.
3. The method for testing the program internal interface according to claim 2, wherein the collecting the requirement interface information in the user requirement document comprises:
judging whether the Exc el table has data or not:
if yes, importing the read required interface information into the Exc el table;
otherwise, outputting a test exception prompt.
4. The method according to claim 3, wherein the comparing the actual interface information with the required interface information comprises:
comparing the actual interface information with the required interface information in the Exc el table;
highlighting the interface information items with inconsistent interface information items;
and printing the highlighted interface information item to a test log.
5. A system for testing an internal program interface, comprising:
the actual reading unit is configured for reading actual interface information in the product source code submission information;
the system comprises a demand acquisition unit, a data processing unit and a data processing unit, wherein the demand acquisition unit is configured to acquire demand interface information in a user demand document;
and the interface comparison unit is configured for comparing the actual interface information with the required interface information, and if the actual interface information and the required interface information are consistent in content, the test is passed.
6. The system according to claim 5, wherein the actual reading unit comprises:
the code reading module is configured for reading page code submission information of the git code;
the interface acquisition module is configured to acquire an interface type, a parameter transmission type and a return result type in the submitted information;
and the information import module is configured for importing the interface type, the transmission parameter type and the return result type into an Excel table.
7. The system for testing an internal program interface of a computer system according to claim 6, wherein the requirement acquisition unit comprises:
the data judgment module is configured for judging whether data exist in the Excel table or not;
the interface import module is configured to import the read required interface information into the Excel table;
and the abnormity prompting module is configured for outputting a test abnormity prompt.
8. The system for testing an internal interface of a program according to claim 7, wherein the interface matching unit comprises:
the information comparison module is used for comparing the actual interface information and the required interface information in the Excel table;
the highlighting module is configured to highlight the interface information items which are inconsistent;
and the information printing module is configured to print the highlighted interface information item to the test log.
9. A terminal, comprising:
a processor;
a memory for storing instructions for execution by the processor;
wherein the processor is configured to perform the method of any one of claims 1-4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201910923284.4A 2019-09-27 2019-09-27 Program internal interface testing method, system, terminal and storage medium Withdrawn CN110865932A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910923284.4A CN110865932A (en) 2019-09-27 2019-09-27 Program internal interface testing method, system, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910923284.4A CN110865932A (en) 2019-09-27 2019-09-27 Program internal interface testing method, system, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN110865932A true CN110865932A (en) 2020-03-06

Family

ID=69652723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910923284.4A Withdrawn CN110865932A (en) 2019-09-27 2019-09-27 Program internal interface testing method, system, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110865932A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112652353A (en) * 2020-12-25 2021-04-13 中山市江波龙电子有限公司 Test method, test system and test carrier plate of storage device
CN113032245A (en) * 2021-02-26 2021-06-25 深圳壹账通创配科技有限公司 Error positioning identification test method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112652353A (en) * 2020-12-25 2021-04-13 中山市江波龙电子有限公司 Test method, test system and test carrier plate of storage device
CN113032245A (en) * 2021-02-26 2021-06-25 深圳壹账通创配科技有限公司 Error positioning identification test method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110597511B (en) Page automatic generation method, system, terminal equipment and storage medium
CN111104421A (en) Data query method and device based on data interface standard configuration
CN109271315B (en) Script code detection method, script code detection device, computer equipment and storage medium
CN110928802A (en) Test method, device, equipment and storage medium based on automatic generation of case
CN110554938A (en) BIOS (basic input output System) testing method, system, terminal and storage medium based on script set
CN110990276A (en) Automatic testing method and device for interface field and storage medium
CN114546738A (en) Server general test method, system, terminal and storage medium
CN110865932A (en) Program internal interface testing method, system, terminal and storage medium
CN112948233A (en) Interface testing method, device, terminal equipment and medium
CN110750434A (en) Interface testing method and device, electronic equipment and computer readable storage medium
CN109788052B (en) Server configuration remote query method, device, terminal and storage medium
CN109067605B (en) Storage subsystem fault diagnosis method and device, terminal and storage medium
CN111209736A (en) Text file analysis method and device, computer equipment and storage medium
CN111176917B (en) Method, system, terminal and storage medium for testing stability of CPU SST-BF function
CN111124772A (en) Cloud platform storage performance testing method, system, terminal and storage medium
CN112214384A (en) Hard disk serial number management method, system, terminal and storage medium
CN113254352B (en) Test case testing method, device, equipment and storage medium
CN112231159B (en) Memory installation position testing method, system, terminal and storage medium
CN114860608A (en) Scene construction based system automation testing method, device, equipment and medium
CN111752677B (en) Cloud resource configuration method, system, terminal and storage medium
CN109802866B (en) Network card SR-IOV function testing method, device, terminal and storage medium
CN114490238A (en) Method, system, terminal and storage medium for monitoring whole server diagnosis process
CN103383647A (en) Computer hardware configuration information acquiring system and method
CN111625459A (en) Application program testing method and device, computer equipment and storage medium
CN111611170A (en) Test 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200306