CN112256532A - Test interface generation method and device, computer equipment and readable storage medium - Google Patents

Test interface generation method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN112256532A
CN112256532A CN202011246506.2A CN202011246506A CN112256532A CN 112256532 A CN112256532 A CN 112256532A CN 202011246506 A CN202011246506 A CN 202011246506A CN 112256532 A CN112256532 A CN 112256532A
Authority
CN
China
Prior art keywords
test
information
log
report
image
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.)
Pending
Application number
CN202011246506.2A
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.)
Shenzhen One Account Technology Co ltd
OneConnect Smart Technology Co Ltd
Original Assignee
Shenzhen One Account 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 Shenzhen One Account Technology Co ltd filed Critical Shenzhen One Account Technology Co ltd
Priority to CN202011246506.2A priority Critical patent/CN112256532A/en
Publication of CN112256532A publication Critical patent/CN112256532A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • 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
    • 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/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of computer testing, and discloses a test interface generation method, a test interface generation device, computer equipment and a readable storage medium, wherein the test interface generation method comprises the following steps: acquiring configuration information of the test object and description information of the test case; acquiring a system log generated by the test system for testing the test object; capturing a screen of a page with errors in the execution of the test case of the test object to obtain a test image; and loading the configuration information, the description information, the system log and the test image to the test report to generate a test interface. The invention also relates to a blockchain technique, where information can be stored in blockchain nodes. The invention is beneficial to improving the information acquisition efficiency and the comprehensiveness of the acquired information of the testers, and is further beneficial to improving the efficiency of identifying errors and checking defects of the testers.

Description

