CN111209184A - Automatic testing method and device and electronic equipment - Google Patents

Automatic testing method and device and electronic equipment Download PDF

Info

Publication number
CN111209184A
CN111209184A CN201911326064.XA CN201911326064A CN111209184A CN 111209184 A CN111209184 A CN 111209184A CN 201911326064 A CN201911326064 A CN 201911326064A CN 111209184 A CN111209184 A CN 111209184A
Authority
CN
China
Prior art keywords
test
interface
case
test result
generate
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
CN201911326064.XA
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.)
Beijing Youfu Computer Technology Co Ltd
Original Assignee
Beijing Youfu Computer 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 Beijing Youfu Computer Technology Co Ltd filed Critical Beijing Youfu Computer Technology Co Ltd
Priority to CN201911326064.XA priority Critical patent/CN111209184A/en
Publication of CN111209184A publication Critical patent/CN111209184A/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/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

Abstract

The disclosure relates to an automated testing method, an automated testing device, an electronic device and a computer readable medium. A test for system under test, system under test includes front end and rear end, the front end pass through the interface with the rear end is connected, includes: configuring test parameters; generating a front-end test case and an interface test case based on the test parameters; performing front-end test of the system to be tested based on the front-end test case to generate a front-end test result; performing interface test of the system to be tested based on the interface test case to generate an interface test result; and comparing the front-end test result with the interface test result to generate a system test result. The disclosure relates to an automatic testing method, an automatic testing device, electronic equipment and a computer readable medium, which can realize the whole automatic testing process of software, improve the automatic testing efficiency and quickly position problems through the automatic combination of a front end and a back end.

Description

