CN111581100B - Background management system testing method - Google Patents
Background management system testing method Download PDFInfo
- Publication number
- CN111581100B CN111581100B CN202010390968.5A CN202010390968A CN111581100B CN 111581100 B CN111581100 B CN 111581100B CN 202010390968 A CN202010390968 A CN 202010390968A CN 111581100 B CN111581100 B CN 111581100B
- Authority
- CN
- China
- Prior art keywords
- tested
- parameters
- management system
- directory
- judging whether
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a background management system testing method, which relates to the technical field of testing, and comprises the steps of obtaining an environment name to be tested in a configuration document, obtaining corresponding environment parameters to be tested, front-end browser parameters and an assertion list according to the environment name to be tested, obtaining corresponding catalog information from a rear-end server according to interface parameters in the environment parameters to be tested, judging whether the catalog information is correct, analyzing the catalog information to obtain a plurality of full paths of corresponding bottom catalogs, sequentially obtaining pages corresponding to the bottom catalogs according to a bottom catalog sequence list, respectively judging whether the pages corresponding to the bottom catalogs are correct according to the assertion list, if so, capturing corresponding testing results into a result document, if not, capturing a screenshot of the wrong page and writing the corresponding testing results into the result document, thereby improving testing efficiency and the readability of the testing results.
Description
Technical Field
The invention relates to the technical field of testing, in particular to a background management system testing method.
Background
At present, the internet company needs to update quickly, and the service changes greatly, so that the front-end and back-end update frequency is high. In front-end and back-end testing, companies often attach more importance to front-end APP testing and have weak testing forces for the back-end management system. In practice, however, each change in front-end APP corresponds to a change in a background management system, and whichever front-end or back-end has a problem directly affects customer usage and corporate revenue. The background management system has a relatively fixed and simple page structure, and provides convenience for automatic test, but has higher maintenance cost due to poor page automation fault tolerance.
The existing schemes for the background management system comprise the following schemes:
(1) Through manual traversal test, each page of the background management system is manually traversed and checked, and a test result is recorded, the test time of the scheme is long, the test result is required to be manually recorded, the traversal test result is required to be collated and sent, and the test efficiency is low;
(2) Through automatic page traversal test, elements in a background management system page are checked and test results are recorded after each page script is manually written, the page traversal test results are automatically sent, the page script is required to be rewritten for the modified or added page after the background management system is updated, and the scheme is required to complete the test for all the pages, so that the test time is long and the test efficiency is low;
(3) And after the background management system is updated, the interface script is required to be rewritten for the modified or added page, so that the maintenance cost is high.
How to ensure the functions and pages of the background management system to be normal and to rapidly and accurately complete the test of the background management system with hundreds of pages becomes the focus of attention of the majority of testers.
Disclosure of Invention
In order to solve the defects in the prior art, the embodiment of the invention provides a background management system testing method, which comprises the following steps:
s1, acquiring an environment name to be tested in a configuration document;
s2, acquiring corresponding environment parameters to be tested, front-end browser parameters and an assertion list according to the environment names to be tested;
s3, acquiring corresponding catalogue information from a back-end server according to interface parameters in the environment parameters to be tested;
s4, judging whether the catalog information is correct, if not, acquiring corresponding catalog information from a background server according to the database parameters in the environmental parameters to be tested, and if so, executing a step S6;
s5, judging whether the catalog information is correct, if so, executing a step S6, and if not, executing a step S11;
s6, analyzing the catalog information to obtain a plurality of full paths of corresponding bottom-layer catalogs;
s7, circularly traversing the full path of each bottom layer directory, judging whether the full path of each bottom layer directory needs to be tested according to the list to be tested, and if so, executing the step S8;
s8, analyzing the full path of each bottom-layer directory to obtain a bottom-layer directory sequence list;
s9, sequentially obtaining pages corresponding to the bottom-layer catalogs according to the bottom-layer catalogs sequence list;
s10, respectively judging whether the page corresponding to the bottom directory is correct or not according to the assertion list; if yes, the corresponding test result is sent to a result document, and if not, step S11 is executed;
s11, capturing a screenshot of the error page and writing the corresponding test result into a result document.
Preferably, determining whether the directory information is correct includes:
judging whether the catalogue information comprises one or more key value pair type data, if not, determining that the catalogue information is wrong.
Preferably, the interface parameters include a request line, a request body and a request header.
Preferably, the database parameters include the IP address, user name and password of the database.
Preferably, the assertion list can be flexibly configured according to actual requirements.
Preferably, in the method, corresponding directory information is obtained from a backend server according to an interface parameter in the environmental parameters to be tested, and the method further comprises:
and judging whether the front-end browser is started or not according to the front-end browser parameters.
The background management system testing method provided by the embodiment of the invention has the following beneficial effects:
(1) The one-key triggering is realized, the background management system is automatically traversed, the test result is automatically recorded, and the test efficiency is improved;
(2) The assertion list can be flexibly configured, and the verification of the background management system is more convenient and quick;
(3) Whether the background management system is updated or not, the catalog information is acquired by using an interface or a database, all the catalog information (including newly added catalog information) can be acquired at one time, and the stability is high;
(4) The catalog information is automatically analyzed, the whole path of the bottom catalog is automatically analyzed, and the fault tolerance is extremely high;
(5) The error page is subjected to real-time screenshot, the test result is clear and definite, and the readability of the test result is improved.
Detailed Description
The present invention will be specifically described with reference to the following specific examples.
The background management system testing method provided by the embodiment of the invention comprises the following steps:
s101, obtaining the name of the environment to be tested in the configuration document.
S102, acquiring corresponding environment parameters to be tested, front-end browser parameters and an assertion list according to the environment names to be tested.
S103, according to interface parameters in the environment parameters to be tested, corresponding directory information is obtained from the back-end server.
And S104, judging whether the catalog information is correct, if not, acquiring the corresponding catalog information from a background server according to the database parameters in the environment parameters to be tested, and if so, executing the step S106.
S105, judging whether the catalog information is correct, if yes, executing step S106, and if not, executing step S111.
S106, analyzing the directory information to obtain a plurality of corresponding full paths of the bottom-layer directories.
As a specific embodiment, in a data structure tree, C, E and F are the bottom-level directories (leaf nodes), and there are specific pages; a is a top-level directory (root node), and no specific page exists; b and D are intermediate layer directories (child nodes) and there are no specific pages. The corresponding full path of the underlying directory refers to: A-B-C, A-D-E, A-F; after logging in the system, A is in a closed state, B, F and D can be seen only by clicking A, so that clicking A and then clicking B are needed to enter the C page, and finally clicking C and entering the C page.
And S107, traversing the full path of each bottom layer directory in a circulating way, judging whether the full path of each bottom layer directory needs to be tested according to the list to be tested, and if so, executing the step S108.
S108, analyzing the full path of each bottom-layer directory to obtain a bottom-layer directory sequence list.
And S109, sequentially obtaining pages corresponding to the bottom layer catalogs according to the bottom layer catalogs sequence list.
S110, judging whether the page corresponding to the bottom layer catalog is correct or not according to the assertion list; if yes, the corresponding test result is sent to the result document, and if not, step S111 is executed.
S111, capturing a screenshot of the error page and writing a corresponding test result into a result document.
Optionally, determining whether the directory information is correct includes:
and judging whether the directory information comprises one or more key value pair type data, and if not, determining that the directory information is wrong.
Optionally, the interface parameters include a request line, a request body, and a request header.
Optionally, the database parameters include an IP address, a user name, and a password of the database.
Optionally, the assertion list can be flexibly configured according to actual requirements.
As a specific example, when a page contains 500, 404 and Error fields, the page is considered to be displaying exceptions, then the above fields may be added to the predicate list, i.e., the predicate list is (500, 404, error).
Preferably, in the step of acquiring corresponding directory information from the back-end server according to the interface parameters in the environment parameters to be tested, the method further comprises:
and judging whether the front-end browser is started or not according to the front-end browser parameters.
As a specific embodiment, when the front-end browser parameter is 1, it means to open the front-end browser, and when the front-end browser parameter is 0, it means to close the front-end browser.
According to the background management system testing method provided by the embodiment of the invention, the environment names to be tested in the configuration document are obtained, the corresponding environment parameters to be tested, the front-end browser parameters and the assertion list are obtained according to the environment names to be tested, the corresponding directory information is obtained from the rear-end server according to the interface parameters in the environment parameters to be tested, whether the directory information is correct or not is judged, if yes, the directory information is analyzed to obtain all paths of a plurality of corresponding bottom directories, the all paths of all bottom directories are traversed circularly, whether the all paths of all bottom directories need to be tested is judged according to the to-be-tested list, if yes, the all paths of all bottom directories are analyzed to obtain a bottom directory sequence list, pages corresponding to the bottom directories are sequentially obtained according to the bottom directory sequence list, if yes, the corresponding test results are respectively judged to be correct according to the assertion list, if no, the corresponding test results are obtained to the result document, if no, the error pages are captured, the corresponding test results are written to the result document, and the test efficiency and the readability of the test results are improved.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It will be appreciated that the relevant features of the methods and apparatus described above may be referenced to one another. In addition, the "first", "second", and the like in the above embodiments are for distinguishing the embodiments, and do not represent the merits and merits of the embodiments.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.
Claims (6)
1. A background management system testing method, comprising:
s1, acquiring an environment name to be tested in a configuration document;
s2, acquiring corresponding environment parameters to be tested, front-end browser parameters and an assertion list according to the environment names to be tested;
s3, acquiring corresponding catalogue information from a back-end server according to interface parameters in the environment parameters to be tested;
s4, judging whether the catalog information acquired in the step S3 is correct, if not, acquiring corresponding catalog information from a background server according to database parameters in the environmental parameters to be tested, and executing the step S5, if so, executing the step S6;
s5, judging whether the catalog information acquired in the step S4 is correct, if so, executing the step S6, and if not, executing the step S11;
s6, analyzing the acquired directory information to obtain a plurality of full paths of corresponding bottom-layer directories;
s7, circularly traversing the full path of each bottom layer directory, judging whether the full path of each bottom layer directory needs to be tested according to the list to be tested, and if so, executing the step S8;
s8, analyzing the full path of each bottom-layer directory to obtain a bottom-layer directory sequence list;
s9, sequentially obtaining pages corresponding to the bottom-layer catalogs according to the bottom-layer catalogs sequence list;
s10, respectively judging whether the page corresponding to the bottom directory is correct or not according to the assertion list; if yes, the corresponding test result is sent to a result document, and if not, step S11 is executed;
s11, capturing a screenshot of the error page and writing the corresponding test result into a result document.
2. The background management system test method according to claim 1, wherein determining whether the directory information is correct comprises:
judging whether the catalogue information comprises one or more key value pair type data, if not, determining that the catalogue information is wrong.
3. The method of claim 1, wherein the interface parameters include a request line, a request body, and a request header.
4. The background management system test method according to claim 1, wherein the database parameters include an IP address, a user name, and a password of a database.
5. The method for testing a background management system according to claim 1, wherein the assertion list is flexibly configured according to actual requirements.
6. The method for testing a background management system according to claim 1, wherein, in accordance with an interface parameter in the environmental parameters to be tested, corresponding directory information is obtained from a backend server, the method further comprises:
and judging whether the front-end browser is started or not according to the front-end browser parameters.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010390968.5A CN111581100B (en) | 2020-05-11 | 2020-05-11 | Background management system testing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010390968.5A CN111581100B (en) | 2020-05-11 | 2020-05-11 | Background management system testing method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111581100A CN111581100A (en) | 2020-08-25 |
CN111581100B true CN111581100B (en) | 2023-05-30 |
Family
ID=72126515
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010390968.5A Active CN111581100B (en) | 2020-05-11 | 2020-05-11 | Background management system testing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111581100B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112256984B (en) * | 2020-10-22 | 2022-09-30 | 上海万物新生环保科技集团有限公司 | A method and device for obtaining a screenshot of an interface support corresponding to a webpage |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109828903A (en) * | 2018-12-14 | 2019-05-31 | 中国平安人寿保险股份有限公司 | Automated testing method, device, computer installation and storage medium |
CN110825635A (en) * | 2019-11-05 | 2020-02-21 | 京东数字科技控股有限公司 | Test method, test device and computer-readable storage medium |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0470322B1 (en) * | 1990-08-07 | 1996-04-03 | BULL HN INFORMATION SYSTEMS ITALIA S.p.A. | Message-based debugging method |
US7231606B2 (en) * | 2000-10-31 | 2007-06-12 | Software Research, Inc. | Method and system for testing websites |
CN101604290B (en) * | 2009-06-05 | 2012-05-16 | 中国移动(深圳)有限公司 | A background module testing method and background module testing system |
CN103679390B (en) * | 2013-12-26 | 2018-02-13 | 北京奇虎科技有限公司 | The background test method and device of configuration system |
CN104598380B (en) * | 2015-01-16 | 2017-08-01 | 广东欧珀移动通信有限公司 | A control-based automated testing method and system |
US10558549B2 (en) * | 2015-11-26 | 2020-02-11 | Tata Consultancy Services Limited | Method and system for pre-deployment performance estimation of input-output intensive workloads |
US10713152B2 (en) * | 2017-06-28 | 2020-07-14 | Sap Se | Automated path generator for optimized application testing |
CN109918310A (en) * | 2019-03-15 | 2019-06-21 | 集奥聚合(北京)人工智能科技有限公司 | A kind of Modeling Platform interface test method |
-
2020
- 2020-05-11 CN CN202010390968.5A patent/CN111581100B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109828903A (en) * | 2018-12-14 | 2019-05-31 | 中国平安人寿保险股份有限公司 | Automated testing method, device, computer installation and storage medium |
CN110825635A (en) * | 2019-11-05 | 2020-02-21 | 京东数字科技控股有限公司 | Test method, test device and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111581100A (en) | 2020-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111552632B (en) | Interface testing method and device | |
CN101526916B (en) | Application method and system in regression test based on page object flow verification | |
US20130086420A1 (en) | Method and system for implementing a test automation results importer | |
US20130167113A1 (en) | Maintenance of a subroutine repository for an application under test based on subroutine usage information | |
CN115658452B (en) | Buried point verification method, buried point verification device, readable storage medium, and electronic device | |
CN111581100B (en) | Background management system testing method | |
US20120197595A1 (en) | Automatic correlation accelerator | |
CN102340429A (en) | Automatic Internet protocol recovery detection method | |
CN109450723A (en) | A kind of BMC Web network information display verifying automated testing method | |
CN112579456A (en) | Web automatic testing method and device | |
CN114297055B (en) | A WebUI automated testing method based on intelligent learning | |
US20080306752A1 (en) | Method and system for automatic testing in a business scenario environment | |
CN118278379B (en) | Method and system for realizing document version management based on git | |
CN109408378A (en) | A kind of test method and system quickly positioning SQL parsing mistake under big data quantity | |
CN117891715A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN117076324A (en) | A method, system, equipment and medium for code repair based on logs | |
CN112187708B (en) | Automatic supplementing method and equipment for certificate chain of digital certificate | |
CN116069667A (en) | Test case auxiliary positioning method and device based on code analysis | |
CN113342675B (en) | Mapping method and device of tested module, and testing method and system | |
CN114996133A (en) | A system function testing method, device, equipment and medium | |
KR20240035250A (en) | Unit test re-using method, and computer-readable recording medium | |
CN112181809B (en) | A graphical user interface automated testing method based on multiple positioning methods | |
CN113377645B (en) | Method and system for testing illegal character input on WEB site page | |
CN111770004B (en) | HTTP (hyper text transport protocol) (S) flow content automatic verification method and storage medium | |
Girgis et al. | An automated web application testing system |
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 |