CN117234946B - Automatic test method and related equipment for project library system - Google Patents

Automatic test method and related equipment for project library system Download PDF

Info

Publication number
CN117234946B
CN117234946B CN202311490681.XA CN202311490681A CN117234946B CN 117234946 B CN117234946 B CN 117234946B CN 202311490681 A CN202311490681 A CN 202311490681A CN 117234946 B CN117234946 B CN 117234946B
Authority
CN
China
Prior art keywords
test
project
functions
library system
script
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311490681.XA
Other languages
Chinese (zh)
Other versions
CN117234946A (en
Inventor
石自军
于鹏
杨婷
蓝峰
黄宇强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jinzheng Software Technology Co ltd
Original Assignee
Shenzhen Jinzheng Software 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 Jinzheng Software Technology Co ltd filed Critical Shenzhen Jinzheng Software Technology Co ltd
Priority to CN202311490681.XA priority Critical patent/CN117234946B/en
Publication of CN117234946A publication Critical patent/CN117234946A/en
Application granted granted Critical
Publication of CN117234946B publication Critical patent/CN117234946B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides an automatic test method and related equipment of a project library system, wherein the method comprises the steps of constructing an automatic test tool of the project library system; constructing test cases of all functions based on the test requirements of the project library system; recording the test cases by using an automatic test tool to obtain an automatic test script of each function, wherein the automatic test script mainly comprises a coordinate element, a CSS element and an XPath element; configuring check points of all functions, and running an automatic test script of all functions to obtain test results of all functions; and summarizing test results of all the functions to generate a test report. According to the invention, the project library system is tested by using the testing tool, different checkpoints can be configured by different functions, the script generated by the testing tool mainly consists of the coordinate elements, the CSS elements and the XPath elements, the script is convenient to modify during debugging, the testing development difficulty is reduced, and the testing efficiency is improved.

Description

Automatic test method and related equipment for project library system
Technical Field
The invention relates to the technical field of software system testing, in particular to an automatic testing method and related equipment of a project library system.
Background
At present, the project library system is tested in the market, because the function of the project library system is complex, the flow points of the internal logic points are numerous, an automatic test method which is adaptive to the project library system does not exist, the test of the existing project library system is generally performed manually by a tester, namely, the test stage is carried out after the development iteration of the project library system is completed, the tester is manually put into the test, once the BUG is found, the tester still needs to repeatedly perform the regression test and the full-flow test after the development and repair are carried out, the iteration is completed until the BUG is not found to be on line, and the tester repeatedly tests in the period, so that fatigue is easy to generate, and the time consumption is huge and the efficiency is low.
Accordingly, the prior art is still in need of improvement and development.
Disclosure of Invention
The invention provides an automatic test method and related equipment of a project library system, and mainly aims to solve the technical problems in the prior art.
The first aspect of the invention provides an automated testing method of a project library system, comprising the following steps:
constructing an automatic testing tool of the project library system;
constructing test cases of all functions based on the test requirements of the project library system;
recording the test cases by using the automatic test tool to obtain an automatic test script of each function, wherein the automatic test script mainly comprises a coordinate element, a CSS element and an XPath element;
configuring check points of the functions, running the automatic test scripts of the functions, and obtaining test results of the functions;
and summarizing the test results of the functions to generate a test report.
In an optional implementation manner of the first aspect of the present invention, the summarizing the test results of the functions, and generating a test report further includes performing a service scenario test on the project library system; the step of carrying out service scene test on the project library system comprises the following steps:
acquiring corresponding functional requirements under each service scene;
acquiring a test case set corresponding to each functional requirement;
performing series connection and arrangement on the test case set based on service logic to obtain combined test cases of the service scenes;
recording the combined test cases by using the automatic test tool to obtain combined automatic test scripts of each service scene;
configuring each check point of each service scene, and running the combined automatic test script of each service scene to obtain a flow test result of each service scene;
and summarizing the flow test results of each business scene to generate a scene flow test report.
In an optional implementation manner of the first aspect of the present invention, the configuring a checkpoint of each of the functions, running the automation test script of each of the functions, and obtaining a test result of each of the functions includes:
for the project stand function of the project library system, taking a prompting screenshot generated when the stand project is successfully saved as a check point, running the automatic test script of the project stand function and carrying out image recognition on an interface by Java call Opencv;
and if the prompting screenshot is obtained during the running period of the automatic test script, judging that the project stand functional test passes, and generating a test result of the project stand functional test passing.
In an optional implementation manner of the first aspect of the present invention, the configuring a checkpoint of each of the functions, running the automation test script of each of the functions, and obtaining a test result of each of the functions further includes:
for the imported item information function of the item library system, taking the imported corresponding attribute name, attribute value and element as imported check points, running the automatic test script of the imported item information function, and judging whether the invoked element in the static webpage element is consistent with the check points or not by checking the invoked element in the static webpage element;
and if the called element in the static webpage element is consistent with the check point, judging that the imported item information function test passes, and generating a test result that the imported item information function test passes.
In an optional implementation manner of the first aspect of the present invention, the configuring a checkpoint of each of the functions, running the automation test script of each of the functions, and obtaining a test result of each of the functions further includes:
regarding the project submitting function of the project library system, taking HTTP request and response content corresponding to a submitting interface after project submitting as check points, and judging whether the expected response value is consistent with the response content or not by the automatic test script running the project submitting function through the HTTP request according to the expected response value returned by the request;
and if the expected response value is consistent with the response content, judging that the project submitting function test is passed, and generating a test result that the project submitting function test is passed.
In an optional implementation manner of the first aspect of the present invention, the configuring a checkpoint of each of the functions, running the automation test script of each of the functions, and obtaining a test result of each of the functions further includes:
for the data query function of the project library system, taking a result returned by a corresponding SQL script as a check point, running the automatic test script of the data query function and configuring data connected with a database to obtain a query result, and judging whether the query result is consistent with the result returned by the corresponding SQL script;
and if the query result is consistent with the returned result of the corresponding SQL script, judging that the data query function test passes, and generating a test result that the data query function test passes.
In an optional implementation manner of the first aspect of the present invention, after the recording the test case by using the automated test tool to obtain an automated test script of each function, the configuring a checkpoint of each function, running the automated test script of each function, and before obtaining a test result of each function, includes:
debugging the automation test script of each function through test run, and when certain function test run fails, completing the change of the automation test script through modifying the coordinate element, the CSS element and the XPath element in the automation test script.
A second aspect of the present invention provides an automated testing apparatus for a project library system, the automated testing apparatus comprising:
the tool construction module is used for constructing an automatic test tool of the project library system;
the case construction module is used for constructing test cases of all functions based on the test requirements of the project library system;
the script recording module is used for recording the test cases by utilizing the automatic test tool to obtain the automatic test scripts of the functions, wherein the automatic test scripts mainly comprise coordinate elements, CSS elements and XPath elements;
the check point configuration and test module is used for configuring check points of the functions, running the automatic test scripts of the functions and obtaining test results of the functions;
and the test report generating module is used for summarizing the test results of the functions and generating a test report.
A third aspect of the present invention provides an automated testing apparatus of a project library system, the automated testing apparatus of the project library system comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
the at least one processor invokes the instructions in the memory to cause an automated test equipment of the project library system to perform an automated test method of the project library system according to any one of the preceding claims.
A fourth aspect of the invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of automated testing of a project library system as described in any of the preceding claims.
The beneficial effects are that: the invention provides an automatic test method and related equipment of a project library system, wherein the method comprises the steps of constructing an automatic test tool of the project library system; constructing test cases of all functions based on the test requirements of the project library system; recording the test cases by using an automatic test tool to obtain an automatic test script of each function, wherein the automatic test script mainly comprises a coordinate element, a CSS element and an XPath element; configuring check points of all functions, and running an automatic test script of all functions to obtain test results of all functions; and summarizing test results of all the functions to generate a test report. According to the invention, the project library system is tested by using the testing tool, different checkpoints can be configured by different functions, the script generated by the testing tool mainly consists of the coordinate elements, the CSS elements and the XPath elements, the script is convenient to modify during debugging, the testing development difficulty is reduced, and the testing efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of an embodiment of an automated testing method for a project library system according to the present invention;
FIG. 2 is a schematic diagram of an automated testing apparatus of a project library system according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of an embodiment of an automated test equipment for a project library system of the present invention.
Detailed Description
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For easy understanding, referring to fig. 1, a first aspect of the present invention provides an automated testing method for a project library system, including:
s100, constructing an automatic test tool of a project library system; specifically, the invention realizes the automatic test based on the automatic test tool, the requirements of the project library system module are more and fixed, if the manual test is carried out by a tester, a lot of manpower and time are wasted, but the automatic test can be completed by recording the scripts of each required logic point of the project library system module by the automatic test tool and making relevant check point configuration, so that the verification can be automatically carried out after each developer repairs the bug, and the time and the cost can be saved.
S200, constructing test cases of all functions based on the test requirements of the project library system; in the invention, after the test requirement of the project library system is determined, the test case is designed according to the test requirement and is reviewed, the script is recorded according to the test case, and the corresponding check point is configured to be used for checking whether the test case passes the test, if the check point does not pass the feedback development processing of the corresponding error reporting information.
S300, recording the test cases by using the automatic test tool to obtain an automatic test script of each function, wherein the automatic test script mainly comprises a coordinate element, a CSS element and an XPath element; in the invention, a tester records a script according to a test case, and after the recording and the storage are completed, an automatic test script is automatically generated and displayed in a coordinate element, a CSS element and an XPath element, wherein the coordinate element is a coordinate XY axis position, the position of a system page is positioned through the XY axis coordinates, and the CSS element and the XPath element are both element positioning methods and are used for positioning the system page element, but are different from the coordinate element in expression mode.
In an optional embodiment of the present invention, in order to further improve the reliability of the running of the automated test script, the present invention also debugs the automated test script of each function obtained in step S300 through test running, and when some of the function test runs fail, changes to the automated test script are completed by modifying the coordinate element, the CSS element, and the XPath element in the automated test script. In general, an automated test script is problematic in that an element is not located at a specific position, a certain step in the script is not executed, execution fails, a subsequent step is directly executed and fails, whether the script is executed successfully is debugged again after the script is modified, wherein modification mainly comprises modification of a CSS element and an XPath element, the CSS element is recorded to generate the script, each script is a plurality of steps (recording operation of a page of recording time), clicking steps can display an input box of the CSS element, direct modification can be performed during modification, the same as the XPath element with the same principle can be performed, coordinates are absolute paths, and the X-axis Y-axis coordinates are modified, so that the method is not friendly, for example, if the current coordinate is blocked by another page, execution fails because no point is reached to the position of the test wanted point.
S400, configuring check points of the functions, and running the automatic test scripts of the functions to obtain test results of the functions; in step S400, the user may select a checkpoint type suitable for the current test case to perform checkpoints, where the checkpoint type is not only one, if the checkpoint of the type is not suitable for using a checkup picture, another checkpoint type may be used, or alternatively, multiple types of checkpoints may be selected to perform checkpoints of the test case, before each iteration of the project library system is performed, after the recorded automated test script is successfully debugged with the checkpoints, only the script maintained by the project library system may be tested and a test report may be obtained, and whether the project library system is performed or not is determined according to whether the acceptance criterion is met. In the invention, if the error is reported during the running of the automatic test script, whether the script is not maintained or the project library system has a problem is checked, if the script has the problem, the script needs to be reconfigured and debugged, and if the script has the problem, the project library system has the problem, the research personnel needs to be contacted for restoration.
In the present invention, checkpoints are checkpoints in a specific test tool developed based on various scenes that can appear or need to be considered, a tester can select a checkpoint type according to actual situations to check whether the test case passes or not, and we can select the following checkpoint type as a checkpoint according to actual scenes, specifically, check whether the test case script passes or not by using checkpoints, and the checkpoints have the following forms: and judging whether the pictures are the same or not through Java call Opencv image recognition, and checking whether the test case passes or not. Checking the static web page element is performed to check whether the test case passes. Checking whether the test case passes or not is performed by HTTP request and according to the request expected response value. Checking whether the test case passes or not is performed by calling an interface and returning whether the Json content is the same as the expected result according to the interface. The test case is checked for passage by manually entering a key value pair form parameter. And (3) calling a server database driver and executing a script result to check whether the test case passes or not by inputting the SQL script. The test case is checked whether it passes or not by comparing the recognition contents by the OCR of Opencv character recognition. Checking whether the test case passes or not by inputting and executing the python script and according to the script execution result, and the like.
In an optional implementation manner of the first aspect of the present invention, when the checkpoints specifically correspond to the tests of the functions of the project library system, configuring the checkpoints of the functions, running the automation test scripts of the functions, and obtaining the test results of the functions includes:
(1) For the project stand function of the project library system, taking a prompting screenshot generated when the stand project is successfully saved as a check point, running the automatic test script of the project stand function and carrying out image recognition on an interface by Java call Opencv; and if the prompting screenshot is obtained during the running period of the automatic test script, judging that the project stand functional test passes, and generating a test result of the project stand functional test passing.
(2) For the imported item information function of the item library system, taking the imported corresponding attribute name, attribute value and element as imported check points, running the automatic test script of the imported item information function, and judging whether the invoked element in the static webpage element is consistent with the check points or not by checking the invoked element in the static webpage element; and if the called element in the static webpage element is consistent with the check point, judging that the imported item information function test passes, and generating a test result that the imported item information function test passes.
(3) Regarding the project submitting function of the project library system, taking HTTP request and response content corresponding to a submitting interface after project submitting as check points, and judging whether the expected response value is consistent with the response content or not by the automatic test script running the project submitting function through the HTTP request according to the expected response value returned by the request; and if the expected response value is consistent with the response content, judging that the project submitting function test is passed, and generating a test result that the project submitting function test is passed.
(4) For the data query function of the project library system, taking a result returned by a corresponding SQL script as a check point, running the automatic test script of the data query function and configuring data connected with a database to obtain a query result, and judging whether the query result is consistent with the result returned by the corresponding SQL script; and if the query result is consistent with the returned result of the corresponding SQL script, judging that the data query function test passes, and generating a test result that the data query function test passes.
(5) Testing for other functions of the project library system may also be performed, for example, by calling an interface and checking whether the test case passes based on whether the interface returns Json content the same as the expected result. Checkpoints are made by calling the interface, and after script execution, the checkpoints are consistent with the Json value returned by the interface, namely the test cases of the script pass; checking whether the test case passes or not is performed by checking manually entered parameters. Checkpoints are made through configuration parameters, and after script execution, parameters corresponding to calling key values are consistent with the configured parameters, namely, the test cases of the script pass; the test case is checked whether it passes or not by comparing the recognition contents by the OCR of Opencv character recognition. Performing OCR character recognition by configuring a checking text and designating a certain area of a screen, and checking that the checking text is consistent with the OCR recognition after script execution, namely, indicating that the test case of the script passes; and checking whether the test case passes or not by inputting and executing the python script and according to the script execution result. Checkpointing by entering a python script, agreement with the python script after script execution, i.e., the passing of a test case representing the script, etc.
S500, summarizing test results of the functions to generate a test report. In general, the invention is based on the automated test of the project library system, only the automated test script of the project library system is required to be maintained, the report can be completely separated from manual operation of a tester from the execution of the automated test script to the acquisition of the report, meanwhile, the report can be visually displayed, the tester only needs to download the report, and after the configuration is finished, even a user without any development experience can participate in the whole-flow test.
In an optional implementation manner of the first aspect of the present invention, the summarizing the test results of the functions, and generating a test report further includes performing a service scenario test on the project library system; the step of carrying out service scene test on the project library system comprises the following steps: acquiring corresponding functional requirements under each service scene; acquiring a test case set corresponding to each functional requirement; performing series connection and arrangement on the test case set based on service logic to obtain combined test cases of the service scenes; recording the combined test cases by using the automatic test tool to obtain combined automatic test scripts of each service scene; configuring each check point of each service scene, and running the combined automatic test script of each service scene to obtain a flow test result of each service scene; and summarizing the flow test results of each business scene to generate a scene flow test report.
Specifically, the project library system has a plurality of scenes related to strictly controlled demand points, in order to test the fineness, a plurality of automatic test scripts of each function are maintained in the early stage, finally after a plurality of automatic test scripts of each function are ok, the automatic test scripts of each function can be copied and maintained to a new script or the scripts in the scenes are maintained to be a plan for executing test, and the scene test is to disassemble each logic point of the demand into each scene and test the scenes. The invention is based on the test of the business scene of the project library system, namely, the actual scene is simulated according to the requirements of the project library system, and the series connection or arrangement of the test cases is adjusted according to the requirements, and the test of the business scene of the project library system is a test process which is explored by the actual or simulated requirements according to the requirement specifications after the test personnel are communicated and discussed by the same customer, the product manager, the project manager, the related business personnel or the developer.
In summary, the invention provides an automatic test method for a project library system, which is based on an automatic test tool to realize automatic test, the project library system has a large and fixed demand, the automatic test can be completed by recording scripts by the automatic test tool and configuring relevant check points, the traditional manual mode is not used any more, and the correctness of the scripts and the response time of each step point are intuitively embodied in real time by using a standardized and automatic method.
Referring to fig. 2, a second aspect of the present invention provides an automated testing apparatus of a project library system, the automated testing apparatus of the project library system comprising:
a tool construction module 10 for constructing an automated test tool of the project library system;
the case construction module 20 is configured to construct test cases of each function based on the test requirements of the project library system;
the script recording module 30 is configured to record the test cases by using the automated test tool, so as to obtain an automated test script of each function, where the automated test script is mainly composed of a coordinate element, a CSS element and an XPath element;
a checkpoint configuration and test module 40, configured to configure checkpoints of the functions, run the automated test scripts of the functions, and obtain test results of the functions;
and the test report generating module 50 is used for summarizing the test results of the functions and generating a test report.
In an optional implementation manner of the second aspect of the present invention, the automated testing device of the project library system further includes a service scenario testing module, configured to perform a service scenario test on the project library system; the service scene test module comprises:
the function requirement acquisition unit is used for acquiring corresponding function requirements under each business scene;
the case set acquisition unit is used for acquiring test case sets corresponding to the functional requirements;
the case combination unit is used for carrying out series connection and arrangement on the test case set based on service logic to obtain combined test cases of all the service scenes;
the combined automatic test script recording unit is used for recording the combined test cases by utilizing the automatic test tool to obtain combined automatic test scripts of each service scene;
the check point configuration and test unit configures each check point of each service scene, runs the combined automatic test script of each service scene and obtains a flow test result of each service scene;
and the test report generating unit is used for summarizing the flow test results of each business scene and generating a scene flow test report.
In an alternative embodiment of the second aspect of the present invention, the checkpoint configuration and testing module includes:
the project setting function check point configuration and test unit is used for regarding project setting functions of the project library system, taking a prompting screenshot generated when the setting projects are successfully stored as a check point, running the automatic test script of the project setting functions and carrying out image recognition on an interface by Java calling Opencv; and if the prompting screenshot is obtained during the running period of the automatic test script, judging that the project stand functional test passes, and generating a test result of the project stand functional test passing.
In an alternative embodiment of the second aspect of the present invention, the checkpoint configuration and testing module further includes:
the imported item information function check point configuration and test unit is used for regarding imported item information functions of the item library system, taking imported corresponding attribute names, attribute values and elements as imported check points, running the automatic test script of the imported item information functions, and judging whether the elements called in the static webpage elements are consistent with the check points or not by checking the elements called in the static webpage elements; and if the called element in the static webpage element is consistent with the check point, judging that the imported item information function test passes, and generating a test result that the imported item information function test passes.
In an alternative embodiment of the second aspect of the present invention, the checkpoint configuration and testing module further includes:
the project submitting function check point configuration and test unit is used for regarding an HTTP request and response content corresponding to a submitting interface after project submitting as check points for the project submitting function of the project library system, and the automation test script running the project submitting function judges whether the expected response value is consistent with the response content or not through the HTTP request and according to the expected response value returned by the request; and if the expected response value is consistent with the response content, judging that the project submitting function test is passed, and generating a test result that the project submitting function test is passed.
In an alternative embodiment of the second aspect of the present invention, the checkpoint configuration and testing module further includes:
the data query function check point configuration and test unit is used for regarding the data query function of the project library system, taking the returned result of the corresponding SQL script as a check point, running the automatic test script of the data query function and configuring the data connected with the database to obtain a query result, and judging whether the query result is consistent with the returned result of the corresponding SQL script; and if the query result is consistent with the returned result of the corresponding SQL script, judging that the data query function test passes, and generating a test result that the data query function test passes.
In an alternative embodiment of the second aspect of the present invention, the automated testing apparatus of the project library system further comprises:
and the script debugging module is used for debugging the automation test scripts of the functions through test run, and when certain function test run fails, the automation test scripts are changed through modifying the coordinate elements, the CSS elements and the XPath elements in the automation test scripts.
Fig. 3 is a schematic structural diagram of an automated test equipment of an item library system according to an embodiment of the present invention, where the automated test equipment of the item library system may have relatively large differences due to configuration or performance, and may include one or more processors 60 (central processing units, CPU) (e.g., one or more processors) and a memory 70, and one or more storage media 80 (e.g., one or more mass storage devices) storing application programs or data. The memory and storage medium may be transitory or persistent. The program stored on the storage medium may include one or more modules (not shown), each of which may include a series of instruction operations in an automated test equipment of the project library system. Still further, the processor may be configured to communicate with a storage medium to execute a series of instruction operations in the storage medium on an automated test equipment of the project library system.
The automated test equipment of the project library system of the present invention may also include one or more power supplies 90, one or more wired or wireless network interfaces 100, one or more input output interfaces 110, and/or one or more operating systems, such as Windows Serves, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the automated test equipment structure of the project library system shown in FIG. 3 does not constitute a limitation of the automated test equipment of the project library system, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and may also be a volatile computer readable storage medium, where instructions are stored in the computer readable storage medium, when the instructions are executed on a computer, cause the computer to perform the steps of the automated test method of the project library system.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or the unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (7)

1. An automated testing method for a project library system, comprising:
constructing an automatic testing tool of the project library system;
constructing test cases of all functions based on the test requirements of the project library system;
recording the test cases by using the automatic test tool to obtain an automatic test script of each function, wherein the automatic test script consists of a coordinate element, a CSS element and an XPath element;
debugging the automation test script of each function through test run, and when certain function test run fails, completing the change of the automation test script by modifying the coordinate element, the CSS element and the XPath element in the automation test script;
configuring check points of the functions, running the automatic test scripts of the functions, and obtaining test results of the functions;
summarizing test results of the functions to generate a test report;
the step of configuring checkpoints of the functions, the step of running the automated test scripts of the functions, and the step of obtaining test results of the functions comprises the following steps:
for the project stand function of the project library system, taking a prompting screenshot generated when the stand project is successfully saved as a check point, running the automatic test script of the project stand function and carrying out image recognition on an interface by Java call Opencv; if the prompting screenshot is obtained during the running period of the automatic test script, judging that the project stand functional test passes, and generating a test result of the project stand functional test passing;
for the imported item information function of the item library system, taking the imported corresponding attribute name, attribute value and element as imported check points, running the automatic test script of the imported item information function, and judging whether the invoked element in the static webpage element is consistent with the check points or not by checking the invoked element in the static webpage element; and if the called element in the static webpage element is consistent with the check point, judging that the imported item information function test passes, and generating a test result that the imported item information function test passes.
2. The automated testing method of the project library system of claim 1, wherein the summarizing the test results of the functions, generating a test report, further comprises performing a business scenario test on the project library system;
the step of carrying out service scene test on the project library system comprises the following steps:
acquiring corresponding functional requirements under each service scene;
acquiring a test case set corresponding to each functional requirement;
performing series connection and arrangement on the test case set based on service logic to obtain combined test cases of the service scenes;
recording the combined test cases by using the automatic test tool to obtain combined automatic test scripts of each service scene;
configuring each check point of each service scene, and running the combined automatic test script of each service scene to obtain a flow test result of each service scene;
and summarizing the flow test results of each business scene to generate a scene flow test report.
3. The automated testing method of the project library system of claim 1, wherein configuring checkpoints of the respective functions, running the automated test scripts of the respective functions, obtaining test results of the respective functions further comprises:
regarding the project submitting function of the project library system, taking HTTP request and response content corresponding to a submitting interface after project submitting as check points, and judging whether the expected response value is consistent with the response content or not by the automatic test script running the project submitting function through the HTTP request according to the expected response value returned by the request;
and if the expected response value is consistent with the response content, judging that the project submitting function test is passed, and generating a test result that the project submitting function test is passed.
4. The automated testing method of the project library system of claim 1, wherein configuring checkpoints of the respective functions, running the automated test scripts of the respective functions, obtaining test results of the respective functions further comprises:
for the data query function of the project library system, taking a result returned by a corresponding SQL script as a check point, running the automatic test script of the data query function and configuring data connected with a database to obtain a query result, and judging whether the query result is consistent with the result returned by the corresponding SQL script;
and if the query result is consistent with the returned result of the corresponding SQL script, judging that the data query function test passes, and generating a test result that the data query function test passes.
5. An automated testing apparatus for a project library system, the automated testing apparatus comprising:
the tool construction module is used for constructing an automatic test tool of the project library system;
the case construction module is used for constructing test cases of all functions based on the test requirements of the project library system;
the script recording module is used for recording the test cases by utilizing the automatic test tool to obtain the automatic test scripts of the functions, wherein the automatic test scripts are composed of coordinate elements, CSS elements and XPath elements;
the script debugging module is used for debugging the automation test scripts of each function through test run, and when certain function test run fails, the automation test scripts are changed through changing the coordinate elements, the CSS elements and the XPath elements in the automation test scripts;
the check point configuration and test module is used for configuring check points of the functions, running the automatic test scripts of the functions and obtaining test results of the functions;
the test report generation module is used for summarizing test results of the functions and generating a test report;
the check point configuration and test module comprises:
the project setting function check point configuration and test unit is used for regarding project setting functions of the project library system, taking a prompting screenshot generated when the setting projects are successfully stored as a check point, running the automatic test script of the project setting functions and carrying out image recognition on an interface by Java calling Opencv; if the prompting screenshot is obtained during the running period of the automatic test script, judging that the project stand functional test passes, and generating a test result of the project stand functional test passing;
the imported item information function check point configuration and test unit is used for regarding imported item information functions of the item library system, taking imported corresponding attribute names, attribute values and elements as imported check points, running the automatic test script of the imported item information functions, and judging whether the elements called in the static webpage elements are consistent with the check points or not by checking the elements called in the static webpage elements; and if the called element in the static webpage element is consistent with the check point, judging that the imported item information function test passes, and generating a test result that the imported item information function test passes.
6. An automated testing apparatus of a project library system, the automated testing apparatus of the project library system comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
the at least one processor invoking the instructions in the memory to cause an automated testing equipment of the project library system to perform the automated testing method of the project library system of any of claims 1-4.
7. A computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the automated testing method of the item library system of any of claims 1-4.
CN202311490681.XA 2023-11-10 2023-11-10 Automatic test method and related equipment for project library system Active CN117234946B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311490681.XA CN117234946B (en) 2023-11-10 2023-11-10 Automatic test method and related equipment for project library system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311490681.XA CN117234946B (en) 2023-11-10 2023-11-10 Automatic test method and related equipment for project library system

Publications (2)

Publication Number Publication Date
CN117234946A CN117234946A (en) 2023-12-15
CN117234946B true CN117234946B (en) 2024-02-02

Family

ID=89086393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311490681.XA Active CN117234946B (en) 2023-11-10 2023-11-10 Automatic test method and related equipment for project library system

Country Status (1)

Country Link
CN (1) CN117234946B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620563A (en) * 2008-06-30 2010-01-06 福建升腾资讯有限公司 Method and system for automatically testing input playback mode of terminal system
CN103164328A (en) * 2011-12-12 2013-06-19 中国移动通信集团陕西有限公司 Method and device and system for regression testing of service function
CN103365643A (en) * 2012-03-30 2013-10-23 Ge医疗系统环球技术有限公司 Method and device for automatically generating testing script of graphical user interface
CN110413524A (en) * 2019-07-26 2019-11-05 中国工商银行股份有限公司 For generating method and apparatus, the automated testing method of test script
CN111881038A (en) * 2020-07-23 2020-11-03 云账户技术(天津)有限公司 Test case management method and device and electronic equipment
CN111966580A (en) * 2020-07-24 2020-11-20 厦门快商通科技股份有限公司 Automatic testing method, device, equipment and storage medium based on artificial intelligence
CN113612654A (en) * 2021-07-12 2021-11-05 东风汽车集团股份有限公司 Vehicle-mounted gateway function testing method based on database
CN114581028A (en) * 2021-12-22 2022-06-03 江西五十铃汽车有限公司 Project management method, system, readable storage medium and computer equipment
CN114881596A (en) * 2022-05-09 2022-08-09 建信金融科技有限责任公司 Automatic management method, device and equipment for field inspection
CN115658529A (en) * 2022-11-03 2023-01-31 平安银行股份有限公司 Automatic testing method for user page and related equipment
CN115658523A (en) * 2022-10-31 2023-01-31 成都赛力斯科技有限公司 Automatic control and test method for human-computer interaction interface and computer equipment
CN116881153A (en) * 2023-07-20 2023-10-13 银河电力集团股份有限公司 Automatic test management system and management method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180217921A1 (en) * 2017-02-02 2018-08-02 Cognizant Technology Solutions India Pvt. Ltd. System and method for generating and executing automated test cases

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620563A (en) * 2008-06-30 2010-01-06 福建升腾资讯有限公司 Method and system for automatically testing input playback mode of terminal system
CN103164328A (en) * 2011-12-12 2013-06-19 中国移动通信集团陕西有限公司 Method and device and system for regression testing of service function
CN103365643A (en) * 2012-03-30 2013-10-23 Ge医疗系统环球技术有限公司 Method and device for automatically generating testing script of graphical user interface
CN110413524A (en) * 2019-07-26 2019-11-05 中国工商银行股份有限公司 For generating method and apparatus, the automated testing method of test script
CN111881038A (en) * 2020-07-23 2020-11-03 云账户技术(天津)有限公司 Test case management method and device and electronic equipment
CN111966580A (en) * 2020-07-24 2020-11-20 厦门快商通科技股份有限公司 Automatic testing method, device, equipment and storage medium based on artificial intelligence
CN113612654A (en) * 2021-07-12 2021-11-05 东风汽车集团股份有限公司 Vehicle-mounted gateway function testing method based on database
CN114581028A (en) * 2021-12-22 2022-06-03 江西五十铃汽车有限公司 Project management method, system, readable storage medium and computer equipment
CN114881596A (en) * 2022-05-09 2022-08-09 建信金融科技有限责任公司 Automatic management method, device and equipment for field inspection
CN115658523A (en) * 2022-10-31 2023-01-31 成都赛力斯科技有限公司 Automatic control and test method for human-computer interaction interface and computer equipment
CN115658529A (en) * 2022-11-03 2023-01-31 平安银行股份有限公司 Automatic testing method for user page and related equipment
CN116881153A (en) * 2023-07-20 2023-10-13 银河电力集团股份有限公司 Automatic test management system and management method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于RFT的软件功能自动化测试研究;张晋桂;;江苏科技信息(第19期);全文 *

Also Published As

Publication number Publication date
CN117234946A (en) 2023-12-15

Similar Documents

Publication Publication Date Title
Zhou et al. Fault analysis and debugging of microservice systems: Industrial survey, benchmark system, and empirical study
US11281570B2 (en) Software testing method, system, apparatus, device medium, and computer program product
Berner et al. Observations and lessons learned from automated testing
US9792203B2 (en) Isolated testing of distributed development projects
AU748588B2 (en) Method for defining durable data for regression testing
US20110107307A1 (en) Collecting Program Runtime Information
EP2431869A1 (en) Dry-run design time environment
CN106227654B (en) A kind of test platform
KR101335912B1 (en) The system and method for integrated management of test
US8661414B2 (en) Method and system for testing an order management system
Mijatov et al. A Framework for Testing UML Activities Based on fUML.
Li et al. ADAutomation: An activity diagram based automated GUI testing framework for smartphone applications
Alferidah et al. Automated software testing tools
CN114297961A (en) Chip test case processing method and related device
Belli et al. Test generation and minimization with" Basic" statecharts
CN117234946B (en) Automatic test method and related equipment for project library system
Singh et al. Analysis of software testing techniques: Theory to practical approach
Jain et al. Comparative study of software automation testing tools: OpenScript and selenium
CN114579470A (en) Unit testing method and device, electronic equipment and storage medium
Lal et al. Intelligent Testing in Software Industry
CN109669868A (en) The method and system of software test
Al-Azzoni et al. A framework for the regression testing of model-to-model transformations
Paiva et al. Supporting the Automated Generation of Acceptance Tests of Process-Aware Information Systems.
CN112181824B (en) Auxiliary platform and method for system development
Acharya ONLINE CRIME REPORTING SYSTEM PROJECT.

Legal Events

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