CN117472732A - Gray scale test method, device and equipment - Google Patents
Gray scale test method, device and equipment Download PDFInfo
- Publication number
- CN117472732A CN117472732A CN202311167872.2A CN202311167872A CN117472732A CN 117472732 A CN117472732 A CN 117472732A CN 202311167872 A CN202311167872 A CN 202311167872A CN 117472732 A CN117472732 A CN 117472732A
- Authority
- CN
- China
- Prior art keywords
- terminal equipment
- test data
- equipment
- identifier
- tested
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000010998 test method Methods 0.000 title claims description 16
- 238000012360 testing method Methods 0.000 claims abstract description 167
- 238000000034 method Methods 0.000 claims abstract description 47
- 238000012545 processing Methods 0.000 claims description 28
- 244000035744 Hura crepitans Species 0.000 claims description 22
- 238000006243 chemical reaction Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 7
- 230000004044 response Effects 0.000 claims description 3
- 238000004891 communication Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000013475 authorization Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000011981 development test Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the application provides a gray level testing method, a gray level testing device and gray level testing equipment, which are applied to terminal equipment, wherein the method comprises the following steps: acquiring a device identifier from terminal equipment; the equipment identifier uniquely identifies the terminal equipment and is unchanged; judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identification; if yes, acquiring first version test data corresponding to the application to be tested in the terminal equipment, operating the first version test data to acquire a first operation result, and sending the first operation result to the server; if not, obtaining second version test data corresponding to the application to be tested, operating the second version test data to obtain a second operation result, and sending the second operation result to the server; the first version test data is updated and obtained based on the second version test data, and the server is used for testing the application to be tested based on running results sent by the plurality of terminal devices respectively. The technical scheme provided by the embodiment of the application ensures the timeliness of gray level test.
Description
Technical Field
The embodiment of the application relates to the field of gray level testing, in particular to a gray level testing method, a gray level testing device and gray level testing equipment.
Background
In a development test scene of an application function, in order to ensure the stability of an overall system, gray level test is usually performed, namely, test data of an updated version is selected from a plurality of terminal devices which are provided with applications to be tested, test data of an original version is selected from another part of terminal devices, and problems and exposure anomalies in an updating process are found in time through comparison analysis of operation results obtained by operating the test data of different versions, and then the problems and adjustment schemes are repaired in time, so that the method is more reasonable and provides stable guarantee for subsequent formal version on-line.
In the conventional scheme, each terminal device generally sends a determination request to a server, and the server determines what version of test data corresponds to each terminal device and issues the corresponding version of test data for the terminal device to operate. However, such a gray scale test scheme needs to send a determination request to a server through a network to determine, and when there is a network delay or network quality is poor, the timeliness of the gray scale test is easily affected.
Disclosure of Invention
The embodiment of the application provides a gray level testing method, device and equipment, which are used for at least solving the problem of poor gray level testing timeliness in the traditional scheme.
In a first aspect, an embodiment of the present application provides a gray scale test method applied to a terminal device, where an application to be tested is installed in the terminal device, the method includes:
acquiring a device identifier from the terminal device; the equipment identifier uniquely identifies the terminal equipment and is unchanged;
judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identifier;
if yes, acquiring first version test data corresponding to the application to be tested, operating the first version test data to obtain a first operation result, and sending the first operation result to a server;
if not, obtaining second version test data corresponding to the application to be tested, operating the second version test data to obtain a second operation result, and sending the second operation result to the server; the first version test data is updated and obtained based on the second version test data, and the server is used for testing the application to be tested based on running results sent by a plurality of terminal devices respectively.
Optionally, the acquiring the device identifier from the terminal device includes:
And acquiring the equipment identifier from the target storage file of the terminal equipment.
The method further comprises the steps of:
and under the condition that the target storage file does not store the equipment identifier, generating the equipment identifier according to the starting data of the application to be tested, and storing the equipment identifier into the target storage file.
Optionally, the starting data of the application to be tested includes a process identifier and a timestamp identifier corresponding to the application to be tested;
the generating the device identifier according to the starting data of the application to be tested comprises the following steps:
and generating the equipment identifier according to the identifier of the terminal equipment, the process identifier corresponding to the application to be tested and the timestamp identifier.
Optionally, the target storage file includes a sandbox and a key string;
the method further comprises the steps of:
judging whether the sand box stores the equipment identifier or not, and judging whether the key string stores the equipment identifier or not under the condition that the sand box does not store the equipment identifier;
the obtaining the device identifier from the target storage file includes:
the device identification is acquired from the sandbox when the device identification is stored in the sandbox, and the device identification is acquired from the key string when the device identification is stored in the key string.
Optionally, the device identifier is a hexadecimal string;
the method further comprises the steps of:
according to the maximum unsigned long integer data corresponding to the system in the terminal equipment, carrying out bit number clipping on the hexadecimal character string;
converting the hexadecimal character string after the bit number is cut into a decimal character string;
the step of judging whether the terminal equipment accords with a preset gray hit rule based on the equipment identifier comprises the following steps:
and judging whether the terminal equipment accords with a preset gray hit rule or not based on the character string after the binary conversion.
Optionally, the determining whether the terminal device meets the preset gray hit rule based on the string after the binary conversion includes:
performing remainder processing on the preset numerical value to the character string after the binary conversion to obtain a remainder;
grouping a numerical interval formed by the numerical value 0 and the preset numerical value according to a preset proportion to obtain a plurality of value intervals;
judging whether the value interval corresponding to the remainder is consistent with a preset value interval, if so, judging that the terminal equipment accords with a preset gray hit rule, otherwise, judging that the terminal equipment does not accord with the preset gray hit rule.
Optionally, the determining whether the terminal device meets the preset gray hit rule based on the string after the binary conversion includes:
Judging whether the characters with preset digits in the character string after the binary conversion are consistent with preset characters, if so, judging that the terminal equipment accords with a preset gray hit rule, otherwise, judging that the terminal equipment does not accord with the preset gray hit rule.
In a second aspect, an embodiment of the present application provides a gray scale test method, applied to a server, where the method includes:
for any terminal equipment, responding to a first version test data acquisition request which is sent by the terminal equipment and corresponds to an application to be tested, sending the first version test data to the terminal equipment, and receiving a first operation result sent by the terminal equipment; or, in response to a second version test data acquisition request corresponding to the application to be tested, which is sent by the terminal equipment, sending the second version test data to the terminal equipment, and receiving a second operation result sent by the terminal equipment; the first version test data acquisition request is generated when the terminal equipment judges that the terminal equipment accords with a preset gray hit rule based on equipment identification, the first operation result is obtained when the terminal equipment operates the first version test data, the second version test data acquisition request is generated when the terminal equipment judges that the terminal equipment does not accord with the preset gray hit rule based on equipment identification, and the second operation result is obtained when the terminal equipment operates the second version test data; the equipment identifier uniquely identifies the terminal equipment and is unchanged;
And testing the application to be tested based on the running results sent by the plurality of terminal devices respectively.
In a third aspect, an embodiment of the present application provides a gray scale test device, including:
the first acquisition module is used for acquiring equipment identification from the terminal equipment; wherein, the equipment identification uniquely identifies the terminal equipment and is unchanged;
the first judging module is used for judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identifier;
the second acquisition module is used for acquiring first version test data corresponding to the application to be tested in the terminal equipment and operating the first version test data under the condition that the result of the first judgment module is yes, acquiring a first operation result and sending the first operation result to a server; and under the condition that the result of the first judging module is negative, acquiring second version test data corresponding to the application to be tested in the terminal equipment, operating the second version test data to acquire a second operation result, and sending the second operation result to the server; the first version test data is updated and obtained based on the second version test data, and the server is used for testing the application to be tested based on running results sent by a plurality of terminal devices respectively.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a storage component and a processing component; the storage component stores one or more computer instructions for execution by the processing component, the processing component executing the one or more computer instructions to implement the gray scale test method of the first aspect.
In a fifth aspect, embodiments of the present application provide a computing device including a storage component and a processing component; the storage component stores one or more computer instructions for execution by the processing component, the processing component executing the one or more computer instructions to implement the gray scale test method of the second aspect.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program that is executed by a processor to implement the gray scale test method of the first or second aspect.
The scheme of the embodiment of the application can be applied to terminal equipment, an application to be tested is installed in the terminal equipment, equipment identification can be obtained from the terminal equipment, the equipment identification can be used for uniquely identifying the terminal equipment and is unchanged, whether the terminal equipment accords with a preset gray hit rule can be judged based on the equipment identification, if yes, first version test data corresponding to the application to be tested can be obtained and operated, a first operation result is obtained, the first operation result is sent to a server, otherwise, second version test data corresponding to the application to be tested can be obtained and operated, a second operation result is obtained, the second operation result is sent to the server, the first version test data can be obtained based on the update of the second version test data, and the server can be used for testing the application to be tested based on the operation results sent by a plurality of terminal equipment respectively. And judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identification by acquiring the equipment identification, so that test data of a version corresponding to the application to be tested in the terminal equipment is acquired according to a judging result, the judgment is not required to be carried out through a network request server, the influence of network delay and network quality is avoided, and the timeliness of gray test judgment is ensured. In addition, the equipment identifier can uniquely identify the terminal equipment and is unchanged, so that consistency of a judging result can be ensured when the equipment identifier is used for gray test judgment, and accuracy of gray test judgment is improved.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart illustrating one embodiment of a gray scale testing method provided herein;
FIG. 2 is a flow chart illustrating another embodiment of a gray scale testing method provided herein;
FIG. 3 is a schematic diagram showing the structure of one embodiment of a gray scale test device provided in the present application;
FIG. 4 illustrates a schematic diagram of one embodiment of an electronic device provided herein;
FIG. 5 illustrates a schematic diagram of one embodiment of a computing device provided herein.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application.
In some of the flows described in the specification and claims of this application and in the foregoing figures, a number of operations are included that occur in a particular order, but it should be understood that the operations may be performed in other than the order in which they occur or in parallel, that the order of operations such as 101, 102, etc. is merely for distinguishing between the various operations, and that the order of execution is not by itself represented by any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
In a development test scene of an application function, in order to ensure the stability of an overall system, gray level test is usually performed, namely, test data of an updated version is selected from a plurality of terminal devices which are provided with applications to be tested, test data of an original version is selected from another part of terminal devices, and problems and exposure anomalies in an updating process are found in time through comparison analysis of operation results obtained by operating the test data of different versions, and then the problems and adjustment schemes are repaired in time, so that the method is more reasonable and provides stable guarantee for subsequent formal version on-line.
In the conventional scheme, each terminal device generally sends a determination request to a server, and the server determines what version of test data corresponds to each terminal device and issues the corresponding version of test data for the terminal device to operate. However, such a gray scale test scheme needs to send a determination request to a server through a network to determine, and when there is a network delay or network quality is poor, the timeliness of the gray scale test is easily affected.
In addition, in the traditional scheme, the terminal equipment can also generate a random number and buffer the random number in the local file, and the random number is used for judging what version of test data corresponds to the terminal equipment to perform gray level test. However, in the gray level test scheme, although the request for acquiring the related data content is not required to be sent through a network, the problem still exists that when the application to be tested in the terminal equipment is unloaded, the random numbers cached in the local file are deleted, when the application to be tested is reinstalled for gray level test, new random numbers need to be regenerated, the random numbers generated in two times are inconsistent, the gray level hit result of the terminal equipment is affected, and the accuracy of gray level test is poor.
Therefore, in order to solve the above-described problems, the inventors have conceived that if it is possible to determine which version of test data corresponds by the terminal device by itself without the aid of the server determination, it is possible to perform the gradation test without being affected by the network delay or the network quality. Based on the above, the inventor proposes a technical scheme of the application, and proposes a gray level testing method applied to terminal equipment, wherein an application to be tested is installed in the terminal equipment, and the method comprises the steps of obtaining equipment identification from the terminal equipment; the equipment identifier uniquely identifies the terminal equipment and is unchanged; judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identifier; if yes, acquiring first version test data corresponding to the application to be tested, operating the first version test data to obtain a first operation result, and sending the first operation result to a server; if not, obtaining second version test data corresponding to the application to be tested, operating the second version test data to obtain a second operation result, and sending the second operation result to the server; the first version test data is updated and obtained based on the second version test data, and the server is used for testing the application to be tested based on running results sent by a plurality of terminal devices respectively.
And judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identification by acquiring the equipment identification, so that test data of a version corresponding to the application to be tested in the terminal equipment is acquired according to a judging result, the judgment is not required to be carried out through a network request server, the influence of network delay and network quality is avoided, and the timeliness of gray test judgment is ensured. In addition, the equipment identifier can uniquely identify the terminal equipment and is unchanged, so that consistency of a judging result can be ensured when the equipment identifier is used for gray test judgment, and accuracy of gray test judgment is improved.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
As shown in fig. 1, a flowchart of one embodiment of a gray scale testing method provided in the present application may include the following steps.
S11: and acquiring the equipment identification from the terminal equipment.
The gray scale test method can be applied to terminal equipment. The terminal device may include a personal mobile terminal such as a cell phone, tablet computer, personal computer, etc. The terminal device may be provided with an application to be tested, and the application to be tested may refer to any application having a gray scale test for a function to be tested. In addition to the applications to be tested, other applications may be installed in the terminal device, such as, but not limited to, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like.
In this embodiment, the method and the device are applied to a scene of gray level test for a function to be tested in an application to be tested in a terminal device, and may be implemented based on a device identifier. The device identification may be implemented as a string of numerals and letters, with a unique identification effect on the terminal device and remaining unchanged. The number of bits of the character string can be set according to actual requirements.
S12: and judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identification. If yes, executing the operation of the step S13; if not, the operation of step S15 is performed.
S13: and acquiring first version test data corresponding to the application to be tested, and operating the first version test data to acquire a first operation result.
S14: and sending the first operation result to the server.
S15: and acquiring second version test data corresponding to the application to be tested, and operating the second version test data to acquire a second operation result.
S16: and sending the second operation result to the server.
According to the acquired equipment identification, whether the terminal equipment accords with a preset gray hit rule can be judged. Specifically, there may be multiple implementations, which will be described in the following embodiments, and details are not described here.
And according to the judging result, testing data of a version corresponding to the application to be tested in the terminal equipment can be obtained. For convenience of description, the updated version of the test data may be referred to as first version of the test data, and the original version of the test data may be referred to as second version of the test data, and the first version of the test data may be updated based on the second version of the test data. Specifically, the terminal device may generate a corresponding test data acquisition request based on the determination result, and send the request to the server, where the server issues the test data of the corresponding version.
After that, the terminal device can run the corresponding test data, obtain the corresponding running result, and send to the server, the server tests the application to be tested based on the running results sent by the plurality of terminal devices respectively, for example, compare and analyze the running results of different versions, etc., which is not limited in this application.
In this embodiment, the method may be applied to a terminal device, an application to be tested is installed in the terminal device, a device identifier may be obtained from the terminal device, the device identifier may uniquely identify the terminal device and be unchanged, based on the device identifier, it may be determined whether the terminal device meets a preset gray hit rule, if yes, first version test data corresponding to the application to be tested may be obtained and operated, a first operation result may be obtained, the first operation result may be sent to a server, otherwise, second version test data corresponding to the application to be tested may be obtained and operated, a second operation result may be obtained, the second operation result may be sent to the server, the first version test data may be obtained based on updating of the second version test data, and the server may be used to test the application to be tested based on operation results respectively sent by a plurality of terminal devices. And judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identification by acquiring the equipment identification, so that test data of a version corresponding to the application to be tested in the terminal equipment is acquired according to a judging result, the judgment is not required to be carried out through a network request server, the influence of network delay and network quality is avoided, and the timeliness of gray test judgment is ensured. In addition, the equipment identifier can uniquely identify the terminal equipment and is unchanged, so that consistency of a judging result can be ensured when the equipment identifier is used for gray test judgment, and accuracy of gray test judgment is improved.
In practical applications, considering identification information of the terminal device, such as a serial number of the terminal device, user privacy is generally involved, and the user authorization needs to be obtained before the user authorization is obtained, which is inconvenient. Therefore, in order to solve the technical problem, the device identifier may be generated by itself, for example, may be generated according to the start data of the application to be tested. And, in order to ensure that the device identification is unchanged, the generated device identification may be stored in a target storage file of the terminal device. The data stored in the target storage file cannot be deleted along with the unloading of the application to be tested. Specifically, the target storage file may be implemented as a system file, such as a key string file, and may store data such as a password, a private key, an electronic certificate, and the like.
Thus, in some embodiments, a method of obtaining a device identification from a terminal device may include:
and acquiring the equipment identification from the target storage file of the terminal equipment.
Alternatively, before this, it may be preferentially judged whether or not the device identifier is stored in the target storage file of the terminal device.
If the judgment result is yes, that is, if the target storage file of the terminal equipment stores the equipment identifier, the equipment identifier can be obtained from the target storage file.
If the judgment result is negative, that is, if the device identifier is not stored in the target storage file of the terminal device, the device identifier can be generated according to the starting data of the application to be tested, and the device identifier is stored in the target storage file.
Specifically, in some embodiments, the start data of the application to be tested may include a process identifier and a timestamp identifier corresponding to the application to be tested.
At this time, generating the device identifier of the terminal device according to the start data of the application to be tested includes:
and generating the equipment identifier of the terminal equipment based on the identifier of the terminal equipment, the process identifier corresponding to the application to be tested and the timestamp identifier.
For example, the device identifier may be generated according to a plurality of parameters such as a host name, a process ID, a timestamp identifier, etc., and may be set according to actual requirements without limitation.
In the embodiment, the equipment identifier of the terminal equipment is automatically generated by combining the starting data such as the process identifier, the timestamp identifier and the like of the application to be tested in the terminal equipment, the user authorization is not required to be acquired to acquire the identification information of the terminal equipment, the user privacy is prevented from being revealed, and the user experience is improved.
The generated device identifier can be stored in a target storage file of the terminal device, so that when the gray level test is performed, the device identifier is obtained to determine whether the terminal device meets a preset gray level hit rule. In some embodiments, the target storage file may include a sandbox and a key fob.
At this time, the method for judging whether the device identifier is stored in the target storage file may include:
judging whether the device identifier is stored in the sandbox or not, and judging whether the device identifier is stored in the key string or not under the condition that the device identifier is not stored in the sandbox.
And, the method for obtaining the device identifier from the target storage file may include:
the device identification is obtained from the sandbox in case the device identification is stored in the sandbox, and from the key string in case the device identification is stored in the key string.
Furthermore, when the sand box and the key string are not stored with the device identifier, the device identifier can be generated according to the starting data of the application to be tested, and the device identifier is stored in the sand box and the key string, so that the device identifier can be directly obtained when the gray test is performed subsequently.
In some embodiments, the generated device identification may be implemented as a 40-bit 16-ary string. To facilitate the calculation process, the method may further include:
according to the maximum unsigned long integer data corresponding to the system in the terminal equipment, carrying out bit number clipping on the hexadecimal character string;
converting the hexadecimal character string after the bit number is cut into a decimal character string;
Because the 40-bit 16-system number is converted into the 10-system number, the data overflows, and therefore, the character string can be subjected to bit clipping by utilizing the maximum unsigned long integer data corresponding to the system, and the proper bit is clipped and then converted.
At this time, based on the device identifier, the method for determining whether the terminal device meets the preset gray hit rule may include:
and judging whether the terminal equipment accords with a preset gray hit rule or not based on the character string after the binary conversion.
Further, based on the character string after the binary conversion, there may be various implementations for determining whether the terminal device meets the preset gray hit rule.
As an alternative implementation manner, the string after the binary conversion may be subjected to residual processing on the preset value preferentially to obtain a remainder, a numerical interval formed by the value 0 and the preset value is grouped according to a preset proportion to obtain a plurality of value intervals, whether the value interval corresponding to the remainder is consistent with the preset value interval is further judged, if so, it is judged that the terminal device meets the preset gray hit rule, otherwise, it is judged that the terminal device does not meet the preset gray hit rule. For example, the preset value may be 99, the string after the binary conversion may be preferentially subjected to percentage remainder to obtain a remainder, for example, the remainder is 13, the value intervals (0, 99) formed by the value 0 and the value 99 are grouped according to a preset proportion to obtain a plurality of value intervals, for example, 10 value intervals (0, 9), (10, 19), (··90, 99) are obtained, the preset value intervals may be, for example, (10, 19), and at this time, the value interval corresponding to the remainder may be judged to be consistent with the preset value interval, and the terminal device is judged to conform to the preset gray hit rule. The preset value interval may be, for example, (90, 99), and then it may be determined that the value interval corresponding to the remainder is inconsistent with the preset value interval, and it is determined that the terminal device does not conform to the preset gray hit rule.
As another optional implementation manner, it may also be determined whether the character of the preset number of bits in the string after the binary conversion is consistent with the preset character, if so, it is determined that the terminal device meets the preset gray hit rule, otherwise, it is determined that the terminal device does not meet the preset gray hit rule. For example, whether the last character in the character string after the binary conversion is consistent with the preset character can be judged, and the description is omitted.
As shown in fig. 2, a flowchart of another embodiment of a gray scale testing method provided in the present application may be applied to a server, and the method may include the following steps.
S21: for any terminal equipment, responding to a first version test data acquisition request which is sent by the terminal equipment and corresponds to an application to be tested, sending first version test data to the terminal equipment, and receiving a first operation result sent by the terminal equipment; or, in response to a second version test data acquisition request corresponding to the application to be tested, which is sent by the terminal equipment, sending the second version test data to the terminal equipment, and receiving a second operation result sent by the terminal equipment.
The first version test data acquisition request is generated when the terminal equipment judges that the terminal equipment accords with a preset gray hit rule based on equipment identification, a first operation result is obtained by the terminal equipment operating the first version test data, the second version test data acquisition request is generated when the terminal equipment judges that the terminal equipment does not accord with the preset gray hit rule based on equipment identification, and a second operation result is obtained by the terminal equipment operating the second version test data; the device identity uniquely identifies the terminal device and is unchanged.
S22: and testing the application to be tested based on the running results sent by the plurality of terminal devices respectively.
In this embodiment, the method and the device can be applied to a server, and the server can respond to a test data acquisition request corresponding to an application to be tested sent by a terminal device, send test data corresponding to the version to the terminal device, receive an operation result sent by the terminal device, and test the application to be tested based on the operation results respectively sent by a plurality of terminal devices. Because each terminal device judges whether the preset gray hit rule is met or not based on the device identification of the terminal device, and then according to the judging result, the corresponding version of the test data of the terminal device is determined, the terminal device does not need to judge through a network request server, and further the terminal device is not influenced by network delay and network quality, and the timeliness of gray test judgment is ensured. In addition, the equipment identifier can uniquely identify the terminal equipment and is unchanged, so that consistency of a judging result can be ensured when the equipment identifier is used for gray test judgment, and accuracy of gray test judgment is improved.
Fig. 3 is a schematic structural diagram of an embodiment of a gray scale testing apparatus provided in the present application. The apparatus may comprise the following modules.
A first obtaining module 301, configured to obtain an equipment identifier from a terminal equipment; wherein the device identifier uniquely identifies the terminal device and remains unchanged;
a first judging module 302, configured to judge, based on the device identifier, whether the terminal device meets a preset gray hit rule;
a second obtaining module 303, configured to obtain first version test data corresponding to an application to be tested in the terminal device, and operate the first version test data, obtain a first operation result, and send the first operation result to a server when the result of the first judging module is yes; and under the condition that the result of the first judging module is negative, acquiring second version test data corresponding to the application to be tested in the terminal equipment, operating the second version test data to acquire a second operation result, and sending the second operation result to the server; the first version test data is updated and obtained based on the second version test data, and the server is used for testing the application to be tested based on running results sent by a plurality of terminal devices respectively.
In some embodiments, the first obtaining module 301 may be specifically configured to obtain a device identifier from a target storage file of a terminal device;
The apparatus may further include:
the generating module is used for generating a device identifier according to the starting data of the application to be tested and storing the device identifier into the target storage file of the terminal device under the condition that the target storage file does not store the device identifier; the data stored in the target storage file cannot be deleted along with the unloading of the application to be tested.
In some embodiments, the starting data of the application to be tested includes a process identifier and a timestamp identifier corresponding to the application to be tested;
the generating module is specifically configured to generate a device identifier of the terminal device based on the identifier of the terminal device, the process identifier corresponding to the application to be tested, and the timestamp identifier.
In some embodiments, the target storage file comprises a sandbox and a key fob;
the apparatus may further include:
the second judging module is used for judging whether the equipment identifier is stored in the sand box or not, and judging whether the equipment identifier is stored in the key string or not under the condition that the equipment identifier is not stored in the sand box;
the first obtaining module 201 may specifically be configured to obtain the device identifier from the sandbox when the device identifier is stored in the sandbox, and obtain the device identifier from the key string when the device identifier is stored in the key string.
In some embodiments, the device identification is a hexadecimal string;
the apparatus may further include:
the clipping module is used for clipping the bit number of the hexadecimal character string according to the maximum unsigned long integer data corresponding to the system in the terminal equipment;
and the conversion module is used for converting the hexadecimal character string after the digit clipping into a decimal character string.
The first determining module 202 may be specifically configured to determine, based on the string after the binary conversion, whether the terminal device meets a preset gray hit rule.
In some embodiments, the first determining module 202 may be specifically configured to perform a remainder processing on the preset value for the string after the binary conversion to obtain a remainder; grouping a numerical interval formed by the numerical value 0 and the preset numerical value according to a preset proportion to obtain a plurality of value intervals; judging whether the value interval corresponding to the remainder is consistent with a preset value interval, if so, judging that the terminal equipment accords with a preset gray hit rule, otherwise, judging that the terminal equipment does not accord with the preset gray hit rule.
In some embodiments, the first determining module 202 may be specifically configured to determine whether a character with a preset number of bits in the string after the binary conversion is consistent with a preset character, if so, determine that the terminal device meets a preset gray hit rule, or, if not, determine that the terminal device does not meet the preset gray hit rule.
As shown in fig. 4, a schematic structural diagram of an embodiment of an electronic device provided in the present application may include a storage component 401 and a processing component 402.
The storage component 401 is operative to store one or more computer instructions for execution by the processing component 402.
The processing component 402 invokes execution of the one or more computer instructions to implement the gray scale test method as illustrated in fig. 1.
Of course, the electronic device may necessarily also include other components, such as input/output interfaces, communication components, and the like.
The input/output interface provides an interface between the processing component and a peripheral interface module, which may be an output device, an input device, etc.
The communication component is configured to facilitate wired or wireless communication between the electronic device and other devices, and the like.
As shown in FIG. 5, a schematic diagram of one embodiment of a computing device provided herein may include a storage component 501 and a processing component 502.
Storage component 501 is operative to store one or more computer instructions for execution by processing component 502.
The processing component 502 invokes execution of the one or more computer instructions to implement the gray scale test method as illustrated in fig. 2.
Of course, the computing device may necessarily include other components, such as input/output interfaces, communication components, and the like.
The input/output interface provides an interface between the processing component and a peripheral interface module, which may be an output device, an input device, etc.
The communication component is configured to facilitate wired or wireless communication between the computing device and other devices, and the like.
In one or more embodiments described above, the processing component may include one or more processors to execute computer instructions to perform all or part of the steps of the methods described above. Of course, the processing component may also be implemented as one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic elements for executing the methods described above.
The storage component is configured to store various types of data to support operations at the terminal. The memory component may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The embodiment of the application also provides a computer readable storage medium, which stores a computer program, and the computer program can implement the gray scale test method shown in fig. 1 or fig. 2 when being executed by a computer. The computer-readable medium may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device.
The computer readable storage medium can be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing, and the like.
Embodiments of the present application also provide a computer program product comprising computer instructions that, when executed by a processor, implement the gray scale test method shown in fig. 1 or fig. 2 described above.
In such embodiments, the computer program may be downloaded and installed from a network, and/or installed from a removable medium. The computer program, when executed by a processor, performs the various functions defined in the system of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.
Claims (12)
1. A gray scale test method, characterized by being applied to a terminal device in which an application to be tested is installed, the method comprising:
acquiring a device identifier from the terminal device; the equipment identifier uniquely identifies the terminal equipment and remains unchanged;
judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identifier;
if yes, acquiring first version test data corresponding to the application to be tested, operating the first version test data to obtain a first operation result, and sending the first operation result to a server;
if not, obtaining second version test data corresponding to the application to be tested, operating the second version test data to obtain a second operation result, and sending the second operation result to the server; the first version test data is updated and obtained based on the second version test data, and the server is used for testing the application to be tested based on running results sent by a plurality of terminal devices respectively.
2. The method of claim 1, wherein the obtaining the device identification from the terminal device comprises:
acquiring a device identifier from a target storage file of the terminal device;
the method further comprises the steps of:
and under the condition that the target storage file does not store the equipment identifier, generating the equipment identifier according to the starting data of the application to be tested, and storing the equipment identifier into the target storage file.
3. The method according to claim 2, wherein the start data of the application to be tested includes a process identifier and a timestamp identifier corresponding to the application to be tested;
the generating the device identifier according to the starting data of the application to be tested comprises the following steps:
and generating the equipment identifier according to the identifier of the terminal equipment, the process identifier corresponding to the application to be tested and the timestamp identifier.
4. The method of claim 2, wherein the target storage file comprises a sandbox and a key fob;
the method further comprises the steps of:
judging whether the sand box stores the equipment identifier or not, and judging whether the key string stores the equipment identifier or not under the condition that the sand box does not store the equipment identifier;
The obtaining the device identifier from the target storage file includes:
the device identification is acquired from the sandbox when the device identification is stored in the sandbox, and the device identification is acquired from the key string when the device identification is stored in the key string.
5. The method of claim 1, wherein the device identification is a hexadecimal string;
the method further comprises the steps of:
according to the maximum unsigned long integer data corresponding to the system in the terminal equipment, carrying out bit number clipping on the hexadecimal character string;
converting the hexadecimal character string after the bit number is cut into a decimal character string;
the step of judging whether the terminal equipment accords with a preset gray hit rule based on the equipment identifier comprises the following steps:
and judging whether the terminal equipment accords with a preset gray hit rule or not based on the character string after the binary conversion.
6. The method of claim 5, wherein the determining whether the terminal device meets a preset gray hit rule based on the string after the binary conversion comprises:
performing remainder processing on the preset numerical value to the character string after the binary conversion to obtain a remainder;
Grouping a numerical interval formed by the numerical value 0 and the preset numerical value according to a preset proportion to obtain a plurality of value intervals;
judging whether the value interval corresponding to the remainder is consistent with a preset value interval, if so, judging that the terminal equipment accords with a preset gray hit rule, otherwise, judging that the terminal equipment does not accord with the preset gray hit rule.
7. The method of claim 5, wherein the determining whether the terminal device meets a preset gray hit rule based on the string after the binary conversion comprises:
judging whether the characters with preset digits in the character string after the binary conversion are consistent with preset characters, if so, judging that the terminal equipment accords with a preset gray hit rule, otherwise, judging that the terminal equipment does not accord with the preset gray hit rule.
8. A gray scale testing method, applied to a server, comprising:
for any terminal equipment, responding to a first version test data acquisition request which is sent by the terminal equipment and corresponds to an application to be tested, sending the first version test data to the terminal equipment, and receiving a first operation result sent by the terminal equipment; or, in response to a second version test data acquisition request corresponding to the application to be tested, which is sent by the terminal equipment, sending the second version test data to the terminal equipment, and receiving a second operation result sent by the terminal equipment; the first version test data acquisition request is generated when the terminal equipment judges that the terminal equipment accords with a preset gray hit rule based on equipment identification, the first operation result is obtained when the terminal equipment operates the first version test data, the second version test data acquisition request is generated when the terminal equipment judges that the terminal equipment does not accord with the preset gray hit rule based on equipment identification, and the second operation result is obtained when the terminal equipment operates the second version test data; the equipment identifier uniquely identifies the terminal equipment and is unchanged;
And testing the application to be tested based on the running results sent by the plurality of terminal devices respectively.
9. A gradation testing apparatus, comprising:
the first acquisition module is used for acquiring equipment identification from the terminal equipment; wherein the device identifier uniquely identifies the terminal device and remains unchanged;
the first judging module is used for judging whether the terminal equipment accords with a preset gray hit rule or not based on the equipment identifier;
the second acquisition module is used for acquiring first version test data corresponding to the application to be tested in the terminal equipment and operating the first version test data under the condition that the result of the first judgment module is yes, acquiring a first operation result and sending the first operation result to a server; and under the condition that the result of the first judging module is negative, acquiring second version test data corresponding to the application to be tested in the terminal equipment, operating the second version test data to acquire a second operation result, and sending the second operation result to the server; the first version test data is updated and obtained based on the second version test data, and the server is used for testing the application to be tested based on running results sent by a plurality of terminal devices respectively.
10. An electronic device is characterized by comprising a storage component and a processing component;
the storage component stores one or more computer instructions for the processing component to invoke; the processing component invokes execution of the one or more computer instructions to implement the gray scale test method of any of claims 1-7.
11. A computing device comprising a storage component and a processing component;
the storage component stores one or more computer instructions for the processing component to invoke; the processing component invokes execution of the one or more computer instructions to implement the gray scale test method of claim 8.
12. A computer-readable storage medium, characterized in that a computer program is stored, which is executed by a processor to implement the gradation test method according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311167872.2A CN117472732A (en) | 2023-09-11 | 2023-09-11 | Gray scale test method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311167872.2A CN117472732A (en) | 2023-09-11 | 2023-09-11 | Gray scale test method, device and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117472732A true CN117472732A (en) | 2024-01-30 |
Family
ID=89622820
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311167872.2A Pending CN117472732A (en) | 2023-09-11 | 2023-09-11 | Gray scale test method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117472732A (en) |
-
2023
- 2023-09-11 CN CN202311167872.2A patent/CN117472732A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101752251B1 (en) | Method and device for identificating a file | |
CN109474578B (en) | Message checking method, device, computer equipment and storage medium | |
CN110221948B (en) | Test script generation method, test script generation device, computer device and storage medium | |
CN111444931A (en) | Method and device for detecting abnormal access data | |
CN109949054B (en) | Key code determination method, device, equipment and storage medium | |
CN111435393A (en) | Object vulnerability detection method, device, medium and electronic equipment | |
CN112817935A (en) | Data processing method, device and equipment based on field type and storage medium | |
CN110990350B (en) | Log analysis method and device | |
CN110020040B (en) | Method, device and system for querying data | |
CN117472732A (en) | Gray scale test method, device and equipment | |
CN116301978A (en) | System upgrading method, device, equipment and storage medium | |
CN115987685A (en) | Cloud service data sharing method and system | |
CN114722401A (en) | Equipment safety testing method, device, equipment and storage medium | |
CN113297583B (en) | Vulnerability risk analysis method, device, equipment and storage medium | |
CN111431888B (en) | Method, device, equipment and storage medium for shielding key information | |
CN112579428B (en) | Interface testing method, device, electronic equipment and storage medium | |
CN114697378A (en) | Website access method, device, equipment and medium | |
CN111538651A (en) | Interface testing method, device, server and storage medium | |
CN111783131A (en) | Data protection method, computer device and computer-readable storage medium | |
CN111324586A (en) | Image display method and device based on cache, electronic equipment and medium | |
CN114611155B (en) | Data management node verification method, device, equipment and medium | |
CN116339774A (en) | Client hot updating method, device and equipment | |
CN110716855B (en) | Processor instruction set testing method and device | |
CN114389948B (en) | Function upgrading and verifying method, device, equipment and medium based on white list | |
CN118467526A (en) | Data code generation method, terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |