New feature compatibility detection system and method, electronic device and readable storage medium
Through the new feature compatibility detection system, the compatibility of new features and browsers is detected in real time, and the time-consuming and laborious problems of compile-time conversion opacity and manual query testing are solved, and compatibility detection and alarms are realized in the encoding process, reducing development Cost and page faults.
Patent Information
- Application Number
- CN202011488582.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-16
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-12-16
AI Technical Summary
The prior art converts new features into browser-recognizable syntax at compile time, the process is opaque and cannot detect compatibility in real time, resulting in page errors and repetitive manual query testing, which is time-consuming and labor-intensive, and increases development costs.
Provide a new feature compatibility detection system, including database, file configuration module, compatibility detection module and unit testing module, to detect the compatibility of new features with the browser in real time, and provide compatibility detection results and alarm information during the encoding process. , reduce subsequent testing work.
In real-time detection of new features compatibility during the coding process, reduce page errors, save testing costs, improve development efficiency, reduce enterprise costs, and reduce human query time.
Smart Images

Figure CN112540925B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of browser compatibility detection, and in particular to a new feature compatibility detection system and method, electronic equipment and readable storage medium. Background Art
[0002] With the continuous development of front-end technology, the ECMAScript standard of Javascript is also being updated day by day. The new features have been greatly tested in terms of browser compatibility. How to ensure that the new features used in the development process can be compatible with the target browsers, and how to be compatible with the target browsers when using new CSS features are issues that need to be solved urgently.
[0003] The prior art solves the problem by compiling new features into a version that can be recognized by the browser. For example, for the new features of ES6 (ECMAScript 6), the currently used solution is to use a syntax parsing conversion tool to compile the syntax of ES6 into the syntax of ES5 (ECMAScript 5) that can be recognized by most browsers. The common conversion solutions include babel, traceur, jsx, typescript, and es6-shim. Taking the more commonly used babel as an example, although this solution can escape ES6, not all new features can be successfully translated into the syntax recognized by the browser. In addition, this method can only be converted during compilation, and there is no prompt during the process, resulting in not knowing which ones can be successfully translated and which ones cannot be translated. Such a process is equivalent to a black box for users, who do not know what happened inside and cannot receive feedback from this process. Therefore, the disadvantage of this type of solution that converts new features during compilation to adapt to various browsers is that if a new feature that cannot be translated is accidentally used and escapes the conversion of the compilation tool, a page error will result.
[0004] During the coding process, the compatibility of new features (JavaScript or CSS) is mostly handled manually by searching on the caniuse official website, and repeated testing is performed with different browsers during the testing phase. This kind of manual query and test behavior may have some subjective factors or incomplete testing problems, which is time-consuming and labor-intensive, and is also repetitive work. For example, if N users use the same new feature, and no one knows the compatibility of this new feature, then N users have to check N times, and the testing workload is also N times, which is repetitive work and wastes manpower. In the long run, this way of handling compatibility during the coding process wastes costs for enterprises and also restricts the development of front-end technology. Summary of the invention
[0005] In order to solve the problem that in the prior art, the syntax of new features can only be translated into syntax recognizable by the browser during compilation, and manual detection of the compatibility of new features is time-consuming and laborious, and the detection results cannot be obtained intuitively, the embodiments of the present invention provide a new feature compatibility detection system and method, electronic device and readable storage medium, which can detect the compatibility of new features with browsers in real time while code is being written, and can save the cost of querying the compatibility of new features and subsequent testing.
[0006] The embodiment of the present invention provides a new feature compatibility detection system, including a database, a file configuration module, a compatibility detection module, and a unit testing module:
[0007] The database stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content;
[0008] The file configuration module is used to generate a browser to be detected based on the browser input before encoding, and to configure a new feature to be detected based on the code input during encoding;
[0009] The compatibility detection module is used to receive and search the database based on the new feature to be detected, and compare the search result with the received browser to be detected, and determine the compatibility detection result based on the search result and the comparison result, wherein the compatibility detection result includes a compatible configuration group and an incompatible configuration group;
[0010] The unit test module is used to receive and perform unit test based on the compatible configuration group, and selectively output corresponding unit test results according to whether the compatible configuration group passes the unit test.
[0011] Preferably, the new feature compatibility detection system further includes a prompt alarm module, which is used to receive and output corresponding prompt information and / or alarm information based on the incompatible configuration group or unit test results.
[0012] Preferably, in the new feature compatibility detection system, the retrieval result is compared with the received browser to be detected, and a compatibility detection result is determined based on the retrieval result and the comparison result, and the compatibility detection result includes a compatible configuration group and an incompatible configuration group, specifically including:
[0013] When the search result shows that no target browser compatible with the new feature to be detected is found, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group, and the incompatible configuration group is fed back to the prompt alarm module;
[0014] When the search result is that a target browser compatible with the new feature to be detected is retrieved, the retrieved target browser is compared with the browser to be detected. If the comparison result shows that the browser to be detected is different from the retrieved target browser, the new feature to be detected and the browser to be detected are returned as an incompatible configuration group, and the incompatible configuration group is fed back to the prompt alarm module;
[0015] When the comparison result shows that the browser to be detected is the same as the retrieved target browser, the new feature to be detected and the browser to be detected are returned to a compatible configuration group.
[0016] Preferably, in the new feature compatibility detection system, the selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test specifically includes:
[0017] When the compatible configuration group passes the unit test, the result indicating that the compatible configuration group passes the unit test is output;
[0018] When the compatible configuration group fails the unit test, the result indicating that the compatible configuration group fails the unit test is output, and the incompatible configuration group is fed back to the prompt alarm module;
[0019] The output incompatible configuration group is returned to the database to update the database.
[0020] An embodiment of the present invention provides a new feature compatibility detection method, including:
[0021] Generate a browser to be detected based on the browser input before coding, and configure a new feature to be detected based on the code input during coding;
[0022] Receiving and searching in a database based on the new feature to be detected, and comparing the search result with the received browser to be detected, and determining a compatibility detection result based on the search result and the comparison result, wherein the compatibility detection result includes a compatible configuration group and an incompatible configuration group;
[0023] receiving and performing unit testing based on the compatible configuration group, and selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test;
[0024] The database stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content.
[0025] Preferably, the new feature compatibility detection method further comprises:
[0026] Receive and output corresponding prompt information and / or warning information based on the incompatible configuration group or unit test results.
[0027] Preferably, in the new feature compatibility detection method, the retrieval result is compared with the received browser to be detected, and a compatibility detection result is determined based on the retrieval result and the comparison result, and the compatibility detection result includes a compatible configuration group and an incompatible configuration group, specifically including:
[0028] When the search result is that no target browser compatible with the new feature to be detected is found, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group;
[0029] When the search result is that a target browser compatible with the new feature to be detected is retrieved, the retrieved target browser is compared with the browser to be detected. If the comparison result shows that the browser to be detected is different from the retrieved target browser, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group;
[0030] When the comparison result shows that the browser to be detected is the same as the retrieved target browser, the new feature to be detected and the browser to be detected are returned to a compatible configuration group.
[0031] Preferably, in the new feature compatibility detection method, the step of selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test specifically includes:
[0032] When the compatible configuration group passes the unit test, the result indicating that the compatible configuration group passes the unit test is output;
[0033] When the compatible configuration group fails the unit test, outputting a result indicating that the compatible configuration group fails the unit test;
[0034] The output incompatible configuration group is returned to the database to update the database.
[0035] An embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the new feature compatibility detection method when executing the program.
[0036] An embodiment of the present invention provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the new feature compatibility detection method are implemented.
[0037] In the new feature compatibility detection system provided by the embodiment of the present invention, the database is used to save and update the new features and their compatibility as the basis for compatibility detection. The compatibility of the new features used is monitored in real time when the code is written, so that the code writer can find out in time whether the new features are compatible with the browsers they want to be compatible with, and the compatibility can be detected in advance directly in the coding stage; the built-in unit test can advance the compatibility detection to before coding, without relying solely on the compilation tool, and also solves the problem of the page caused by the inability of the compilation tool to compile certain new features. When these problems are exposed in advance during coding, problems caused by browser compatibility can also be handled in advance, which can reduce the work of subsequent testers, save enterprise costs, and reduce the time for developers to manually query when using new features. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A schematic diagram of a new feature compatibility detection system provided by an embodiment of the present invention;
[0040] Figure 2 A schematic diagram of a new feature compatibility detection method provided by an embodiment of the present invention;
[0041] Figure 3 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] Figure 1 A schematic diagram of a new feature compatibility detection system provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the system includes: a database 10, a file configuration module 20, a compatibility detection module 30, and a unit testing module 40:
[0044] The database 10 stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content.
[0045] The initial data in the database 10 can be obtained from caniuse, for example. In the subsequent detection process, the database 10 can be added or deleted, and iteratively updated through the new data of caniuse or the feedback results of the unit test module 40, so that the database 10 is constantly updated and more accurate. Some update permissions can also be given to specific users. These specific users can submit database 10 update applications, and the database 10 can be updated after being reviewed and approved. These specific users include database 10 maintenance personnel, etc. At least one target browser can include multiple browsers in the prior art, which can be browsers of various versions, such as different versions of Firefox, Google, Baidu, etc.
[0046] The file configuration module 20 is used to generate a browser to be detected based on the browser input into the editor before coding, and to configure a new feature to be detected based on the code input during coding.
[0047] For example, when a user wants to start writing a piece of code, before writing the code, he needs to consider which browsers the code needs to be compatible with. At this time, the file configuration module 20 can be used to preset a configuration file. Some browsers that you want to be compatible with can be written into this configuration file. After writing, it is equivalent to configuring the browser to be detected, and then programming can begin. During the programming process, the new features to be detected are configured based on the code entered during the encoding process. According to the new feature compatibility detection system in this case, it can detect whether the new features to be detected are compatible with the browsers to be detected preset before programming.
[0048] Use the API in the editor to wrap the compatible software and form a custom plug-in for the editor. Use the browser and detection method that need to be adapted as the plug-in configuration to achieve real-time detection of the input code during the coding process, or provide the user with a detection button. When the detection button is triggered, detection is performed, providing active or passive detection methods.
[0049] The compatibility detection module 30 is used to receive and search the database 10 based on the new feature to be detected, and compare the search result with the received browser to be detected, and determine the compatibility detection result based on the search result and the comparison result. The compatibility detection result includes a compatible configuration group and an incompatible configuration group.
[0050] Preferably, it further comprises a prompt and alarm module, which is used to receive and output corresponding prompt information and / or alarm information based on the incompatible configuration group or unit test results.
[0051] The new feature to be detected is searched in the database 10, that is, it is queried whether the new feature to be detected is in the database 10. If it is, the search result is further compared with the received browser to be detected; that is, the search result is compared with the received browser to be detected, and the compatibility detection result is determined based on the search result (including the queried new feature and the target browser compatible with the new feature) and the comparison result. The compatibility detection result includes a compatible configuration group and an incompatible configuration group, which specifically include the following situations:
[0052] When the search result shows that no target browser compatible with the new feature to be detected is found, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group, and the incompatible configuration group is fed back to the prompt alarm module;
[0053] When the search result is that a target browser compatible with the new feature to be detected is retrieved, the retrieved target browser is compared with the browser to be detected. If the comparison result shows that the browser to be detected is different from the retrieved target browser, the new feature to be detected and the browser to be detected are returned as an incompatible configuration group, and the incompatible configuration group is fed back to the prompt alarm module;
[0054] When the comparison result shows that the browser to be detected is the same as the retrieved target browser, the new feature to be detected and the browser to be detected are returned to a compatible configuration group.
[0055] The prompt alarm module outputs corresponding prompt information according to the incompatible configuration group output by the compatibility detection module 30. The result of this stage indicates which browsers are incompatible with the new features, and the user can be prompted.
[0056] The unit test module 40 is used to receive and perform unit test based on the compatible configuration group, and selectively output corresponding unit test results according to whether the compatible configuration group passes the unit test.
[0057] The selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test specifically includes:
[0058] When the compatible configuration group passes the unit test, the result indicating that the compatible configuration group passes the unit test is output;
[0059] When the compatible configuration group fails the unit test, the result indicating that the compatible configuration group fails the unit test is output, and the incompatible configuration group is fed back to the prompt alarm module;
[0060] The unit testing module 40 is further configured to return the output incompatible configuration group to the database 10 to update the database 10 .
[0061] The prompt alarm module outputs corresponding alarm information according to the incompatible configuration group output by the unit test module 40. The result of this stage indicates that the compatibility detection module 30 detects which browsers are compatible with the new feature and the result is wrong. The compatibility detection module 30 or the database 10 of the alarm correction system can be notified, and the incompatible configuration group is fed back to the user and the database 10 is partially deleted and updated according to the result. The compatible configuration group that passes the unit test does not need to be fed back, which can save the amount of information in the coding process. The information is fed back in real time, so it is normal by default that there is no feedback.
[0062] In the new feature compatibility detection system of this case, database 10 is used to save and update new features and their compatibility as the basis for compatibility detection. The compatibility of new features used is monitored in real time when the code is written, so that code writers can promptly find out whether the new features are compatible with the desired browsers. Compatibility can be detected in advance directly in the coding stage. Built-in unit testing can reduce the work of subsequent testers, save enterprise costs, and reduce the time for developers to manually query when using new features.
[0063] Through this case, coders can detect the compatibility of new features used in real time when coding, and give prompts, without having to check the availability of new features online, and testers do not need to find different computers and different browsers to test by version during testing. This can greatly reduce the time of test developers, save costs for enterprises, and enable compatibility detection before coding, instead of relying solely on compilation tools. It also solves page problems caused by the inability of compilation tools to compile certain new features. Exposing these problems in advance during coding can also prevent problems caused by browser compatibility in advance.
[0064] Figure 2 A schematic diagram of a new feature compatibility detection method provided by an embodiment of the present invention, such as Figure 2 As shown, the method includes:
[0065] S1: Generate a browser to be detected based on the browser input before encoding, and configure a new feature to be detected based on the code input during the encoding process;
[0066] S2: receiving and searching in the database 10 based on the new feature to be detected, and comparing the search result with the received browser to be detected, and determining a compatibility detection result based on the search result and the comparison result, wherein the compatibility detection result includes a compatible configuration group and an incompatible configuration group;
[0067] S3: receiving and performing unit testing based on the compatible configuration group, and selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test;
[0068] The database 10 stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content.
[0069] Also includes:
[0070] Receive and output corresponding prompt information and / or warning information based on the incompatible configuration group or unit test results.
[0071] The retrieval result is compared with the received browser to be detected, and a compatibility detection result is determined based on the retrieval result and the comparison result. The compatibility detection result includes a compatible configuration group and an incompatible configuration group, and specifically includes:
[0072] When the search result is that no target browser compatible with the new feature to be detected is found, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group;
[0073] When the search result is that a target browser compatible with the new feature to be detected is retrieved, the retrieved target browser is compared with the browser to be detected. If the comparison result shows that the browser to be detected is different from the retrieved target browser, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group;
[0074] When the comparison result shows that the browser to be detected is the same as the retrieved target browser, the new feature to be detected and the browser to be detected are returned to a compatible configuration group.
[0075] The selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test specifically includes:
[0076] When the compatible configuration group passes the unit test, the result indicating that the compatible configuration group passes the unit test is output;
[0077] When the compatible configuration group fails the unit test, outputting a result indicating that the compatible configuration group fails the unit test;
[0078] The unit testing module 40 is further configured to return the output incompatible configuration group to the database 10 to update the database 10 .
[0079] The working principle of the new feature compatibility detection method of the present embodiment corresponds to the new feature compatibility detection system of the above-mentioned embodiment, and will not be described in detail here.
[0080] Figure 3 An example of a physical structure diagram of an electronic device is shown, and the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute a new feature compatibility detection method, which includes:
[0081] Using the new feature compatibility detection model to perform new feature compatibility detection on the target image;
[0082] The method for generating the new feature compatibility detection model includes:
[0083] S1: Generate a browser to be detected based on the browser input before encoding, and configure a new feature to be detected based on the code input during the encoding process;
[0084] S2: receiving and searching in the database 10 based on the new feature to be detected, and comparing the search result with the received browser to be detected, and determining a compatibility detection result based on the search result and the comparison result, wherein the compatibility detection result includes a compatible configuration group and an incompatible configuration group;
[0085] S3: receiving and performing unit testing based on the compatible configuration group, and selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test;
[0086] The database 10 stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content.
[0087] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0088] On the other hand, an embodiment of the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute a new feature compatibility detection method, the method comprising:
[0089] Using the new feature compatibility detection model to perform new feature compatibility detection on the target image;
[0090] The method for generating the new feature compatibility detection model includes:
[0091] S1: Generate a browser to be detected based on the browser input before encoding, and configure a new feature to be detected based on the code input during the encoding process;
[0092] S2: receiving and searching in the database 10 based on the new feature to be detected, and comparing the search result with the received browser to be detected, and determining a compatibility detection result based on the search result and the comparison result, wherein the compatibility detection result includes a compatible configuration group and an incompatible configuration group;
[0093] S3: receiving and performing unit testing based on the compatible configuration group, and selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test;
[0094] The database 10 stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content.
[0095] In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, a new feature compatibility detection method is implemented, the method comprising:
[0096] Using the new feature compatibility detection model to perform new feature compatibility detection on the target image;
[0097] The method for generating the new feature compatibility detection model includes:
[0098] S1: Generate a browser to be detected based on the browser input before encoding, and configure a new feature to be detected based on the code input during the encoding process;
[0099] S2: receiving and searching in the database 10 based on the new feature to be detected, and comparing the search result with the received browser to be detected, and determining a compatibility detection result based on the search result and the comparison result, wherein the compatibility detection result includes a compatible configuration group and an incompatible configuration group;
[0100] S3: receiving and performing unit testing based on the compatible configuration group, and selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test;
[0101] The database 10 stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content.
[0102] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A new feature compatibility detection system, characterized in that: Including database, file configuration module, compatibility detection module, unit testing module: The database stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content; The file configuration module is used to generate a browser to be detected based on the browser input before encoding, and to configure a new feature to be detected based on the code input during encoding; The compatibility detection module is used to receive and search the database based on the new feature to be detected, and compare the search result with the received browser to be detected, and determine the compatibility detection result based on the search result and the comparison result, so as to realize the compatibility of the new feature used in real time detection during the encoding process, and the compatibility detection result includes a compatible configuration group and an incompatible configuration group; The unit test module is used to receive and perform unit test based on the compatible configuration group, and selectively output corresponding unit test results according to whether the compatible configuration group passes the unit test; The retrieval result is compared with the received browser to be detected, and a compatibility detection result is determined based on the retrieval result and the comparison result. The compatibility detection result includes a compatible configuration group and an incompatible configuration group, and specifically includes: When the search result is that no target browser compatible with the new feature to be detected is found, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group; When the search result is that a target browser compatible with the new feature to be detected is retrieved, the retrieved target browser is compared with the browser to be detected. If the comparison result shows that the browser to be detected is different from the retrieved target browser, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group; When the comparison result shows that the browser to be detected is the same as the retrieved target browser, the new feature to be detected and the browser to be detected are returned to a compatible configuration group.
2. The new feature compatibility detection system according to claim 1, characterized in that: It also includes a prompt and alarm module, which is used to receive and output corresponding prompt information and / or alarm information based on the incompatible configuration group or unit test results.
3. The new feature compatibility detection system according to claim 2, characterized in that: The selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test specifically includes: When the compatible configuration group passes the unit test, the result indicating that the compatible configuration group passes the unit test is output; When the compatible configuration group fails the unit test, the result indicating that the compatible configuration group fails the unit test is output, and the incompatible configuration group is fed back to the prompt alarm module; The unit testing module is further used to return the output incompatible configuration group to the database to update the database.
4. A new feature compatibility detection method, characterized in that: include: Generate a browser to be detected based on the browser input before coding, and configure a new feature to be detected based on the code input during coding; Receiving and searching in a database based on the new feature to be detected, and comparing the search result with the received browser to be detected, determining a compatibility detection result based on the search result and the comparison result, so as to detect the compatibility of the new feature used in real time during the encoding process, wherein the compatibility detection result includes a compatible configuration group and an incompatible configuration group; receiving and performing unit testing based on the compatible configuration group, and selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test; The database stores data on the compatibility of at least one target new feature with at least one target browser, and uses at least one new feature as an index and the compatibility of at least one target new feature with at least one target browser as index content; The retrieval result is compared with the received browser to be detected, and a compatibility detection result is determined based on the retrieval result and the comparison result. The compatibility detection result includes a compatible configuration group and an incompatible configuration group, and specifically includes: When the search result is that no target browser compatible with the new feature to be detected is found, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group; When the search result is that a target browser compatible with the new feature to be detected is retrieved, the retrieved target browser is compared with the browser to be detected. If the comparison result shows that the browser to be detected is different from the retrieved target browser, the new feature to be detected and the browser to be detected are returned to an incompatible configuration group; When the comparison result shows that the browser to be detected is the same as the retrieved target browser, the new feature to be detected and the browser to be detected are returned to a compatible configuration group.
5. The new feature compatibility detection method according to claim 4, characterized in that: Also includes: Receive and output corresponding prompt information and / or warning information based on the incompatible configuration group or unit test results.
6. The new feature compatibility detection method according to claim 5, characterized in that: The selectively outputting corresponding unit test results according to whether the compatible configuration group passes the unit test specifically includes: When the compatible configuration group passes the unit test, the result indicating that the compatible configuration group passes the unit test is output; When the compatible configuration group fails the unit test, outputting a result indicating that the compatible configuration group fails the unit test; The output incompatible configuration group is returned to the database to update the database.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the new feature compatibility detection method as described in any one of claims 4 to 6 are implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the new feature compatibility detection method as described in any one of claims 4 to 6 are implemented.
Citation Information
Patent Citations
Browser compatibility test analyzing method and system
CN104731694A
Browser compatibility detecting method and device
CN107133165A
Multi-browser compatibility automatic testing method
CN108549601A
JS code testing method and device and electronic device
CN109634844A
Browser compatibility detection method, device and equipment and readable storage medium
CN110750460A
