CN109324822B - PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device - Google Patents

PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device Download PDF

Info

Publication number
CN109324822B
CN109324822B CN201810921793.9A CN201810921793A CN109324822B CN 109324822 B CN109324822 B CN 109324822B CN 201810921793 A CN201810921793 A CN 201810921793A CN 109324822 B CN109324822 B CN 109324822B
Authority
CN
China
Prior art keywords
detection
item
pwa
project
optimization
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
CN201810921793.9A
Other languages
Chinese (zh)
Other versions
CN109324822A (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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201810921793.9A priority Critical patent/CN109324822B/en
Publication of CN109324822A publication Critical patent/CN109324822A/en
Application granted granted Critical
Publication of CN109324822B publication Critical patent/CN109324822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention belongs to the technical field of computers, and particularly relates to a PWA project detection method, a computer-readable storage medium and a terminal device. The method calls a preset browser to open the PWA project to be detected; acquiring a preset project detection configuration file, and extracting a configuration detection item set for detecting the PWA project from the project detection configuration file, wherein the configuration detection item set comprises more than one detection item, and each detection item corresponds to one function of the PWA project; sequentially executing each detection item in the configuration detection item set on the PWA project according to a preset detection sequence, and recording the detection result of each detection item; and generating a detection report of the PWA item according to the detection result of each detection item in a preset format. The whole detection process can be automatically executed without the intervention of detection personnel, the dependence on the personal experience of the detection personnel is eliminated, and the detection efficiency of the PWA project is greatly improved.

Description

PWA project detection method, computer-readable storage medium and terminal device
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a PWA project detection method, a computer readable storage medium and a terminal device.
Background
A Progressive Web Application (PWA) is a brand new Web technology that has emerged in recent years, and the PWA can make the offline experience of a website better, and the experience will be better when the network connection is intermittent, and the PWA can simulate some native functions, such as notification push, and a standardized framework is used at the mobile terminal to make the Web application present the experience similar to that of the native application. However, the practical experience of the PWA project in the industry is very little, only a few large companies try to reform the project into the PWA, many hidden problems and places capable of being optimized may exist in the project reformation process, and in most cases, the detection of the PWA project can be performed only by the subjective judgment and personal experience of detection personnel, and the detection efficiency is extremely low.
Disclosure of Invention
In view of this, embodiments of the present invention provide a PWA project detection method, a computer-readable storage medium, and a terminal device, so as to solve the problem in the prior art that detection efficiency is extremely low due to detection of a PWA project by subjective judgment and personal experience of a detection person.
A first aspect of an embodiment of the present invention provides a PWA item detection method, which may include:
calling a preset browser to open a PWA project to be detected;
acquiring a preset item detection configuration file, and extracting a configuration detection item set for detecting the PWA item from the item detection configuration file, wherein the configuration detection item set comprises more than one detection item, and each detection item corresponds to one function of the PWA item;
sequentially executing each detection item in the configuration detection item set on the PWA project according to a preset detection sequence, and recording the detection result of each detection item;
and generating a detection report of the PWA item according to the detection result of each detection item in a preset format.
A second aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon computer-readable instructions that, when executed by a processor, perform the steps of:
calling a preset browser to open a PWA project to be detected;
acquiring a preset item detection configuration file, and extracting a configuration detection item set for detecting the PWA item from the item detection configuration file, wherein the configuration detection item set comprises more than one detection item, and each detection item corresponds to one function of the PWA item;
sequentially executing each detection item in the configuration detection item set on the PWA item according to a preset detection sequence, and recording the detection result of each detection item;
and generating a detection report of the PWA item according to the detection result of each detection item in a preset format.
A third aspect of the embodiments of the present invention provides a terminal device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, where the processor executes the computer-readable instructions to implement the following steps:
calling a preset browser to open a PWA project to be detected;
acquiring a preset project detection configuration file, and extracting a configuration detection item set for detecting the PWA project from the project detection configuration file, wherein the configuration detection item set comprises more than one detection item, and each detection item corresponds to one function of the PWA project;
sequentially executing each detection item in the configuration detection item set on the PWA item according to a preset detection sequence, and recording the detection result of each detection item;
and generating a detection report of the PWA item according to the detection result of each detection item in a preset format.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the method comprises the steps of presetting an item detection configuration file, configuring a configuration detection item set for detecting PWA items, wherein each detection item corresponds to one function of the PWA item, when the PWA needs to be detected, firstly calling a preset browser to open the PWA item to be detected, then extracting the configuration detection item set for detecting the PWA items from the item detection configuration file, sequentially executing all detection items in the configuration detection item set for the PWA items according to a preset detection sequence, recording detection results of all detection items, and finally generating a detection report of the PWA items according to the detection results of all detection items in a preset format. The whole detection process can be automatically executed without the intervention of detection personnel, a detection report is generated, the dependence on subjective judgment and personal experience of the detection personnel is eliminated, and the detection efficiency of the PWA project is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a flow chart of one embodiment of a method for detecting a PWA project in accordance with one embodiment of the present invention;
FIG. 2 is a schematic flow diagram of a setup process for an item detection configuration file;
FIG. 3 is a schematic flow diagram of optimizing a PWA project;
FIG. 4 is a schematic flow diagram of a process for setting up a project optimization profile;
FIG. 5 is a block diagram of an embodiment of a PWA project detection arrangement in accordance with an embodiment of the present invention;
fig. 6 is a schematic block diagram of a terminal device in an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of a PWA item detection method according to an embodiment of the present invention may include:
and step S101, calling a preset browser to open the PWA item to be detected.
In this embodiment, any one of the browsers supporting the PWA may be selected according to actual situations to open the PWA item to be detected, including but not limited to the browsers of IE, chrome, firefox, safari, opera, and so on.
Step S102, a preset item detection configuration file is obtained, and a configuration detection item set for detecting the PWA item is extracted from the item detection configuration file.
The configuration detection entry set comprises more than one detection entry, and each detection entry corresponds to one function of the PWA item.
The setup process of the item detection configuration file may include the steps as shown in fig. 2:
and step S1021, acquiring the detection mode of the PWA item.
In this embodiment, the detection modes of the PWA item may include a selection detection mode and a default detection mode.
Step S1022 determines whether the detection mode of the PWA item is the selective detection mode.
If the detection mode of the PWA item is the selected detection mode, then step S1023 and the following steps are executed, and if the detection mode of the PWA item is the default detection mode, then step S1024 is executed
Step S1023, displaying each detection entry in the global detection entry set in a preset display area, where the global detection entry set is a full set of detection entries.
The set of global detection entries includes, but is not limited to:
(1) Detecting whether a service worker file is contained;
(2) Detecting whether a service worker can normally operate or not;
(3) Detecting whether local cache content can be requested under an offline condition;
(4) Detecting whether the request resources are all on the https protocol;
(5) Json files are detected whether to be contained;
(6) Detecting whether a user can be prompted to add an item to a home screen;
(7) It is detected whether a switch setting is added.
And step S1024, receiving the selection of the detection personnel on each detection item in the global detection item set through a preset user interaction interface.
The detection personnel can select each detection item in the global detection item set through the user interaction interface, for example, the detection personnel can only select whether the detection contains a service worker file or not according to actual needs, whether the service worker can normally operate or not, and the like, and the detection personnel can also select all detection items in the global detection item set according to actual needs.
Step S1025, combining the selected detection items into the configuration detection item set, and adding the configuration detection item set into the item detection configuration file.
Step S1026, determining the candidate detection item set as the configuration detection item set, and adding the configuration detection item set to the item detection configuration file.
That is, in the default detection mode, all detection items in the global detection item set are directly selected by default without selecting detection items.
And step S103, sequentially executing each detection item in the configuration detection item set on the PWA item according to a preset detection sequence, and recording the detection result of each detection item.
Specific implementations include, but are not limited to:
(1) And detecting whether a service worker file is contained.
The Service Worker is a JS file written by JavaScript, can act on a request, can operate the browser cache, and can instantly finish the request by directly returning the cached content. Is an indispensable file in the PWA project. The method comprises the steps of detecting whether a code for introducing and registering service-worker.js is contained in an item, such as navigator. And if the registration code is not found, or the registration code exists but the introduced file cannot be found, judging that the service worker file does not exist.
(2) And detecting whether the service worker can normally operate.
The realization of the basic functions of the PWA can be ensured only if the service worker normally runs. When the project is tried to run from the browser, whether the service worker file is wrongly reported when running is detected, and if the service worker file is wrongly reported, the verification is judged not to pass. When the check is passed, the browser can detect whether the service worker in the project is successfully registered, from which time the registration success time starts, and why the time is updated finally. When the information fed back from the browser is normal, the check is passed.
(3) It is detected whether the local cache content can be requested in an offline situation.
Supporting offline web caching allows a user to see and operate previously loaded content while still offline, rather than seeing a page with a network connection failure, is yet another significant feature of the PWA project. When the project runs to the browser, the resource corresponding to the request is opened for the first time, meanwhile, the service worker intercepts the required acquired resource and stores the acquired resource in the hard disk space of the browser, and when the same resource is requested for the next time, the resource is directly read from the hard disk without sending the request again. Traversing resource names needing to be cached in the service worker file, then refreshing the project for the second time, and when refreshing for the second time, detecting whether the resources are acquired from the network or marking from the service worker character from a network tool of the browser. If the request is still acquired from the network, the request cannot be cached locally, and the check is failed. And if the resource is marked as from service worker, judging that the function is normal.
(4) It is detected whether the requested resources are all on the https protocol.
The HTTP protocol adopts plaintext to transmit information, so that the risk of information interception, information tampering and information hijacking exists, and the PWA project is limited to work only in an HTTPS environment due to the safety consideration. And detecting whether the resources requested in the project are all from the domain name of the https protocol, if so, passing the detection, and otherwise, failing the detection.
(5) Json file is detected.
Allowing sites to be added to the home screen is an important function provided by PWAs. This function implementation relies on manifest. Json file is included in the item through detection, and if the item does not exist, the detection is not passed. If yes, continuing to detect whether the size of the desktop icon referenced in the file is at least compatible with ios and android, and the referenced file can exist in the item. If the picture does not exist in the project or ios and android size cannot be compatible, the detection is not passed. If the detection is passed, then detecting whether the following attributes short _ name (for main screen display), name (for installing banner display), start _ url (application start address), display (necessarily standby or fullscreen) are contained in the manifest file, and if not, the detection is not passed. If so, the item passes.
(6) It is detected whether the user can be prompted to add an item to the home screen.
The guide user adds PWA to the main screen, can provide better application experience for the user, and more importantly, adds to the main screen back user can convenient and fast ground open the website, has both increased website volume of visiting, has also improved user's viscidity simultaneously. It is obvious that most users do not actively complete the above operation, so that the application installation banner needs to be timely popped up to guide the user to perform the adding operation. The browser automatically displays the banner when the PWA site meets the following conditions:
1. json, the file needs to be configured with the following attributes short _ name (for main screen display), name (for installing banner display), cons (which must contain an icon declaration with mime type being image/png), start _ url (application start address), display (must be standby or fullscreen).
2. And the station registers the Service Worker.
3. The site supports HTTPS access.
4. The site is accessed at least twice in the same browser, with an interval of at least 5 minutes.
The previous 3 points have been included in the previous test item, and for point 4, the item may be automatically simulated to be accessed at least twice in the same browser, with an interval of at least 5 minutes. A check is made to see if the banner can pop up suggesting that the user add to the home screen. If so, the test is passed, and if not, the test is failed.
(7) It is detected whether a switch setting is added.
PWA belongs to emerging technique, and the present specification is still in the continuous perfect stage, in order to guarantee that original project goes wrong in production after the upgrading in production, can in time reduce the loss to minimum, need whether to start through the project on the switch control line, when the switch is opened, PWA function normal operating, when the switch is closed, PWA function does not carry out, does not influence normal function simultaneously. Js file operation is fundamentally relied on for the operation of the PWA project, and the project can know whether switch setting is added or not by detecting whether a code for registering and operating the service worker file contains a switch code (specifically, judging whether the service worker registration code is covered by a judgment condition, such as if else or a ternary expression, and then checking whether a cancellation service worker code exists or not). If so, the detection is passed, otherwise, the detection is not passed.
And step S104, generating a detection report of the PWA item according to the detection result of each detection item in a preset format.
The embodiment of the invention sequentially executes all the detection items, records the detection results one by one, and generates an automatic detection report in an html file format after all the detections are finished.
Further, after generating a detection report of the PWA item according to a preset format based on the detection result of each detection entry, the method may further include the steps shown in fig. 3:
step S301, obtaining a preset project optimization configuration file, and extracting a configuration optimization entry set for optimizing the PWA project from the project optimization configuration file.
The configuration optimization entry set comprises more than one optimization entry, each optimization entry corresponds to one abnormal function of the PWA item, and the abnormal function is a function corresponding to a detection entry with a detection result of failing in a detection report of the PWA item.
The setting process of the project optimization configuration file may include the steps as shown in fig. 4:
step S3011, sequentially searching for optimized entries corresponding to each abnormal function in a preset global optimized entry set, and combining the searched optimized entries into a candidate optimized entry set.
The global optimization entry set is a full set of optimization entries, and the candidate optimization entry set is a subset of the global optimization entry set.
The set of global optimization entries includes, but is not limited to:
(1) Automatically generating a service worker file of the project;
(2) Html page caching all content requested by the home page index;
(3) Adding switch control to a project service worker;
(4) A mailset file is automatically generated.
And step S3012, obtaining an optimization mode of the PWA project.
In this embodiment, the optimization mode of the PWA project may include a selection optimization mode and a default optimization mode.
And step S3013, judging whether the optimization mode of the PWA project is a selection optimization mode.
And if the optimization mode of the PWA project is the selected optimization mode, executing step S3014 and the subsequent steps, and if the optimization mode of the PWA project is the default optimization mode, executing step S3017.
Step S3014, displaying each optimized entry in the candidate optimized entry set in a preset display area.
And step S3015, receiving a selection of each optimized item in the candidate optimized item set by a detection person through a preset user interaction interface.
For example, the detection personnel may only select a service worker file for optimizing an automatically generated project according to actual needs, cache all contents requested by a home page index.
And S3016, combining the selected optimized items into the configuration optimized item set, and adding the configuration optimized item set into the project optimized configuration file.
Step S3017, determining the candidate optimized entry set as the configuration optimized entry set, and adding the configuration optimized entry set into the project optimized configuration file.
That is, in the default optimization mode, all the optimization entries in the global optimization entry set are directly selected by default without selecting the optimization entries.
And step S302, sequentially executing each optimized item in the configuration optimized item set to the PWA item according to a preset optimization sequence to obtain an optimized PWA item.
Specific implementations include, but are not limited to:
(1) And automatically generating a service worker file of the project.
The process of automatically generating the service worker is actually the filling of a template, a service worker file frame is preset by the plug-in, the file can be inserted into the template according to the configuration information of the user on the optimized page, and the file can also be added into a project root directory by using default configuration and placed into a newly-built folder with the name sw.
(2) Html page all content requested by the home page index.
And enabling the home page to be opened in an off-line state, and if a user sets which specific page needs to be cached, setting service worker caching for all resources requested by the page. If the user does not specify which page content needs to be cached, usually, the home page is a portal of the web app, and the basic functions of the website can be introduced and provided for the client, so that the home page file with the name of index.
(3) And adding switch control for the project service worker.
The optimized content needs a user to provide an interface address for switch control, and if the address is not found, an exception is thrown and the user can directly skip the address. If the address is provided, a switch configuration code is automatically inserted into the code of the service worker registration operation according to the switch address.
(4) A mailset file is automatically generated.
The html test report provides a mailest configuration interface, and after the user selects the html test report, a mailfset file is automatically generated. The optimized content needs a user to provide specific information required by configuration, and if the uploaded pictures are not found, the abnormal pictures are thrown out and directly skipped. If a picture is included, but the configuration information is missing, the missing configuration information will adopt default settings. Default short _ name is set to test _ short _ name, name is set to test _ pwa, trat _ url is set to root directory index.
After the optimization is completed, the packing and constructing command can be executed again, the automatic detection is carried out again, and a detection report is generated.
In summary, in the embodiment of the present invention, an item detection configuration file is preset, and a configuration detection entry set for detecting a PWA item is configured in the item detection configuration file, where each detection entry corresponds to a function of the PWA item, when it is required to detect the PWA, a preset browser is first invoked to open the PWA item to be detected, then a configuration detection entry set for detecting the PWA item is extracted from the item detection configuration file, each detection entry in the configuration detection entry set is sequentially executed on the PWA item according to a preset detection order, a detection result of each detection entry is recorded, and finally a detection report of the PWA item is generated according to a preset format from the detection result of each detection entry. The whole detection process can be automatically executed without the intervention of detection personnel, a detection report is generated, the dependence on subjective judgment and personal experience of the detection personnel is eliminated, and the detection efficiency of the PWA project is greatly improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not limit the implementation process of the embodiments of the present invention in any way.
Fig. 5 is a block diagram of an embodiment of a PWA item detection apparatus according to an embodiment of the present invention, which corresponds to the PWA item detection method described in the above embodiments.
In this embodiment, a PWA item detection apparatus may include:
a PWA item opening module 501, configured to invoke a preset browser to open a PWA item to be detected;
a detection configuration file obtaining module 502, configured to obtain a preset item detection configuration file, and extract a configuration detection entry set for detecting the PWA item from the item detection configuration file, where the configuration detection entry set includes more than one detection entry, and each detection entry corresponds to a function of the PWA item;
a detection entry executing module 503, configured to sequentially execute each detection entry in the configuration detection entry set on the PWA item according to a preset detection order, and record a detection result of each detection entry;
and a detection report generation module 504, configured to generate a detection report of the PWA item according to a preset format from the detection result of each detection entry.
Further, the PWA item detection apparatus may further include:
an optimized configuration file acquisition module, configured to acquire a preset project optimized configuration file, and extract a configuration optimized entry set for optimizing the PWA project from the project optimized configuration file, where the configuration optimized entry set includes more than one optimized entry, each optimized entry corresponds to an abnormal function of the PWA project, and the abnormal function is a function corresponding to a detection entry whose detection result is failed in a detection report of the PWA project;
and the optimization item execution module is used for sequentially executing each optimization item in the configuration optimization item set on the PWA item according to a preset optimization sequence to obtain an optimized PWA item.
Further, the PWA item detection apparatus may further include:
an optimized entry searching module, configured to sequentially search optimized entries corresponding to each abnormal function in a preset global optimized entry set, and combine the searched optimized entries into a candidate optimized entry set, where the global optimized entry set is a full set of optimized entries, and the candidate optimized entry set is a subset of the global optimized entry set;
the optimization mode acquisition module is used for acquiring the optimization mode of the PWA project;
the optimized item display module is used for displaying each optimized item in the candidate optimized item set in a preset display area if the optimization mode of the PWA project is a selective optimization mode;
the optimization item selection module is used for receiving the selection of each optimization item in the candidate optimization item set by a detection person through a preset user interaction interface;
and the first setting module is used for combining the selected optimized items into the configuration optimized item set and adding the configuration optimized item set into the project optimized configuration file.
Further, the PWA item detection apparatus may further include:
and the second setting module is used for determining the candidate optimization entry set as the configuration optimization entry set and adding the configuration optimization entry set into the project optimization configuration file if the optimization mode of the PWA project is a default optimization mode.
Further, the PWA item detection apparatus may further include:
the detection mode acquisition module is used for acquiring the detection mode of the PWA item;
a detection entry display module, configured to display each detection entry in a global detection entry set in a preset display area if a detection mode of the PWA item is a selective detection mode, where the global detection entry set is a full set of detection entries;
the detection item selection module is used for receiving the selection of detection personnel on each detection item in the global detection item set through a preset user interaction interface;
and the third setting module is used for combining the selected detection items into the configuration detection item set and adding the configuration detection item set into the item detection configuration file.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Fig. 6 shows a schematic block diagram of a terminal device according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown.
In this embodiment, the terminal device 6 may be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal device 6 may include: a processor 60, a memory 61, and computer readable instructions 62 stored in said memory 61 and executable on said processor 60, such as computer readable instructions to perform the PWA item detection method described above. The processor 60, when executing the computer readable instructions 62, implements the steps in the various PWA item detection method embodiments described above, such as steps S101-S104 shown in fig. 1. Alternatively, the processor 60, when executing the computer readable instructions 62, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 501 to 504 shown in fig. 5.
Illustratively, the computer readable instructions 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to implement the present invention. The one or more modules/units may be a series of computer-readable instruction segments capable of performing specific functions, which are used to describe the execution process of the computer-readable instructions 62 in the terminal device 6.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing the computer readable instructions and other instructions and data required by the terminal device 6. The memory 61 may also be used to temporarily store data that has been output or is to be output.
Each functional unit in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of computer readable instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute 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 (RAM), a magnetic disk or an optical disk, and the like, which can store computer readable instructions.
The above-mentioned embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A method for detecting a PWA item, comprising:
calling a preset browser to open a PWA project to be detected;
acquiring a preset item detection configuration file, and extracting a configuration detection item set for detecting the PWA item from the item detection configuration file, wherein the configuration detection item set comprises more than one detection item, and each detection item corresponds to one function of the PWA item; the setting process of the project detection configuration file comprises the following steps: acquiring a detection mode of the PWA project; if the detection mode of the PWA project is a selective detection mode, displaying each detection item in a global detection item set in a preset display area, wherein the global detection item set is a full set of detection items; receiving the selection of each detection item in the global detection item set by a detection person through a preset user interaction interface; combining the selected detection items into the configuration detection item set, and adding the configuration detection item set into the item detection configuration file;
sequentially executing each detection item in the configuration detection item set on the PWA project according to a preset detection sequence, and recording the detection result of each detection item;
and generating a detection report of the PWA item according to the detection result of each detection item in a preset format.
2. The PWA item detection method according to claim 1, further comprising, after generating a detection report of the PWA item according to a preset format from the detection result of each detection item:
acquiring a preset project optimization configuration file, and extracting a configuration optimization entry set for optimizing the PWA project from the project optimization configuration file, wherein the configuration optimization entry set comprises more than one optimization entry, each optimization entry corresponds to an abnormal function of the PWA project, and the abnormal function is a function corresponding to a detection entry with a detection result of failing in a detection report of the PWA project;
and sequentially executing each optimized item in the configuration optimized item set to the PWA item according to a preset optimization sequence to obtain an optimized PWA item.
3. The PWA project detection method according to claim 2, wherein the project optimization configuration file setting process includes:
sequentially searching optimized items corresponding to each abnormal function in a preset global optimized item set, and combining the searched optimized items into a candidate optimized item set, wherein the global optimized item set is a full set of optimized items, and the candidate optimized item set is a subset of the global optimized item set;
obtaining an optimization mode of the PWA project;
if the optimization mode of the PWA project is a selection optimization mode, displaying each optimization item in the candidate optimization item set in a preset display area;
receiving the selection of each optimization item in the candidate optimization item set by a detection person through a preset user interaction interface;
and combining the selected optimized items into the configuration optimized item set, and adding the configuration optimized item set into the project optimized configuration file.
4. The PWA item detection method according to claim 3, further comprising:
and if the optimization mode of the PWA project is a default optimization mode, determining the candidate optimization entry set as the configuration optimization entry set, and adding the configuration optimization entry set into the project optimization configuration file.
5. A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement the steps of the PWA item detection method as claimed in any one of claims 1 to 4.
6. A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor when executing the computer readable instructions performs the steps of:
calling a preset browser to open a PWA project to be detected;
acquiring a preset item detection configuration file, and extracting a configuration detection item set for detecting the PWA item from the item detection configuration file, wherein the configuration detection item set comprises more than one detection item, and each detection item corresponds to one function of the PWA item; the setting process of the project detection configuration file comprises the following steps: acquiring a detection mode of the PWA item; if the detection mode of the PWA project is a selection detection mode, displaying each detection item in a global detection item set in a preset display area, wherein the global detection item set is a full set of detection items; receiving the selection of a detection person on each detection item in the global detection item set through a preset user interaction interface; combining the selected detection items into the configuration detection item set, and adding the configuration detection item set into the item detection configuration file;
sequentially executing each detection item in the configuration detection item set on the PWA item according to a preset detection sequence, and recording the detection result of each detection item;
and generating a detection report of the PWA item according to the detection result of each detection item in a preset format.
7. The terminal device of claim 6, further comprising, after generating the detection report of the PWA item according to a preset format based on the detection result of each detection item:
acquiring a preset project optimization configuration file, and extracting a configuration optimization entry set for optimizing the PWA project from the project optimization configuration file, wherein the configuration optimization entry set comprises more than one optimization entry, each optimization entry corresponds to an abnormal function of the PWA project, and the abnormal function is a function corresponding to a detection entry with a detection result of failing in a detection report of the PWA project;
and sequentially executing each optimized item in the configuration optimized item set to the PWA item according to a preset optimization sequence to obtain an optimized PWA item.
8. The terminal device according to claim 7, wherein the setting process of the project optimization configuration file comprises:
sequentially searching optimized items corresponding to each abnormal function in a preset global optimized item set, and combining the searched optimized items into a candidate optimized item set, wherein the global optimized item set is a full set of optimized items, and the candidate optimized item set is a subset of the global optimized item set;
obtaining an optimization mode of the PWA project;
if the optimization mode of the PWA project is the optimization selection mode, displaying each optimization item in the candidate optimization item set in a preset display area;
receiving selection of each optimized item in the candidate optimized item set by a detector through a preset user interaction interface;
and combining the selected optimized items into the configuration optimized item set, and adding the configuration optimized item set into the project optimized configuration file.
CN201810921793.9A 2018-08-14 2018-08-14 PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device Active CN109324822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810921793.9A CN109324822B (en) 2018-08-14 2018-08-14 PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810921793.9A CN109324822B (en) 2018-08-14 2018-08-14 PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device

Publications (2)

Publication Number Publication Date
CN109324822A CN109324822A (en) 2019-02-12
CN109324822B true CN109324822B (en) 2023-03-31

Family

ID=65263651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810921793.9A Active CN109324822B (en) 2018-08-14 2018-08-14 PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device

Country Status (1)

Country Link
CN (1) CN109324822B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3737108B1 (en) * 2019-05-10 2021-08-25 JT International S.A. Configuring a personal computing device for communication with an aerosol generation device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340429B (en) * 2011-10-12 2014-05-07 北京锐安科技有限公司 Automatic Internet protocol recovery detection method
US8656378B2 (en) * 2012-11-08 2014-02-18 Concurix Corporation Memoization configuration file consumed at compile time
CN104657666B (en) * 2013-11-21 2019-04-02 腾讯科技(深圳)有限公司 A kind of optimization method and device of terminal operating environment
CN104111847B (en) * 2014-06-26 2017-12-12 北京奇虎科技有限公司 A kind of method and device for improving game running speed
US20160210689A1 (en) * 2015-01-16 2016-07-21 Google Inc. Content item configuration optimization
CN106686037B (en) * 2015-11-09 2020-10-16 阿里巴巴(中国)有限公司 Page detection method, device, equipment and system
CN105530541A (en) * 2015-12-16 2016-04-27 北京四达时代软件技术股份有限公司 Set top box hardware test method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
伍江江等.可信平台上操作系统核心文件检测研究与实现.《微电子学与计算机》.2007,109-112. *

Also Published As

Publication number Publication date
CN109324822A (en) 2019-02-12

Similar Documents

Publication Publication Date Title
WO2018223717A1 (en) Webpage front-end testing method, device, system, apparatus and readable storage medium
CN111061526B (en) Automatic test method, device, computer equipment and storage medium
US8578019B2 (en) Monitoring the health of web page analytics code
US20140173415A1 (en) Interactivity Analyses of Web Resources Based on Reload Events
CN110808897A (en) Proxy access method, user equipment, storage medium, device and system
CN107133165B (en) Browser compatibility detection method and device
CN108399119B (en) Method and device for data processing and automatic testing of browsing service kernel engine
CN106547769B (en) DOI display method and device
US10951486B2 (en) Terminal device, UI expansion method, and UI expansion program
CN110929183A (en) Data processing method, device and machine readable medium
CN110798445A (en) Public gateway interface testing method and device, computer equipment and storage medium
CN110750443A (en) Webpage testing method and device, computer equipment and storage medium
US20160328110A1 (en) Method, system, equipment and device for identifying image based on image
CN102662838B (en) The adjustment method of Flash and system in a kind of browser
CN109190067A (en) Browser input frame methods of exhibiting, device, computer equipment and storage medium
CN111431767A (en) Multi-browser resource synchronization method and device, computer equipment and storage medium
CN109324822B (en) PWA (public warning assistant) item detection method, computer-readable storage medium and terminal device
CN114237651A (en) Installation method and device of cloud native application, electronic equipment and medium
US10095791B2 (en) Information search method and apparatus
CN108958855B (en) Page jump method, device and system
CN105068926A (en) Program test method and device thereof
CN109446451B (en) Webpage display method, device, medium and computing equipment
CN109101429B (en) Method and device for debugging browser page of set top box
CN111258904A (en) Webpage element testing method and related device
US20130036374A1 (en) Method and apparatus for providing a banner on a website

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