Automatic testing method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to an automated testing method, an automated testing device, an electronic device, and a computer-readable medium.
Background
The System test (System Testing) is a test for the whole System, and the hardware, software and operator are regarded as a whole to check whether the System test has a place which does not conform to the System specification. Such testing may discover errors in system analysis and design. If the safety test is to test whether the safety measures are perfect, the system can not be ensured not to be illegally invaded. For another example, the stress test is to test whether the system can still work normally under normal data volume and overload volume (such as simultaneous access by multiple users).
Front-end testing is a method of verifying whether the code of a system program can work as expected. The object under test may be a style, function, flow, component, etc. of the software system. Almost every software application retrieves or stores data at the back-end, which can be a server or a database, or both. The software application may store the data as a file on a server or in a tabular manner in an RDBMS (relational database management system) database. The back-end database may be SQL Server, MySQL, Oracle, Sybase, DB2, etc., which are capable of storing data and organizing the data in tables into records. Alternatively, there are databases, such as MongoDB, where data is stored as documents rather than organized as tables. The back-end test mainly refers to interface tests among various databases and the like.
In most of the existing software systems, the front-end test and the back-end test are respectively carried out and are respectively completed by two independent teams, and the mode of separating the front-end test and the back-end test results in low positioning efficiency of test problems.
Therefore, a new automated testing method, apparatus, electronic device and computer readable medium are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present disclosure provides an automated testing method, an automated testing device, an electronic device, and a computer-readable medium, which can implement an overall automated testing process of software, improve automated testing efficiency, and quickly locate a problem through automated combination of front and back ends.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, an automated testing method is provided for testing a system under test, where the system under test includes a front end and a back end, the front end is connected to the back end through an interface, and the method includes: configuring test parameters; generating a front-end test case and an interface test case based on the test parameters; performing front-end test of the system to be tested based on the front-end test case to generate a front-end test result; performing interface test of the system to be tested based on the interface test case to generate an interface test result; and comparing the front-end test result with the interface test result to generate a system test result.
Optionally, the comparing the front-end test result with the interface test result to generate a system test result includes: when the front-end test result is consistent with the interface test result, generating a test report; and/or locating a system problem based on the test result when the front-end test result is inconsistent with the interface test result.
Optionally, the method further comprises: generating a test case according to the test target; and compiling the test case to generate the front-end case and the interface case.
Optionally, compiling the test case to generate the front-end case and the interface case includes: and compiling the test case based on a python scripting language to generate the front-end case and the interface case.
Optionally, the method further comprises: and associating the front-end test case with the interface test case according to service logic.
Optionally, the associating the front-end test case and the interface test case according to a service logic includes: and associating the front page button with the corresponding calling interface according to the service logic matching table.
Optionally, when performing a front-end test and an interface test of the system to be tested, the front-end test and the interface test are performed in sequence according to the service logic.
Optionally, configuring the test parameters comprises: constructing an automatic test environment based on an Apdium automatic test framework; and configuring test parameters based on the automated test environment.
Optionally, generating a front-end test case and an interface test case based on the test parameters includes: and organizing the test parameters based on a unit frame test method to generate the front-end test case and the interface test case.
Optionally, generating a front-end test case and an interface test case based on the test parameters includes: bringing the test parameters into the front-end use case to generate the front-end test case; and bringing the test parameters into the interface use case to generate the interface test use case.
According to an aspect of the present disclosure, an automatic testing apparatus is provided for testing a system under test, the system under test includes a front end and a rear end, the front end is connected to the rear end through an interface, the apparatus includes: the configuration module is used for configuring test parameters; the case module is used for generating a front-end test case and an interface test case based on the test parameters; the front-end test module is used for carrying out front-end test on the system to be tested based on the front-end test case to generate a front-end test result; the interface test module is used for carrying out interface test on the system to be tested based on the interface test case to generate an interface test result; and the comparison module is used for comparing the front-end test result with the interface test result to generate a system test result.
Optionally, the alignment module comprises: the report unit is used for generating a test report when the front-end test result is consistent with the interface test result; and/or a positioning unit, configured to position a system problem based on the test result when the front-end test result is inconsistent with the interface test result.
Optionally, the method further comprises: the compiling module is used for generating a test case according to the test target; and compiling the test case to generate the front-end case and the interface case.
Optionally, the compiling module is further configured to compile the test case based on a python scripting language to generate the front-end case and the interface case.
Optionally, the method further comprises: and the association module is used for associating the front-end test case with the interface test case according to service logic.
Optionally, the associating module is further configured to associate the front-end page button with the corresponding calling interface according to the service logic matching table.
Optionally, when performing a front-end test and an interface test of the system to be tested, the front-end test and the interface test are performed in sequence according to the service logic.
Optionally, the configuration module includes: the environment unit is used for constructing an automatic test environment based on the Apium automatic test framework; and the configuration unit is used for configuring the test parameters based on the automatic test environment.
Optionally, the use case module is further configured to organize the test parameters based on a unit framework test method to generate the front-end test case and the interface test case.
Optionally, the use case module includes: the front-end unit is used for bringing the test parameters into the front-end use case to generate the front-end test use case; and the interface unit is used for bringing the test parameters into the interface use case to generate the interface test use case.
According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.
According to the automatic testing method, the automatic testing device, the electronic equipment and the computer readable medium, a front-end test case and an interface test case are generated based on the testing parameters; performing front-end test of the system to be tested based on the front-end test case to generate a front-end test result; performing interface test of the system to be tested based on the interface test case to generate an interface test result; and the front-end test result and the interface test result are compared to generate a system test result, so that the whole automatic test process of the software can be realized, the automatic test efficiency is improved, and the problem can be quickly positioned through the automatic combination of the front end and the back end.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
FIG. 1 is a system block diagram illustrating an automated testing method and apparatus according to an exemplary embodiment.
FIG. 2 is a flow diagram illustrating an automated testing method according to an exemplary embodiment.
FIG. 3 is a flow chart illustrating a method of automated testing according to another exemplary embodiment.
FIG. 4 is a block diagram illustrating an automated testing apparatus according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating an automated testing apparatus according to another exemplary embodiment.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 7 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
FIG. 1 is a system block diagram illustrating an automated testing method and apparatus according to an exemplary embodiment.
As shown in fig. 1, system architecture 10 may include terminal devices 101, 102, backend servers 103, 104, and network 105 and test server 106. The network 105 is used to provide a medium for communication links between the terminal devices 101, 102 and the backend servers 103, 104, the test server 106. Network 105 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal device 101, 102 to interact with the backend server 103, 104 over the network 105 to receive or send messages or the like. The terminal devices 101 and 102 may have various communication client applications installed thereon, such as a financial service application, a shopping application, a web browser application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The background servers 103 and 104 may be servers that provide various services, such as a background management server that supports financial services websites browsed by the users using the terminal devices 101 and 102. The background management server may perform processing such as analysis on the received user data, and feed back a processing result (e.g., a risk analysis result) to an administrator of the financial service website.
The test server 106 is configured to test a system formed by the terminal devices 101 and 102 and the background servers 103 and 104, and the test server 106 may configure test parameters, for example; the test server 106 may generate front-end test cases and interface test cases, for example, based on the test parameters; the test server 106 may perform a front-end test on the system to be tested, for example, based on the front-end test case, and generate a front-end test result; the test server 106 may perform an interface test of the system to be tested, for example, based on the interface test case, and generate an interface test result; test server 106 may, for example, compare the front-end test results to the interface test results to generate system test results.
The test server 106 may be a server of one entity, and may be composed of a plurality of servers, for example. It should be noted that the automated testing method provided by the embodiment of the present disclosure may be implemented by the testing server 106, and accordingly, the automated testing apparatus may be disposed in the testing server 106. And the functional end for providing the financial service platform browsing system for the user is generally located in the terminal equipment 101, 102 and the background server 103, 104.
FIG. 2 is a flow diagram illustrating an automated testing method according to an exemplary embodiment. The system to be tested includes a front end and a back end, the front end is connected to the back end through an interface, and the automated testing method 20 at least includes steps S202 to S210.
As shown in fig. 2, in S202, test parameters are configured. Can include the following steps: constructing an automatic test environment based on an Apdium automatic test framework; and configuring test parameters based on the automated test environment. The Appium is an open source, cross-platform testing framework that can be used to test native and hybrid mobile-end applications. The Apdium Server is a service end of the Apium, and one web interface service is realized by using node. The Appium Desktop is an open source application for Mac, Windows and Linux that provides you with the powerful functions of an Appium automation server with an aesthetically pleasing and flexible user interface.
In one embodiment, the app is a C/S structure, the app Clients are equivalent to Clients, the test parameters can be generated by a user through input on the Server-side app Clients, the app Clients take the test parameters as a request session, and the app Clients send the request session back to the app Server to execute the automation task. The appum client may be implemented using different languages such as Python, java, etc.
In the present disclosure, the program related to the appum client may be implemented by Python.
All languages supported by the Selenium Webdriver in the Apium, such as java, Object-C, JavaScript, Php, Python, Ruby, C #, Clojure, or Perl language, are supported, and the Api of the Selenium Webdriver can be used. The method is based on the mode that the Appeium is of a C/S structure, and all test tasks are realized based on request service, so that the Appeium client can be clients in different forms, and the Appeium clients can also work in a coordinated mode to jointly complete the test tasks, and the Appeium realizes real cross-platform automatic test.
In S204, a front-end test case and an interface test case are generated based on the test parameters. Can include the following steps: organizing the test parameters based on a unit frame test method (unittest) to generate the front-end test case and the interface test case.
Wherein unittest is a Python-self unit test framework for programming and running repeatable tests. PyUnit is mainly used for white box testing and regression testing. The unittest judges whether the actual output result of the function or the method is consistent with the expected output result or not based on an assertion mechanism, the test case provides parameters to execute the function or the method to obtain the execution result of the function or the method, then the assertion method is used for judging whether the output result of the function or the method is consistent with the expected output result or not, and if so, the test is passed; if not, the test is not passed.
The unit test framework can be suitable for unit test and development and execution of WEB automatic test cases, can organize and execute the test cases, provides rich assertion methods, judges whether the test cases pass or not, and finally generates a test result.
In one embodiment, generating the front-end test case and the interface test case based on the test parameters includes: bringing the test parameters into the front-end use case to generate the front-end test case; and bringing the test parameters into the interface use case to generate the interface test use case.
In one embodiment, further comprising: generating a test case according to the test target; and compiling the test case to generate the front-end case and the interface case.
Compiling the test case to generate the front-end case and the interface case comprises: and compiling the test case based on a python scripting language to generate the front-end case and the interface case. Python is a cross-platform computer programming language. Is an object-oriented dynamic type language, originally designed for writing automated scripts (shells), and is increasingly being used for the development of independent, large projects as versions are continually updated and new functionality in the language is added.
In S206, a front-end test of the system to be tested is performed based on the front-end test case, and a front-end test result is generated.
In one embodiment, further comprising: and associating the front-end test case with the interface test case according to service logic. Wherein, the associating the front-end test case and the interface test case according to the service logic comprises: and associating the front page button with the corresponding calling interface according to the service logic matching table.
In S208, an interface test of the system to be tested is performed based on the interface test case, and an interface test result is generated. And when the front-end test and the interface test of the system to be tested are carried out, sequentially carrying out the front-end test and the interface test according to the service logic.
In one embodiment, the front page buttons/links may be associated with the calling interface according to a matching table. That is, each front-end element test case is paired with a corresponding interface test case one by one, and the front-end case and the server-end case are sequentially executed, so that the integrity of the front-end and back-end tests is realized.
For example, when the front-end inputs data AAA, the background interface XXX needs to be called, and then the front-end AAA button and the background interface XXX are associated to be executed in sequence during the subsequent automation test.
In S210, the front-end test result is compared with the interface test result to generate a system test result.
In one embodiment, comparing the front-end test result with the interface test result to generate a system test result comprises: when the front-end test result is consistent with the interface test result, generating a test report; and/or locating a system problem based on the test result when the front-end test result is inconsistent with the interface test result.
Wherein the front end test result being consistent with the interface test result comprises: the output parameters of the front-end test result are the same as the preset standard output parameters, the output parameters of the interface test result are the same as the preset standard data parameters, and the correlation parameters of the front-end test result and the interface test result are mutually consistent. In this case, a test report is generated to prompt the completion of the test, and no test exception occurs.
When the front-end test result is inconsistent with the interface test result and the system problem is positioned based on the test result, the method can comprise the steps of comparing the output parameter of the front-end test result with a preset standard output parameter, determining inconsistent parameter content, and determining the front-end problem according to the inconsistent parameter; comparing the output parameters of the interface test result with preset standard data, determining that the inconsistent parameters are the same, and determining the interface problem according to the content of the inconsistent parameters; comparing the front-end problem with the interface problem, determining parameters of mutual correlation influence in the front-end problem and the interface problem, and positioning the problems with the correlation effect as the problems to be verified. Problems without associated effects are located as belt solution problems.
In one embodiment, the questions with associated effects may also be tested again to determine the specific question.
For example, when the front end inputs data AAA, the background interface XXX is called, when the test is performed by the method disclosed herein, the front end and the interface jointly perform an automated test, when the data AAA is input, there is an abnormality in the front end test parameters, and there is also an abnormality in the background interface XXX. This matter requires that the front-end and the interface are not tested in association, but rather are tested separately in order to specifically locate whether the test problem is caused by the front-end or the interface and thus more specifically locate the test problem.
According to the automatic testing method disclosed by the invention, a front-end test case and an interface test case are generated based on the testing parameters; performing front-end test of the system to be tested based on the front-end test case to generate a front-end test result; performing interface test of the system to be tested based on the interface test case to generate an interface test result; and the front-end test result and the interface test result are compared to generate a system test result, so that the whole automatic test process of the software can be realized, the automatic test efficiency is improved, and the problem can be quickly positioned through the automatic combination of the front end and the back end.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
FIG. 3 is a flow chart illustrating a method of automated testing according to another exemplary embodiment. The process flow shown in fig. 3 is a further detailed description of the process flow shown in fig. 2.
As shown in fig. 3, in S302, the parameter profile is shared.
In S304, a test case management class is invoked.
In S306, the front-end test case performs a test.
In S308, the interface test case performs a test.
In S310, the test results are compared.
In S312, an error is located.
In S314, it is determined that the front-end use case failed.
In S316, it is determined that the interface use case failed.
In S318, it is determined whether the interface use case fails.
In S320, the interface problem is checked.
In S322, the front end problem is checked.
In a specific application embodiment, a front-end automation environment can be first established by using an Appium framework;
then, organizing the test case by using a unittest framework;
second, the front page buttons/links are associated with the calling interface according to a matching table before testing. Each front-end element test case is paired with a corresponding interface test case one by one, and the front-end case and the server-end case are sequentially executed, so that the integrity of front-end and back-end tests is realized;
after the test is finished, mutually verifying the service logic through the front-end case result and the interface case result;
and finally, positioning the cause of the problem through the front-end use case error/interface use case error. More specifically, when the front-end use case fails to test, whether the relevant interface use case fails to test or not can be checked, if the relevant interface use case fails to test, the interface use case is corrected for the error of the corresponding test, then the test is carried out again, if the test passes, the front-end use case is proved to be correct, and if the test fails again, the problem of the front-end use case is positioned again.
The automatic testing method disclosed by the disclosure can be used for rapidly positioning through automatic combination of the front end and the rear end. The software integral automatic testing process can be realized, and the automatic testing efficiency is improved.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
FIG. 4 is a block diagram illustrating an automated testing apparatus according to an exemplary embodiment. As shown in fig. 4, the system under test includes a front end and a back end, the front end is connected to the back end through an interface, and the automatic testing apparatus 40 includes: a configuration module 402, a use case module 404, a front-end test module 406, an interface test module 408, and a comparison module 410.
The configuration module 402 is used for configuring test parameters; the configuration module 402 further includes: the environment unit is used for constructing an automatic test environment based on the Apium automatic test framework; and the configuration unit is used for configuring the test parameters based on the automatic test environment.
The case module 404 is configured to generate a front-end test case and an interface test case based on the test parameters; the use case module 404 is further configured to organize the test parameters based on a unit framework test method to generate the front-end test case and the interface test case. The use case module 404 further includes: the front-end unit is used for bringing the test parameters into the front-end use case to generate the front-end test use case; and the interface unit is used for bringing the test parameters into the interface use case to generate the interface test use case.
The front-end test module 406 is configured to perform a front-end test on the system to be tested based on the front-end test case, and generate a front-end test result;
the interface test module 408 is configured to perform an interface test on the system to be tested based on the interface test case, and generate an interface test result; and
the comparison module 410 is configured to compare the front-end test result with the interface test result to generate a system test result. The alignment module 410 further comprises: the report unit is used for generating a test report when the front-end test result is consistent with the interface test result; and/or a positioning unit, configured to position a system problem based on the test result when the front-end test result is inconsistent with the interface test result.
FIG. 5 is a block diagram illustrating an automated testing apparatus according to another exemplary embodiment. As shown in fig. 5, the automatic test apparatus 50 further includes, in addition to the automatic test apparatus 40: a compiling module 502 and an associating module 504.
The compiling module 502 is used for generating a test case according to the test target; and compiling the test case to generate the front-end case and the interface case. The compiling module is further used for compiling the test case based on a python scripting language to generate the front-end case and the interface case.
The association module 504 is configured to associate the front-end test case and the interface test case according to a service logic. And the association module is also used for associating the front-end page button with the corresponding calling interface according to the service logic matching table.
According to the automatic testing device disclosed by the invention, a front-end test case and an interface test case are generated based on testing parameters; performing front-end test of the system to be tested based on the front-end test case to generate a front-end test result; performing interface test of the system to be tested based on the interface test case to generate an interface test result; and the front-end test result and the interface test result are compared to generate a system test result, so that the whole automatic test process of the software can be realized, the automatic test efficiency is improved, and the problem can be quickly positioned through the automatic combination of the front end and the back end.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 600 according to this embodiment of the disclosure is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 that connects the various system components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
Wherein the storage unit stores program code executable by the processing unit 610 to cause the processing unit 610 to perform steps according to various exemplary embodiments of the present disclosure described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 610 may perform the steps shown in fig. 2 and 3.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 600' (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 7, the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present disclosure.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: configuring test parameters; generating a front-end test case and an interface test case based on the test parameters; performing front-end test of the system to be tested based on the front-end test case to generate a front-end test result; performing interface test of the system to be tested based on the interface test case to generate an interface test result; and comparing the front-end test result with the interface test result to generate a system test result.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. An automatic test method is used for testing a system to be tested, the system to be tested comprises a front end and a rear end, the front end is connected with the rear end through an interface, and the method is characterized by comprising the following steps:
configuring test parameters;
generating a front-end test case and an interface test case based on the test parameters;
performing front-end test of the system to be tested based on the front-end test case to generate a front-end test result;
performing interface test of the system to be tested based on the interface test case to generate an interface test result; and
and comparing the front-end test result with the interface test result to generate a system test result.
2. The method of claim 1, wherein comparing the front-end test result to the interface test result to generate a system test result comprises:
when the front-end test result is consistent with the interface test result, generating a test report; and/or
And when the front-end test result is inconsistent with the interface test result, positioning a system problem based on the test result.
3. The method of claims 1-2, further comprising:
generating a test case according to the test target; and
and compiling the test case to generate the front-end case and the interface case.
4. The method of claims 1-3, wherein compiling the test cases to generate the front-end use cases and the interface use cases comprises:
and compiling the test case based on a python scripting language to generate the front-end case and the interface case.
5. The method of claims 1-4, further comprising:
and associating the front-end test case with the interface test case according to service logic.
6. The method of claims 1-5, wherein associating the front-end test cases and the interface test cases according to business logic comprises:
and associating the front page button with the corresponding calling interface according to the service logic matching table.
7. The method of claims 1-6, wherein the front end test and the interface test are performed sequentially according to the business logic while performing the front end test and the interface test of the system under test.
8. The utility model provides an automatic change testing arrangement for the test of system under test, the system under test includes front end and rear end, the front end pass through the interface with the rear end is connected, its characterized in that includes:
the configuration module is used for configuring test parameters;
the case module is used for generating a front-end test case and an interface test case based on the test parameters;
the front-end test module is used for carrying out front-end test on the system to be tested based on the front-end test case to generate a front-end test result;
the interface test module is used for carrying out interface test on the system to be tested based on the interface test case to generate an interface test result; and
and the comparison module is used for comparing the front-end test result with the interface test result to generate a system test result.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201911326064.XA 2019-12-20 2019-12-20 Automatic testing method and device and electronic equipment Pending CN111209184A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911326064.XA CN111209184A (en) 2019-12-20 2019-12-20 Automatic testing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911326064.XA CN111209184A (en) 2019-12-20 2019-12-20 Automatic testing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111209184A true CN111209184A (en) 2020-05-29