Test interface generation method and device, computer equipment and readable storage medium
Technical Field
The invention relates to the technical field of test management of computer test, in particular to a test interface generation method and device, computer equipment and a readable storage medium.
Background
The test report generated by testing the test object through the test case is usually displayed in html (hypertext markup language), and the test passing rate and the test failure rate can be seen in a very intuitive mode.
However, the inventor finds that the test report generated by the current test system can only show the test result to the tester, and cannot visually show which test object is tested by the test system under which test environment, the purpose of testing the test object by using the test case is achieved, the problems encountered during the test of the test system, the specific details of the events and the like, and the positions of the errors and the defects in the process of testing the test object are detected, so that the tester cannot quickly know the positions of the errors and the defects, and the efficiency of identifying the errors and troubleshooting the defects is low.
Disclosure of Invention
The invention aims to provide a test interface generation method, a test interface generation device, computer equipment and a readable storage medium, which are used for solving the problems that the positions of errors and defects cannot be quickly known, and further the efficiency of identifying errors and checking the defects is low in the prior art.
In order to achieve the above object, the present invention provides a test interface generating method, including:
acquiring configuration information of the test object and description information of the test case through a preset information plug-in;
acquiring a system log generated by the test system for testing the test object through a preset log collector;
capturing a screen of a page with errors in the execution of the test case of the test object to obtain a test image;
and loading the configuration information, the description information, the system log and the test image to the test report to generate a test interface.
In the above scheme, before the configuration information of the test object and the description information of the test case are acquired through a preset information plugin, the method includes:
and triggering a test report generated by testing the test object through the test case by the test system.
In the above scheme, the creating of the information plug-in includes:
creating a keyword inheritance algorithm associated with the test object, and triggering the configuration inheritance algorithm to the test report so as to acquire the configuration information of the test object;
and creating a unit inheritance algorithm associated with the test case, and triggering the unit inheritance method to the test report so as to acquire the description information of the test case.
In the above solution, the creating the log collector by the following steps includes:
creating a log collector, and setting an output format consistent with a system log of the test system in the log collector;
and creating an information channel between the log collector and an event log manager of the test system, and enabling the log collector to acquire system logs from the event log manager through the information channel, wherein the event log manager is a computer module for recording the system logs generated by the test system.
In the above scheme, after obtaining a system log generated by the test system testing the test object, the method further includes:
identifying results of the test report, the results including test success and test failure;
and if the result is that the test is successful, loading the configuration information, the description information and the system log to the test report to generate a test interface.
In the foregoing solution, the step of identifying the result of the test report includes:
acquiring defect error information from the test report through a regular expression;
judging whether the defect error information is null or not;
if so, judging that the result of the test report is successful;
if not, judging that the result of the test report is test failure.
In the above scheme, the step of obtaining the test image by performing screenshot on the page where the test object has the error in executing the test case includes:
controlling the test system to display the page with errors in the process of testing the test object through the test case;
calling a screenshot tool to shoot the page to obtain a test image;
after the screenshot tool is called to shoot the page to obtain a test image, the method further comprises the following steps:
uploading the test image into a blockchain.
In order to achieve the above object, the present invention further provides a test interface generating apparatus, including:
the configuration description module is used for acquiring the configuration information of the test object and the description information of the test case through a preset information plug-in;
the log collection module is used for acquiring a system log generated by the test system for testing the test object through a preset log collector;
the image screenshot module is used for screenshot the page with the error of the test object in the test case to obtain a test image;
and the interface generating module is used for loading the configuration information, the description information, the system log and the test image to the test report to generate a test interface.
In order to achieve the above object, the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor of the computer device implements the steps of the test interface generating method when executing the computer program.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the test interface generating method.
According to the test interface generation method, the test interface generation device, the computer equipment and the readable storage medium, the test interface is generated by loading the obtained configuration information, the description information, the system log and the test image into the test report, so that the test interface is beneficial to improving the information acquisition efficiency of testers and the comprehensiveness of the acquired information, and is further beneficial to improving the efficiency of identifying errors and troubleshooting defects of the testers.
Drawings
FIG. 1 is a flowchart of a first embodiment of a test interface generation method according to the present invention;
FIG. 2 is a flowchart of a specific method of a test interface generation method according to a second embodiment of the test interface generation method of the present invention;
FIG. 3 is a schematic diagram of a program module of a third embodiment of a test interface generating apparatus according to the present invention;
fig. 4 is a schematic diagram of a hardware structure of a computer device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. 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.
The invention provides a test interface generation method, a test interface generation device, computer equipment and a readable storage medium, which are suitable for the technical field of test management of computer tests and provide a test interface generation method based on a configuration description module, a log collection module, an image screenshot module and an interface generation module. The method comprises the steps of obtaining configuration information of the test object and description information of the test case, obtaining a system log generated by the test system when the test object is tested, carrying out screenshot on a page of the test object with an error in the execution of the test case to obtain a test image, and loading the configuration information, the description information, the system log and the test image to the test report to generate a test interface.
The first embodiment is as follows:
referring to fig. 1, a method for generating a test interface according to the present embodiment includes:
s102: and acquiring the configuration information of the test object and the description information of the test case through a preset information plug-in.
S103: and acquiring a system log generated by the test system for testing the test object through a preset log collector.
S106: and performing screenshot on the page with the error of the test object in the test case to obtain a test image.
S107: and loading the configuration information, the description information, the system log and the test image to the test report to generate a test interface.
In this embodiment, the configuration information of the test object and the description information of the test case are acquired through the information plug-in, so that a tester can know which test object is currently tested by the test system through the configuration information and the description information, and the information acquisition efficiency of the tester is improved.
The system log generated by the test system for testing the test object is obtained through the log collector, and the specific details of the test system for testing the test object are recorded in detail in the system log, so that a tester can conveniently obtain the specific details through the system log.
And screenshot is carried out on the process of testing the test object through the test case by using a screenshot tool, so that a test image of a specific position where an error or a defect occurs when the test case is executed by a tester can be directly obtained, and the technical effect of reminding the error and the position where the defect is reported is further realized.
Generating a test interface by loading the configuration information, the description information, the system log and the test image into the test report, so that the configuration information, the description information, the system log and the test image are completely embodied in the test report,
the testing personnel can know which test is carried out on which test object under which test environment by the test system through the configuration information in the test interface; the purpose that the test system tests the test object through the test case is obtained through the description information in the test interface; through a system log in a test interface, specific details such as problems encountered and events occurring when a test system performs testing are obtained, and then a code running track of a test object is obtained, and when a test case fails, a tester can quickly locate the cause of a defect through the system log, so that a large amount of time for finding the defect is saved, and the working efficiency is improved; through the test image in the test interface, the positions of errors and defects in the process of testing the test object are obtained, and a tester can quickly position which page of the test object has a problem, so that the errors and the defects are quickly locked.
In conclusion, the obtained test interface is beneficial to improving the information acquisition efficiency of the tester and the comprehensiveness of the acquired information, and is further beneficial to improving the efficiency of identifying errors and checking defects of the tester.
Example two:
the embodiment is a specific application scenario of the first embodiment, and the method provided by the present invention can be more clearly and specifically explained through the embodiment.
The method provided by this embodiment will be specifically described below by taking as an example that, in a server running a test interface generation method, the obtained configuration information, description information, system log, and test image are loaded to the test report generation test interface. It should be noted that the present embodiment is only exemplary, and does not limit the protection scope of the embodiments of the present invention.
Fig. 2 is a flowchart of a specific method of a test interface generation method according to an embodiment of the present invention, where the method specifically includes steps S201 to S207.
S201: triggering a test report generated by testing the test object through the test case in the test system;
in order to avoid interfering with the normal test work of the test system on the test object, the step sets a server running a test interface generation method as a trigger to a test report generated by the test system testing the test object through a test case;
the test interface generation method can be operated after the test system tests the test object, thereby avoiding the interference to the test work and ensuring the stability of the test system.
S202: and acquiring the configuration information of the test object and the description information of the test case through a preset information plug-in.
In order to ensure that a tester can quickly know which test object is tested by the test system, the configuration information of the test object and the description information of the test case are obtained through the information plug-in unit, so that the tester can know which test object is tested by the test system through the configuration information and the description information, and the information obtaining efficiency of the tester is improved.
In a preferred embodiment, the information plug-in is created by the steps comprising:
s21: and creating a keyword inheritance algorithm associated with the test object, and triggering the configuration inheritance algorithm to the test report so as to acquire the configuration information of the test object.
Creating a keyword inheritance algorithm in the context, and setting a keyword used for being associated with the test object in the keyword inheritance algorithm, so that the keyword inheritance algorithm can inherit the specified information in the test object through the keyword to realize the association with the test object;
illustratively, the keywords configured by the keyword inheritance algorithm include config and prefix, and the keyword inheritance algorithm identifies the code with config in the test object, such as: obtaining configuration information "xxx" of the configuration code; meanwhile, the keyword inheritance algorithm also identifies codes with prefix in the test object, such as: prefix.extend ([ html.p ("department of ownership: xxx") ]); and acquiring configuration information 'department to which the code belongs: xxx' in the code.
In this embodiment, the keyword inheritance algorithm is decorated by a python decorator to avoid the keyword inheritance algorithm from affecting the execution of the main program of the test system, for example: mark.
S22: and creating a unit inheritance algorithm associated with the test case, and triggering the unit inheritance method to the test report so as to acquire the description information of the test case.
Creating a unit inheritance algorithm in conttest.py, and setting a designated position for associating with the test case in the keyword inheritance algorithm, so that the unit inheritance algorithm can inherit information corresponding to the designated position in the test case through the designated position to realize association with the test case;
illustratively, the designated positions configured by the unit inheritance algorithm comprise (1,2), the information corresponding to the designated positions is description information describing the test cases, and the unit inheritance algorithm identifies the designated positions in the test cases and obtains information "normal new product series codes" corresponding to the designated positions as the description information.
In this embodiment, the unit inheritance algorithm is decorated by a python decorator to avoid the unit inheritance algorithm from affecting the execution of the main program of the test system, such as: mark
S203: and acquiring a system log generated by the test system for testing the test object through a preset log collector.
In order to enable a tester to know the problems encountered when the test system performs the test, the specific details of the events and the like, the log collector is used for acquiring the system log generated by the test system for testing the test object, and the specific details of the test system for testing the test object are recorded in the system log in detail, so that the tester can conveniently acquire the specific details through the system log.
In a preferred embodiment, the log collector is created by the steps comprising:
s31: and creating a log collector, and setting an output format consistent with the system log of the test system in the log collector.
S32: and creating an information channel between the log collector and an event log manager of the test system, and enabling the log collector to acquire system logs from the event log manager through the information channel, wherein the event log manager is a computer module for recording the system logs generated by the test system.
In this embodiment, fileteam, which is a computer program for defining and collecting log files where to monitor, may be used as the log collector.
The parameters of the log collector include at least:
paths for specifying logs to be monitored;
encoding for specifying the Encoding type of the monitored file;
the technical effects of identifying the event log manager of the test system and creating an information channel connecting the log collector and the event log manager of the test system are achieved through the Paths and Encoding.
And the input _ type is used for specifying the input type of the file so as to realize the technical effect of setting an output format consistent with the system log of the test system in the log collector.
S204: identifying results of the test report, the results including test success and test failure.
In order to avoid the problems that the operation burden of the server is large due to frequent screenshot of the test process which is successful in testing, and the memory consumption of the server is too large due to the fact that a subsequently generated test interface is large, the test report is distinguished by identifying the result of the test report in the step, so that the process of subsequently generating the test interface is facilitated, the test report which is successful in testing and the test report which is failed in testing can be distinguished, and the operation burden and the memory consumption of the server are reduced.
In a preferred embodiment, the step of identifying the result of the test report includes:
s41: and acquiring defect error information from the test report through the regular expression.
In this step, the regular expression corresponding to the metadata of the defect information and the error information in the test report is set
And acquiring defect information and error information from the test report and combining the defect information and the error information into defect error information.
S42: and judging whether the defect error information is empty or not.
In this step, if the defect error information is null, it indicates that the result of the test report is successful, so that the whole process of testing the test object by the test case is not required to be subjected to screenshot, and only the corresponding successful result is fed back according to the test report, thereby avoiding the situation that the computational burden of the test system is increased because the successful test report still needs to be subjected to screenshot.
S43: and if so, judging that the result of the test report is successful.
S44: if not, judging that the result of the test report is test failure.
S205: and if the result is that the test is successful, loading the configuration information, the description information and the system log to the test report to generate a test interface.
Because testers do not need to know the testing process corresponding to the testing report with successful testing, once the testing result is successful, the configuration information, the description information and the system log are directly loaded to the testing report to generate a testing interface, and the testing process does not need to be subjected to screenshot and loaded into the testing interface, so that the operation burden and the memory consumption of the server are reduced.
S206: and if the result is test failure, performing screenshot on the page with the error of the test object in the test case to obtain a test image.
In order to enable a tester to quickly know which part of the test object has errors or defects in the process of testing the test object through the test case, the process of testing the test object through the test case is subjected to screenshot through the screenshot tool, so that a test image of the specific position where the tester can directly know the errors or the defects occur when the test case is executed by the test object is obtained, and the technical effect of reminding the error reporting positions of the errors and the defects is achieved.
In a preferred embodiment, the step of obtaining a test image by screenshot of a page where the test object has an error in executing a test case includes:
s61: controlling the test system to display the page with errors in the process of testing the test object through the test case;
it should be noted that, because the test system has a function of identifying a faulty page, which belongs to the prior art, and the technical problem to be solved in this step is how to obtain the faulty page and directly and quickly feed it back to the tester, the specific implementation of this function is not described herein again.
S62: and calling a screenshot tool to shoot the page to obtain a test image.
In this embodiment, since the test system has the recognition
Screenshot software or plug-ins such as Fireshot, Screen Capture, Droplr, Hyper Snap DX and the like are adopted as the screenshot tool.
Further, the error page is decorated by a python decorator to be subjected to screenshot to obtain an algorithm of a test image, so that the algorithm is prevented from influencing the execution of a main program of the test system, for example: mark.
Optionally, after the screenshot tool is called to shoot the page to obtain the test image, the method further includes:
uploading the test image into a blockchain.
It should be noted that the corresponding summary information is obtained based on the test image, and specifically, the summary information is obtained by hashing the test image, for example, by using the sha256s algorithm. Uploading summary information to the blockchain can ensure the safety and the fair transparency of the user. The user equipment can download the summary information from the blockchain so as to verify whether the test image is tampered. The blockchain referred to in this example is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
S207: and loading the configuration information, the description information, the system log and the test image to the test report to generate a test interface.
In order to enable a tester to obtain a test report from an interface, and to know which test is performed by a test system on which test object under which test environment, to know specific details of problems and events encountered during the test of the test system, and to know the positions of errors and defects in the process of testing the test object, the step loads the configuration information, the description information, the system log, and the test image to the test report to generate the test interface, so that the configuration information, the description information, the system log, and the test image are completely embodied in the test report.
Namely: the tester knows which test object is tested by the test system under which test environment through the configuration information in the test interface;
the purpose that the test system tests the test object through the test case is obtained through the description information in the test interface;
through a system log in a test interface, specific details such as problems encountered and events occurring when a test system performs testing are obtained, and then a code running track of a test object is obtained, and when a test case fails, a tester can quickly locate the cause of a defect through the system log, so that a large amount of time for finding the defect is saved, and the working efficiency is improved;
through the test image in the test interface, the positions of errors and defects in the process of testing the test object are obtained, and a tester can quickly position which page of the test object has a problem, so that the errors and the defects are quickly locked.
In conclusion, the obtained test interface is beneficial to improving the information acquisition efficiency of the tester and the comprehensiveness of the acquired information by the tester, and further beneficial to improving the efficiency of identifying errors and checking defects by the tester.
In this embodiment, the configuration information and the description information are loaded into the test report through an insert function.
And outputting the system log to the test report through the log collector to achieve the technical effect of loading the system log into the test report.
The img elements are created in the test report, the paths of the img elements and the length and the width of the pictures are set, and then the test image is inserted into the test report, so that the technical effect of loading the test image into the test report is achieved.
Example three:
referring to fig. 3, a test interface generating apparatus 1 of the present embodiment includes:
the configuration description module 12 is configured to obtain configuration information of the test object and description information of the test case through a preset information plugin;
a log collection module 13, configured to obtain, through a preset log collector, a system log generated by the test system testing the test object;
the image screenshot module 16 is configured to screenshot a page where the test object has an error in executing a test case to obtain a test image;
and an interface generating module 17, configured to load the configuration information, the description information, the system log, and the test image into the test report to generate a test interface.
Optionally, the test interface generating apparatus 1 further includes:
the trigger setting module 11 is configured to trigger a test report generated by the test system testing the test object through the test case.
Optionally, the test interface generating apparatus 1 further includes:
and a result identification module 14 for identifying the result of the test report, wherein the result comprises test success and test failure.
Optionally, the test interface generating apparatus 1 further includes:
and a successful interface generating module 15, configured to load the configuration information, the description information, and the system log into the test report to generate a test interface when the result is that the test is successful.
The technical scheme is applied to the technical field of test management of computer tests, the system log generated by the test system for testing the test object is obtained by obtaining the configuration information of the test object and the description information of the test case, the page of the test object with errors in the execution of the test case is captured to obtain a test image, and the configuration information, the description information, the system log and the test image are loaded to the test report to generate a test interface, so that the test interface is beneficial to improving the information obtaining efficiency of testers and the comprehensiveness of the obtained information, and further the improvement of the test flow is realized.
Example four:
in order to achieve the above object, the present invention further provides a computer device 2, where components of the test interface generating apparatus 1 according to the third embodiment may be dispersed in different computer devices, and the computer device 2 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster formed by multiple application servers) that executes a program, and the like. The computer device of the embodiment at least includes but is not limited to: a memory 21, a processor 22, which may be communicatively coupled to each other via a system bus, as shown in FIG. 4. It should be noted that fig. 4 only shows a computer device with components, but it should be understood that not all of the shown components are required to be implemented, and more or fewer components may be implemented instead.
In the present embodiment, the memory 21 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 21 may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the memory 21 may also include both internal and external storage devices of the computer device. In this embodiment, the memory 21 is generally used for storing an operating system and various application software installed in the computer device, for example, the program code of the test interface generating apparatus in the third embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the computer device. In this embodiment, the processor 22 is configured to run the program codes stored in the memory 21 or process data, for example, run the test interface generating device, so as to implement the test interface generating methods of the first embodiment and the second embodiment.
Example five:
to achieve the above objects, the present invention also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by the processor 22, implements corresponding functions. The computer-readable storage medium of the present embodiment is used for storing a test interface generation apparatus, and when executed by the processor 22, implements the test interface generation method of the first embodiment and the second embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A test interface generation method is characterized by comprising the following steps:
acquiring configuration information of the test object and description information of the test case through a preset information plug-in;
acquiring a system log generated by the test system for testing the test object through a preset log collector;
capturing a screen of a page with errors in the execution of the test case of the test object to obtain a test image;
and loading the configuration information, the description information, the system log and the test image to the test report to generate a test interface.
2. The method according to claim 1, wherein before the configuration information of the test object and the description information of the test case are acquired by a preset information plugin, the method includes:
and triggering a test report generated by testing the test object through the test case by the test system.
3. The test interface generation method of claim 1, wherein the creating of the information plug-in by the steps comprising:
creating a keyword inheritance algorithm associated with the test object, and triggering the configuration inheritance algorithm to the test report so as to acquire the configuration information of the test object;
and creating a unit inheritance algorithm associated with the test case, and triggering the unit inheritance method to the test report so as to acquire the description information of the test case.
4. The test interface generation method of claim 1, wherein creating the log collector by:
creating a log collector, and setting an output format consistent with a system log of the test system in the log collector;
and creating an information channel between the log collector and an event log manager of the test system, and enabling the log collector to acquire system logs from the event log manager through the information channel, wherein the event log manager is a computer module for recording the system logs generated by the test system.
5. The method according to claim 1, wherein after obtaining a system log generated by the test system testing the test object, the method further comprises:
identifying results of the test report, the results including test success and test failure;
and if the result is that the test is successful, loading the configuration information, the description information and the system log to the test report to generate a test interface.
6. The method of claim 5, wherein the step of identifying the results of the test report comprises:
acquiring defect error information from the test report through a regular expression;
judging whether the defect error information is null or not;
if so, judging that the result of the test report is successful;
if not, judging that the result of the test report is test failure.
7. The method for generating the test interface according to claim 1, wherein the step of obtaining the test image by capturing the page where the test object has the error in the execution of the test case includes:
controlling the test system to display the page with errors in the process of testing the test object through the test case;
calling a screenshot tool to shoot the page to obtain a test image;
after the screenshot tool is called to shoot the page to obtain a test image, the method further comprises the following steps:
uploading the test image into a blockchain.
8. A test interface generating apparatus, comprising:
the configuration description module is used for acquiring the configuration information of the test object and the description information of the test case through a preset information plug-in;
the log collection module is used for acquiring a system log generated by the test system for testing the test object through a preset log collector;
the image screenshot module is used for screenshot the page with the error of the test object in the test case to obtain a test image;
and the interface generating module is used for loading the configuration information, the description information, the system log and the test image to the test report to generate a test interface.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the test interface generation method according to any one of claims 1 to 7 are implemented by the processor of the computer device when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, the computer program stored in the computer-readable storage medium, when being executed by a processor, implementing the steps of the test interface generation method according to any one of claims 1 to 7.
CN202011246506.2A 2020-11-10 2020-11-10 Test interface generation method and device, computer equipment and readable storage medium Pending CN112256532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011246506.2A CN112256532A (en) 2020-11-10 2020-11-10 Test interface generation method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011246506.2A CN112256532A (en) 2020-11-10 2020-11-10 Test interface generation method and device, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN112256532A true CN112256532A (en) 2021-01-22

