CN113961864A - System inspection method and device, storage medium and electronic equipment - Google Patents

System inspection method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113961864A
CN113961864A CN202111299606.6A CN202111299606A CN113961864A CN 113961864 A CN113961864 A CN 113961864A CN 202111299606 A CN202111299606 A CN 202111299606A CN 113961864 A CN113961864 A CN 113961864A
Authority
CN
China
Prior art keywords
page
inspected
inspection
screenshot
configuration file
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
CN202111299606.6A
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.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information 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 Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202111299606.6A priority Critical patent/CN113961864A/en
Publication of CN113961864A publication Critical patent/CN113961864A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The present disclosure relates to the field of computer technologies, and in particular, to a system inspection method, a system inspection apparatus, a storage medium, and an electronic device. The system inspection method comprises the following steps: acquiring a configuration file preset by a system to be patrolled in a patrolling task; the configuration file comprises a uniform resource locator and an expected page screenshot of a page to be inspected in the system to be inspected; positioning and accessing the page to be inspected according to the uniform resources, and saving a screenshot of the page to be inspected as a current page screenshot; and calculating a page similarity value between the current page screenshot and the expected page screenshot, and obtaining an inspection result of the inspection task according to the page similarity value. The system inspection method can implement batch inspection on the Web system with low cost.

Description