Family

ID=70787100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911326064.XA Pending CN111209184A (en) 2019-12-20 2019-12-20 Automatic testing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111209184A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111881025A (en) * 2020-07-20 2020-11-03 中国工商银行股份有限公司 Automatic test task scheduling method, device and system
CN113485880A (en) * 2021-07-12 2021-10-08 浙江网商银行股份有限公司 Test method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373478A (en) * 2015-12-14 2016-03-02 广州华多网络科技有限公司 Automatic test method and system
CN108228443A (en) * 2016-12-14 2018-06-29 北京国双科技有限公司 A kind of test method and device of web applications
US20190065349A1 (en) * 2017-08-24 2019-02-28 Salesforce.Com, Inc. Automatically executing stateless transactions with data dependency in test cases
CN109726108A (en) * 2018-06-04 2019-05-07 平安普惠企业管理有限公司 Front-end code test method, device, system and medium based on analogue data
CN109871321A (en) * 2019-01-23 2019-06-11 四川虹美智能科技有限公司 A kind of method and test case management platform of test case Code automatic build
CN110134593A (en) * 2019-04-19 2019-08-16 平安普惠企业管理有限公司 Method for testing software, device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105373478A (en) * 2015-12-14 2016-03-02 广州华多网络科技有限公司 Automatic test method and system
CN108228443A (en) * 2016-12-14 2018-06-29 北京国双科技有限公司 A kind of test method and device of web applications
US20190065349A1 (en) * 2017-08-24 2019-02-28 Salesforce.Com, Inc. Automatically executing stateless transactions with data dependency in test cases
CN109726108A (en) * 2018-06-04 2019-05-07 平安普惠企业管理有限公司 Front-end code test method, device, system and medium based on analogue data
CN109871321A (en) * 2019-01-23 2019-06-11 四川虹美智能科技有限公司 A kind of method and test case management platform of test case Code automatic build
CN110134593A (en) * 2019-04-19 2019-08-16 平安普惠企业管理有限公司 Method for testing software, device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111881025A (en) * 2020-07-20 2020-11-03 中国工商银行股份有限公司 Automatic test task scheduling method, device and system
CN111881025B (en) * 2020-07-20 2023-08-04 中国工商银行股份有限公司 Automatic test task scheduling method, device and system
CN113485880A (en) * 2021-07-12 2021-10-08 浙江网商银行股份有限公司 Test method and device