Family

ID=74265203

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011246506.2A Pending CN112256532A (en) 2020-11-10 2020-11-10 Test interface generation method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112256532A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988590A (en) * 2021-04-01 2021-06-18 中车青岛四方机车车辆股份有限公司 Electromagnetic environment hybrid automatic testing method and system, storage medium and terminal equipment
WO2023277802A3 (en) * 2021-07-01 2023-02-02 Shopee Singapore Private Limited Device and method for identifying errors in a software application

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988590A (en) * 2021-04-01 2021-06-18 中车青岛四方机车车辆股份有限公司 Electromagnetic environment hybrid automatic testing method and system, storage medium and terminal equipment
WO2023277802A3 (en) * 2021-07-01 2023-02-02 Shopee Singapore Private Limited Device and method for identifying errors in a software application

Similar Documents

Publication Publication Date Title
CN112631913B (en) Method, device, equipment and storage medium for monitoring operation faults of application program
CN110134658B (en) Log monitoring method, device, computer equipment and storage medium
CN107329894B (en) Application program system testing method and device and electronic equipment
CN113176978B (en) Monitoring method, system, equipment and readable storage medium based on log file
CN112039900B (en) Network security risk detection method, system, computer device and storage medium
WO2019169760A1 (en) Test case range determining method, device, and storage medium
US10657028B2 (en) Method for replicating production behaviours in a development environment
US9164857B2 (en) Scalable structured data store operations
CN114077525A (en) Abnormal log processing method and device, terminal equipment, cloud server and system
CN112256532A (en) Test interface generation method and device, computer equipment and readable storage medium
CN113672456A (en) Modular self-monitoring method, system, terminal and storage medium of application platform
CN112269744A (en) System abnormity testing method and device, computer equipment and storage medium
CN110647471A (en) Interface test case generation method, electronic device and storage medium
CN110543420A (en) Software testing method, system, terminal and storage medium
CN109582504A (en) A kind of data reconstruction method and device for apple equipment
EP3514680B1 (en) Identification of changes in functional behavior and runtime behavior of a system during maintenance cycles
CN111858605B (en) Database automation auditing method, system, equipment and storage medium
CN110069382B (en) Software monitoring method, server, terminal device, computer device and medium
CN111143347A (en) Object storage data consistency test method, system, terminal and storage medium
CN116599881A (en) Cloud platform tenant modeling test method, device, equipment and storage medium
CN114780412A (en) Page testing method, system, device and medium
CN109933351A (en) A kind of method and apparatus of reparation and upgrading linux system
CN112131090B (en) Service system performance monitoring method, device, equipment and medium
CN113918204A (en) Metadata script management method and device, electronic equipment and storage medium
CN111444093B (en) Method and device for determining quality of project development process and computer equipment

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