System inspection method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a system inspection method, a system inspection apparatus, a storage medium, and an electronic device.
Background
In operation and maintenance work, in order to check whether the system is in an abnormal state, a front-end module, namely, a routing inspection scheme of a Web system (which is called World Wide Web for short, and is also called World Wide Web) can be adopted, and generally speaking, an automatic test case is written for the Web system; and the other method is to arrange special inspection personnel to log in the system by the user identity to check whether the page is normal.
Aiming at the routing inspection scheme of the Web system, when the delivery system is single and the quantity is small, the generated labor cost can be borne. However, unlike a set of Web system of 2C (to Customer) which serves thousands of users, a 2B (to Business) client generally has its own customized requirements, and a set of Web system generally serves only one client, and the page style and data of the Web system are greatly changed under the requirements of different clients. Therefore, the two modes cause the problems of large time consumption and high inspection cost in implementation.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure aims to provide a system inspection method, a system inspection device, a storage medium, and an electronic device, and aims to solve the problem of implementing batch inspection on a Web system at low cost.
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 embodiments of the present disclosure, a system polling method is provided, including: acquiring a configuration file preset by a system to be patrolled in a patrolling task; the configuration file comprises a uniform resource locator and an expected page screenshot of a page to be inspected in the system to be inspected; positioning and accessing the page to be inspected according to the uniform resources, and saving a screenshot of the page to be inspected as a current page screenshot; and calculating a page similarity value between the current page screenshot and the expected page screenshot, and obtaining an inspection result of the inspection task according to the page similarity value.
According to some embodiments of the present disclosure, based on the foregoing solution, the method further comprises: presetting a configuration file of the system to be patrolled and examined, wherein the presetting of the configuration file of the system to be patrolled and examined comprises the following steps: configuring at least one page to be inspected in the system to be inspected; the page to be patrolled is a functional sub-page of the system to be patrolled; extracting a uniform resource locator of the page to be inspected; and taking the screenshot of the page to be inspected in the normal state of the system to be inspected as an expected page screenshot.
According to some embodiments of the present disclosure, based on the foregoing solution, the method further comprises: and configuring at least one system to be inspected in the inspection tasks.
According to some embodiments of the present disclosure, based on the foregoing scheme, the configuration file further includes login information, and after obtaining the configuration file preset by the system to be inspected, the method further includes: logging in the system to be inspected by using a test tool according to the logging-in information, and generating a logging-in state; and logging in the page to be inspected based on the login state so as to access the page to be inspected according to the uniform resource positioning.
According to some embodiments of the present disclosure, based on the foregoing scheme, the configuration file further includes a similarity threshold, and obtaining the inspection result of the inspection task according to the page similarity value includes: comparing the page similarity value with the similarity threshold value to obtain a routing inspection result of the page to be routed; synthesizing the inspection result of the page to be inspected to obtain the inspection result of the system to be inspected; and synthesizing the inspection result of the system to be inspected to obtain the inspection result of the inspection task.
According to some embodiments of the present disclosure, based on the foregoing solution, the method further comprises: presetting a similarity threshold value of the page to be inspected in the system to be inspected; or presetting a similarity threshold value of the system to be patrolled and examined; and configuring the similarity threshold of the system to be inspected as the similarity threshold of the page to be inspected.
According to some embodiments of the disclosure, based on the foregoing scheme, the configuration file includes notification information, and after obtaining the inspection result of the inspection task according to the page similarity value, the method further includes: and notifying the inspection result of the inspection task based on the notification information.
According to a second aspect of the embodiments of the present disclosure, there is provided a system inspection device, including: the system comprises an acquisition module, a data processing module and a data processing module, wherein the acquisition module is used for acquiring a configuration file preset by a system to be patrolled in a patrolling task; the configuration file comprises a uniform resource locator and an expected page screenshot of a page to be inspected in the system to be inspected; the screenshot module is used for positioning and accessing the page to be patrolled according to the uniform resource and saving the screenshot of the page to be patrolled as the current page screenshot; and the comparison module is used for calculating a page similarity value between the current page screenshot and the expected page screenshot and obtaining an inspection result of the inspection task according to the page similarity value.
According to a third aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the system inspection method as in the above embodiments.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus, including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the system tour inspection method as in the above embodiments.
Exemplary embodiments of the present disclosure may have some or all of the following benefits:
in the technical solutions provided by some embodiments of the present disclosure, a configuration file is preset for a system to be patrolled, where the configuration file includes a page to be patrolled, a uniform resource locator, an expected page screenshot, a similarity threshold, and the like of the page to be patrolled. And then, calculating a page similarity value according to the current page screenshot and the expected page screenshot calculated by the configuration file, and comparing the page similarity value with a similarity threshold value to finish the inspection of the Web system. The system inspection method provided by the disclosure can be used for solidifying the inspection function points of the Web system in advance in a mode of configuration files and automatically verifying by comparing the similarity of the pictures to finish inspection operation, and on one hand, the inspection configuration files are compiled without involving the work of code compiling, so that the inspection method does not depend on special test developers, is short in time consumption and low in implementation threshold; on the other hand, the compiled configuration file can be reused by different polling personnel, and if the subsequent configuration file changes, the maintenance operation is simpler, so that the learning and handover cost of the polling personnel is reduced, and the purpose of performing batch polling on the Web system at low cost is achieved.
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 accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 schematically illustrates a flow diagram of a system polling method in an exemplary embodiment of the disclosure;
FIG. 2 schematically illustrates a diagram of a prospective screenshot page in an exemplary embodiment of the disclosure;
FIG. 3 schematically illustrates a diagram of a current page screenshot in an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates another current page screenshot in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates an interface diagram of a configuration file in an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating the components of a batch inspection central control system according to an exemplary embodiment of the disclosure;
FIG. 7 schematically illustrates a schematic diagram of the components of a system inspection device in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a schematic diagram of a computer-readable storage medium in an exemplary embodiment of the disclosure;
fig. 9 schematically shows a structural diagram of a computer system of an electronic device in an exemplary embodiment of the disclosure.
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 examples 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.
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.
For an enterprise engaged in the B-side service, a common deliverable is a system composed of a set of front-end module and a set of back-end module deployed for a client, and after delivery, the enterprise needs to continue to undertake the overall operation and maintenance work of the system to ensure the normal operation of the system. In operation and maintenance work, in order to check whether an abnormal state occurs in the system, the following scheme is generally adopted:
1. the inspection scheme of the back-end system is as follows: embedding a dotting log in a software system, finding out the abnormality of the system by monitoring the log, and informing related personnel by short messages, mails and the like;
2. the routing inspection scheme of the server is as follows: checking whether the memory, the CPU and the bandwidth reach an alarm value through server management software, and informing related personnel through short messages, mails and the like;
3. the front-end module is a routing inspection scheme of the Web system: one is to compile an automatic test case for the Web system; one is to arrange special inspection personnel to log in the system with the user identity to check whether the page is normal.
In the routing inspection scheme scene aiming at the front-end module, namely the Web system, when the delivery system is single and the quantity is small, the generated labor cost can be borne. However, unlike a set of Web system at the C-side, which serves thousands of users, the client at the B-side generally has its own customized requirements, and a set of Web system generally serves only one client, and the page style and data of the Web system are greatly changed under the requirements of different clients. Therefore, the following problems arise:
1. and compiling a scheme of an automatic test case. The threshold is high, and a test tool developer with code compiling capability is relied on to compile and debug the automatic test case in advance, so that certain time consumption is generated. Maintenance by professionals is also required when pages change. Meanwhile, because the systems among different clients have customized functions, the automatic test cases among different systems can not be reused generally.
2. The inspection scheme for the special person. Each time a new system is delivered, the patrol personnel responsible for the Web system needs to learn and understand the new functions of the system. With the accumulation of the number of customers, the number of systems requiring patrolling personnel to learn is increased, and the learning cost is increased. When the post is changed, the new and old personnel are handed over, which further causes more labor expenditure and the profit of the enterprise is reduced.
Therefore, in order to solve the above problems, the present disclosure provides a system inspection method, which solidifies the inspection function points of the Web system in a configuration file manner, and automatically verifies to complete the inspection operation, thereby achieving the purpose of implementing batch inspection on the Web system at low cost.
Implementation details of the technical solution of the embodiments of the present disclosure are set forth in detail below.
Fig. 1 schematically illustrates a flow chart of a system polling method in an exemplary embodiment of the present disclosure. As shown in fig. 1, the system inspection method includes steps S1 to S3:
step S1, acquiring a configuration file preset by the system to be inspected in the inspection task; the configuration file comprises a uniform resource locator and an expected page screenshot of a page to be inspected in the system to be inspected;
step S2, the page to be inspected is accessed according to the uniform resource positioning, and the screenshot of the page to be inspected is saved as the current page screenshot;
and step S3, calculating a page similarity value between the current page screenshot and the expected page screenshot, and obtaining an inspection result of the inspection task according to the page similarity value.
In the technical solutions provided by some embodiments of the present disclosure, a configuration file is preset for a system to be patrolled, where the configuration file includes a page to be patrolled, a uniform resource locator, an expected page screenshot, a similarity threshold, and the like of the page to be patrolled. And then, calculating a page similarity value according to the current page screenshot and the expected page screenshot calculated by the configuration file, and comparing the page similarity value with a similarity threshold value to finish the inspection of the Web system. The system inspection method provided by the disclosure can be used for solidifying the inspection function points of the Web system in advance in a configuration file mode and automatically verifying to complete inspection operation, and on one hand, the inspection configuration file is compiled without involving code compiling work, so that the inspection method does not depend on special test developers, is short in time consumption and low in implementation threshold; on the other hand, the compiled configuration file can be reused by different polling personnel, and if the subsequent configuration file changes, the maintenance operation is simpler, so that the learning and handover cost of the polling personnel is reduced, and the purpose of performing batch polling on the Web system at low cost is achieved.
Hereinafter, the steps of the system inspection method according to the exemplary embodiment will be described in more detail with reference to the drawings and examples.
In step S1, a configuration file preset by the system to be inspected in the inspection task is obtained; the configuration file comprises a uniform resource locator and an expected page screenshot of a page to be patrolled in the system to be patrolled.
Specifically, the polling task includes the content to be polled in the task, specifically, the functional subpages of which systems are polled.
And solidifying the inspection function point of the Web system in a configuration file mode to serve as the configuration file of the Web system.
It should be noted that configuration files of the Web systems may be prepared and stored in advance, each Web system corresponds to one configuration file, and the configuration files may be read by the central control cycle module during polling. Thus, the method further comprises: step S0: and presetting a configuration file of the system to be patrolled and examined.
Further, presetting the configuration file of the system to be inspected comprises: configuring at least one page to be inspected in the system to be inspected; the page to be patrolled is a functional sub-page of the system to be patrolled; extracting a uniform resource locator of the page to be inspected; and taking the screenshot of the page to be inspected in the normal state of the system to be inspected as an expected page screenshot.
Specifically, the configuration file includes a page to be inspected, which needs to be inspected, and one or more pages to be inspected may be included in a Web system to be inspected, where the pages to be inspected are functional subpages of the system.
The configuration file also comprises a uniform resource locator of the page to be patrolled. The uniform resource locator, i.e. the URL of the page to be inspected, is a compact representation of the location and access method of the resource available from the internet, and is the address of the standard resource on the internet.
The configuration file also comprises an expected page screenshot of the page to be patrolled. The expected page screenshot is a page screenshot of the system in a normal state, and the expression form is a picture form.
In addition, a plurality of Web systems can be patrolled in batch in one polling task, so the method further comprises the following steps: and configuring at least one system to be inspected in the inspection tasks.
In step S2, the page to be inspected is accessed according to the uniform resource location, and the screenshot of the page to be inspected is saved as the current page screenshot.
Specifically, the resource locator of each page to be inspected is obtained by analyzing the configuration file of the system to be inspected, the Web automation tool can directly access each page to be inspected through the uniform resource locator URL, and then the actual screenshot of the current page is saved as the screenshot of the current page.
In step S3, a page similarity value between the current page screenshot and the expected page screenshot is calculated, and an inspection result of the inspection task is obtained according to the page similarity value.
In an embodiment of the disclosure, for each page to be patrolled, the expected page screenshot can be obtained by analyzing the configuration file, and the current page screenshot is obtained by the step S2. The page similarity values for the current page shot and the expected page shot may then be calculated.
Specifically, the page Similarity value may be measured by using SSIM (structural Similarity) value as a measure. SSIM is an index for measuring the similarity of two images and consists of brightness contrast, contrast and structure contrast. The poorer the similarity between the two images, the lower the value of SSIM, which is equal to 1 when the two images are identical.
Of course, the page similarity value can be measured by using SSIM value, and other algorithms for calculating the graph similarity, such as SIFT (Scale Invariant Feature Transform) or ORB (organized FAST and rolling BRIEF) algorithm, etc.
The calculated page similarity value can be used as a basis for judging the inspection result of the page to be inspected. If the similarity is high, namely the current page screenshot is basically consistent with the expected page screenshot, the inspection is regarded as pass, otherwise, the inspection is not pass.
In the primary polling task, the polling result of the polling task can be comprehensively obtained by circularly reading the system to be polled and the page to be polled of the system to be polled in the polling task to obtain the polling result of the page to be polled.
Based on the method, whether the inspection system is abnormal or not is judged by calculating the image similarity, so that complicated software test codes are prevented from being written, and the learning cost and the maintenance cost of the inspection tool are reduced.
In an embodiment of the present disclosure, the configuration file further includes login information, and after obtaining the configuration file preset by the system to be inspected, the method further includes: logging in the system to be inspected by using a test tool according to the logging-in information, and generating a logging-in state; and logging in the page to be inspected based on the login state so as to access the page to be inspected according to the uniform resource positioning.
Specifically, for information security, it is necessary to use login information when accessing the Web system and the system function sub-page. The configuration file may include information required for login, such as a URL, username, password, etc. of the system.
When logging in, firstly, the login information in the configuration file is analyzed, and the login is realized through a Web automation tool, wherein the operation is used for generating a login state of a user, and the login state is used for enabling the user to normally log in a function sub-page of a system subsequently, further accessing the page and saving a screenshot of the page.
In an embodiment of the present disclosure, the configuration file further includes a similarity threshold, in step S3, the obtaining the inspection result of the inspection task according to the page similarity value includes: comparing the page similarity value with the similarity threshold value to obtain a routing inspection result of the page to be routed; synthesizing the inspection result of the page to be inspected to obtain the inspection result of the system to be inspected; and synthesizing the inspection result of the system to be inspected to obtain the inspection result of the inspection task.
Specifically, considering that the overall structure of the page in the delivery system is stable, but there may be data changes, which is a normal situation, in order to make the verification result controllable, a similarity threshold Standard may be added as a criterion for verifying whether the verification passes. The similarity threshold value can be adjusted and set according to the page similarity value.
Taking the page similarity value as an SSIM value as an example, the SSIM value range is [0,1], which is used to represent the page similarity. If the Standard is set to be 95%, the SSIM value is higher than or equal to the Standard, the inspection is regarded as passing, when the SSIM value is lower than the Standard, the SSIM value is low due to large abnormity of the page, the inspection is not passed, and a system engineer needs to be informed to manually intervene the next inspection work.
Fig. 2 schematically illustrates a diagram of an expected screenshot page, which is denoted as page a in an exemplary embodiment of the present disclosure. Fig. 3 schematically illustrates a schematic diagram of a current page screenshot, which is denoted as page a', and has only a slight difference in value from page a in an exemplary embodiment of the present disclosure; fig. 4 schematically illustrates another schematic diagram of a current page screenshot in an exemplary embodiment of the present disclosure, which is denoted as page B.
The SSIM value of the page A and the page A 'is 1, the SSIM index value of the page A and the page A' is 0.99, and the SSIM index value of the page A and the page B is 0.21. Therefore, according to the Standard of 95%, the verification is carried out, the page A' is checked to be passed, and the page B is checked to be not passed.
After the inspection result of the page to be inspected is obtained, the result can be integrated to obtain the inspection result of the inspection task. When the system to be patrolled and examined includes a plurality of pages to be patrolled and examined that need patrolling and examined, need traverse each page to be patrolled and examined and obtain the result of patrolling and examining of the system to be patrolled and examined. When a plurality of systems to be inspected need to be inspected in batches in the inspection task, the inspection results of the inspection task need to be obtained comprehensively by traversing all the systems to be inspected.
Further, the method further comprises: presetting a similarity threshold value of the page to be inspected in the system to be inspected; or presetting a similarity threshold value of the system to be patrolled and examined; and configuring the similarity threshold of the system to be inspected as the similarity threshold of the page to be inspected.
Specifically, the similarity threshold needs to be preset in advance, and in one case, the similarity threshold is set for each page to be inspected for judgment, so that the inspection standard can be changed timely by considering personalized function sub-pages; in another case, the similarity threshold values of the polling of the pages of the system to be polled are the same, and the setting process can be simplified by only setting the similarity threshold value of the system to be polled once.
In an embodiment of the present disclosure, the configuration file includes notification information, and after comparing the page similarity value with the similarity threshold value to obtain a polling result of the page to be polled, the method further includes: and notifying the inspection result based on the notification information.
Specifically, after the inspection result is obtained, the system engineer may be notified of the inspection result. The content of the notification can be all the inspection results, and the notification can also be performed by taking an inspection task or an inspection system as a unit, so that an engineer can comprehensively know the inspection results; and only the part which is not passed by the inspection is notified, so that the next inspection work can be manually intervened, and the resource waste is reduced.
The configuration file also comprises notification information, such as a reserved mailbox or a contact telephone of an engineer, and when the notification is carried out, the notification information is written into a mail to be sent to the mailbox of the engineer or written into a short message to be sent to a mobile phone of the engineer.
Fig. 5 schematically illustrates an interface diagram of a configuration file in an exemplary embodiment of the present disclosure. Referring to FIG. 5, the configuration file includes three major components, first [ logic ], second [ contents ], and third [ config ].
Wherein, the [ logic ] in the configuration file comprises login information, including the URL, the user name, the password and the login button of the system. The user name, the password and the login button in the Data all contain an Xpath value, which is used for assisting subsequent Web automation tools in positioning corresponding elements on a webpage. When the value of the Type of an element is text, the Web automation tool will input text information after locating the element; when the value of Type is button, the Web automation tool will perform the action of clicking on the element.
Among other things, Web automation tools may be, for example, Selenium, which is a tool for Web application testing. The Selenium test runs directly in the browser, just as a real user is operating.
Xpath refers to the XML Path Language (XML Path Language), which is a Language used to locate a specific element in a web page.
The [ contents ] in the configuration file is an array, each piece of data represents a target webpage to be inspected, and the target webpage is a functional sub-page of a target system, namely a page to be inspected. One system to be inspected can be configured with a plurality of checked function sub-pages. This data consists of the URL of the web page and the expected page screen shots.
The [ config ] in the configuration file comprises a threshold value Standard of the similarity of the configured pages, which is used as a Standard for checking whether the page passes or not and can be adjusted according to actual conditions; email is the employee mailbox responsible for the module patrol.
In one embodiment of the disclosure, the system inspection method provided by the disclosure can be executed by a batch inspection central control system and is responsible for unified scheduling and execution. Fig. 6 schematically illustrates a composition diagram of a batch inspection central control system in an exemplary embodiment of the disclosure. Referring to fig. 6, the batch inspection central control system 600 is composed of four parts, namely an inspection function point configuration module 601, a configuration file analysis module 602, a function point verification module 603 and a result notification module 604.
The polling function point configuration module 601 may be used for a technician to prepare a function point configuration file of a system to be polled, where n Web systems are provided in total, and each system corresponds to one configuration file. When the system is required to be inspected in batches, the batch inspection central control system performs cyclic reading, and each system is inspected in sequence.
After the system to be inspected is determined, the configuration file parsing module 602 is started. Firstly, analyzing login information of a system to realize system login, analyzing page information of each function to realize page login, and then storing a page screenshot of each function sub-page. When the system to be patrolled and examined includes a plurality of pages to be patrolled and examined, the current page screenshot of each page to be patrolled and examined needs to be obtained.
For each page to be inspected, after the page screenshot of the current function sub-page is obtained, the function point checking module 603 is started, the SSIM value between the current page screenshot and the expected page screenshot is calculated, and then the SSIM value is compared with a preset threshold Standard to generate an inspection result of the page to be inspected.
After the inspection task is finished, the notification module 604 is finally started to notify the inspection result to the responsible person.
Based on the method, aiming at the characteristics of a Web system in a ToB delivery project, a complete login and automatic verification process which is uniformly scheduled by a central control module is designed, and the abnormal condition of the system is found by expressing the function point of the page to be verified as a picture form, namely according to the page screenshot in a normal state and the page screenshot at the actual inspection moment, and then expressed as a configuration file form which can be simply operated, so that complicated software test codes are prevented from being written, and the learning cost and the maintenance cost of an inspection tool are reduced.
Fig. 7 schematically illustrates a composition diagram of a system inspection device in an exemplary embodiment of the present disclosure, and as shown in fig. 7, the system inspection device 700 may include an obtaining module 701, a screenshot module 702, and a comparison module 703. Wherein:
an obtaining module 701, configured to obtain a configuration file preset by a system to be inspected in an inspection task; the configuration file comprises a uniform resource locator and an expected page screenshot of a page to be inspected in the system to be inspected;
a screenshot module 702, configured to access the page to be inspected according to the uniform resource location, and store a screenshot of the page to be inspected as a current page screenshot;
the comparison module 703 is configured to calculate a page similarity value between the current page screenshot and the expected page screenshot, and obtain an inspection result of the inspection task according to the page similarity value.
According to an exemplary embodiment of the present disclosure, the system inspection device 700 may further include a first configuration module, where the first configuration module is configured to preset a configuration file of the system to be inspected, and includes configuring at least one page to be inspected in the system to be inspected; the page to be patrolled is a functional sub-page of the system to be patrolled; extracting a uniform resource locator of the page to be inspected; and taking the screenshot of the page to be inspected in the normal state of the system to be inspected as an expected page screenshot.
According to an exemplary embodiment of the present disclosure, the system inspection device 700 may further include a second configuration module configured to configure at least one of the to-be-inspected systems in the inspection tasks.
According to an exemplary embodiment of the present disclosure, the system inspection device 700 may further include a login module, where the login module is configured to log in the system to be inspected by using a test tool according to the login information, and generate a login state; and logging in the page to be inspected based on the login state so as to access the page to be inspected according to the uniform resource positioning.
According to an exemplary embodiment of the present disclosure, the configuration file further includes a similarity threshold, and the comparing module 703 is configured to compare the page similarity value with the similarity threshold to obtain an inspection result of the page to be inspected; synthesizing the inspection result of the page to be inspected to obtain the inspection result of the system to be inspected; and synthesizing the inspection result of the system to be inspected to obtain the inspection result of the inspection task.
According to an exemplary embodiment of the present disclosure, the system inspection device 700 may further include a third configuration module, where the third configuration module is configured to preset a similarity threshold of the page to be inspected in the system to be inspected; or presetting a similarity threshold value of the system to be patrolled and examined; and configuring the similarity threshold of the system to be inspected as the similarity threshold of the page to be inspected.
According to an exemplary embodiment of the present disclosure, the configuration file includes notification information, and the system inspection device 700 may further include a notification module configured to notify the inspection result of the inspection task based on the notification information after obtaining the inspection result of the inspection task according to the page similarity value.
The specific details of each module in the system inspection device 700 are described in detail in the corresponding system inspection method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In an exemplary embodiment of the present disclosure, there is also provided a storage medium capable of implementing the above-described method. Fig. 8 schematically illustrates a schematic diagram of a computer-readable storage medium in an exemplary embodiment of the disclosure, and as shown in fig. 8, a program product 800 for implementing the above method according to an embodiment of the disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a mobile phone. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. Fig. 9 schematically shows a structural diagram of a computer system of an electronic device in an exemplary embodiment of the disclosure.
It should be noted that the computer system 900 of the electronic device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 9, a computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read-Only Memory (ROM) 902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for system operation are also stored. The CPU 901, ROM902, and RAM 903 are connected to each other via a bus 904. An Input/Output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage portion 908 including a hard disk and the like; and a communication section 909 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The computer program executes various functions defined in the system of the present disclosure when executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer 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 of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a 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. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-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 computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present disclosure also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
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 touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A system polling method, comprising:
acquiring a configuration file preset by a system to be patrolled in a patrolling task; the configuration file comprises a uniform resource locator and an expected page screenshot of a page to be inspected in the system to be inspected;
positioning and accessing the page to be inspected according to the uniform resources, and saving a screenshot of the page to be inspected as a current page screenshot;
and calculating a page similarity value between the current page screenshot and the expected page screenshot, and obtaining an inspection result of the inspection task according to the page similarity value.
2. The system inspection method according to claim 1, further comprising: presetting a configuration file of the system to be patrolled and examined, wherein the presetting of the configuration file of the system to be patrolled and examined comprises the following steps:
configuring at least one page to be inspected in the system to be inspected; the page to be patrolled is a functional sub-page of the system to be patrolled;
extracting a uniform resource locator of the page to be inspected; and
and taking the screenshot of the page to be inspected in the normal state of the system to be inspected as an expected page screenshot.
3. The system inspection method according to claim 1, further comprising: and configuring at least one system to be inspected in the inspection tasks.
4. The system inspection method according to claim 1, wherein the configuration file further includes login information, and after obtaining the configuration file preset by the system to be inspected, the method further includes:
logging in the system to be inspected by using a test tool according to the logging-in information, and generating a logging-in state;
and logging in the page to be inspected based on the login state so as to access the page to be inspected according to the uniform resource positioning.
5. The system inspection method according to claim 1, wherein the configuration file further includes a similarity threshold, and the obtaining of the inspection result of the inspection task according to the page similarity value includes:
comparing the page similarity value with the similarity threshold value to obtain a routing inspection result of the page to be routed;
synthesizing the inspection result of the page to be inspected to obtain the inspection result of the system to be inspected;
and synthesizing the inspection result of the system to be inspected to obtain the inspection result of the inspection task.
6. The system inspection method according to claim 5, further comprising:
presetting a similarity threshold value of the page to be inspected in the system to be inspected; or
Presetting a similarity threshold value of the system to be patrolled;
and configuring the similarity threshold of the system to be inspected as the similarity threshold of the page to be inspected.
7. The system inspection method according to claim 1, wherein the configuration file includes notification information, and after the inspection result of the inspection task is obtained according to the page similarity value, the method further includes:
and notifying the inspection result of the inspection task based on the notification information.
8. The utility model provides a system inspection device which characterized in that includes:
the system comprises an acquisition module, a data processing module and a data processing module, wherein the acquisition module is used for acquiring a configuration file preset by a system to be patrolled in a patrolling task; the configuration file comprises a uniform resource locator and an expected page screenshot of a page to be inspected in the system to be inspected;
the screenshot module is used for positioning and accessing the page to be patrolled according to the uniform resource and saving the screenshot of the page to be patrolled as the current page screenshot;
and the comparison module is used for calculating a page similarity value between the current page screenshot and the expected page screenshot and obtaining an inspection result of the inspection task according to the page similarity value.
9. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements a system inspection method according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the system inspection method according to any one of claims 1 to 7.
CN202111299606.6A 2021-11-04 2021-11-04 System inspection method and device, storage medium and electronic equipment Pending CN113961864A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111299606.6A CN113961864A (en) 2021-11-04 2021-11-04 System inspection method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111299606.6A CN113961864A (en) 2021-11-04 2021-11-04 System inspection method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113961864A true CN113961864A (en) 2022-01-21