Similar Documents

Publication Publication Date Title
US10885000B2 (en) Repairing corrupted references
EP3301580B1 (en) System for automatically generating test data for testing applications
US20150227452A1 (en) System and method for testing software applications
US8839197B2 (en) Automated analysis of composite applications
US10310964B2 (en) System and method for determining relevance of application software maintenance
CN111177671A (en) Data management platform and method and electronic equipment
CN110543297A (en) method and apparatus for generating source code
CN110990274A (en) Data processing method, device and system for generating test case
US20150089296A1 (en) Derivation of generalized test cases
CN111209184A (en) Automatic testing method and device and electronic equipment
CN112363938A (en) Data processing method and device, electronic equipment and storage medium
CN109460363B (en) Automatic testing method and device, electronic equipment and computer readable medium
US10331894B2 (en) Static program analysis in an object-relational mapping framework
CN111352997A (en) Test environment verification method and system
US11307850B2 (en) Efficient change analysis in poly-lingual corpus hierarchies
WO2019193479A1 (en) Cognitive robotic system for test data management activities and method employed thereof
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN115080433A (en) Testing method and device based on flow playback
CN109901983B (en) Automatic testing method and device, storage medium and electronic equipment
US11144440B1 (en) Implementing device-specific libraries for validation testing
CN110795338B (en) Front-end and back-end interaction-based automatic testing method and device and electronic equipment
US20210026608A1 (en) Compile time validation of programming code
CN112328473A (en) Code automation integration test method and device and electronic equipment
US11921863B2 (en) Determining a source of a vulnerability in software
US20240037079A1 (en) Automated validation of database deployments

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200529

WD01 Invention patent application deemed withdrawn after publication