Family

ID=79469359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111299606.6A Pending CN113961864A (en) 2021-11-04 2021-11-04 System inspection method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113961864A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151622A1 (en) * 2022-02-09 2023-08-17 北京罗克维尔斯科技有限公司 Page testing method, apparatus and device, and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151622A1 (en) * 2022-02-09 2023-08-17 北京罗克维尔斯科技有限公司 Page testing method, apparatus and device, and storage medium

Similar Documents

Publication Publication Date Title
CN108628748B (en) Automatic test management method and automatic test management system
CN109685089B (en) System and method for evaluating model performance
CN108073506B (en) Test method and device
CN110221948B (en) Test script generation method, test script generation device, computer device and storage medium
CN109344066B (en) Method, system and terminal for testing browser page
CN110058998A (en) Method for testing software and device
CN113407327A (en) Modeling task and data analysis method, device, electronic equipment and system
CN114756328A (en) Container cloud platform inspection method and device
CN113961864A (en) System inspection method and device, storage medium and electronic equipment
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN116431522A (en) Automatic test method and system for low-code object storage gateway
US20200167156A1 (en) Cognitive selection of software developer for software engineering task
CN115952098A (en) Performance test tuning scheme recommendation method and system
CN109669829A (en) A kind of diagnosis adjustment method, device and server based on BMC
CN115204733A (en) Data auditing method and device, electronic equipment and storage medium
CN115292187A (en) Method and device for automatically testing code-free page, electronic equipment and medium
CN113127362A (en) Object testing method, object testing device, electronic device, and readable storage medium
CN111400191A (en) Webpage security testing method and device and computer readable storage medium
CN113052509A (en) Model evaluation method, model evaluation apparatus, electronic device, and storage medium
CN112748950A (en) Software code examination method and device
CN111737129A (en) Service control method, service control device, computer readable medium and electronic equipment
CN111476349A (en) Model testing method and server
CN115190008B (en) Fault processing method, fault processing device, electronic equipment and storage medium
CN113377648B (en) Software system diagnosis method, device, electronic equipment and computer readable medium
CN117331841A (en) Interface testing method and device, electronic equipment and storage medium

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