CN110333999B - Method for switching test environments of mobile phone client - Google Patents
Method for switching test environments of mobile phone client Download PDFInfo
- Publication number
- CN110333999B CN110333999B CN201910372789.6A CN201910372789A CN110333999B CN 110333999 B CN110333999 B CN 110333999B CN 201910372789 A CN201910372789 A CN 201910372789A CN 110333999 B CN110333999 B CN 110333999B
- Authority
- CN
- China
- Prior art keywords
- environment
- app
- variable information
- information
- mobile phone
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 177
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000003044 adaptive effect Effects 0.000 claims abstract description 11
- 239000011159 matrix material Substances 0.000 claims description 47
- 238000013500 data storage Methods 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 15
- 238000005457 optimization Methods 0.000 claims description 11
- 238000000605 extraction Methods 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000009795 derivation Methods 0.000 claims description 3
- 230000008030 elimination Effects 0.000 claims description 3
- 238000003379 elimination reaction Methods 0.000 claims description 3
- 238000013507 mapping Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 description 8
- 230000007613 environmental effect Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004806 packaging method and process Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000002035 prolonged effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 239000007795 chemical reaction product Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 239000000047 product Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Images
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/3664—Environments for testing or debugging software
-
- 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
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
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)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
The invention provides a method for switching test environments of a mobile phone client, which determines to execute adaptive starting operation on an APP according to the state of environment variable information stored in the APP, determines a target test environment corresponding to the APP by acquiring the current test environment information of the mobile phone client, and finally switches the target test environment to the APP by acquiring the update state of the environment variable information stored in the APP and executing preset mode operation on the APP.
Description
Technical Field
The invention relates to the technical field of mobile phone testing, in particular to a method for switching testing environments of a mobile phone client.
Background
With the development of mobile communication technology, smart mobile terminals such as mobile phones have entered into various aspects of people's lives. People can realize online instant messaging and data interactive transmission through intelligent mobile terminals such as mobile phones. In addition, people can also realize different application functions such as music playing, online video watching or online shopping transaction by installing different types of APP application terminals on the intelligent mobile terminal. In order to improve the share of the internet enterprises in the smart mobile terminal market, the internet enterprises develop corresponding APP application terminals, but the development process of the APP application terminals can be completed through different steps.
In order to ensure that these APP application end products can be used normally online, when developing and releasing APP application ends of different versions each time, it is generally necessary to perform comprehensive and multi-environment test operations on the APP application ends, where the multi-environment test operations include performing adaptive test operations on a development environment, a test environment, a simulation online environment, an online environment, and the like, respectively. In addition, in the testing process, when switching to another testing environment from one testing environment, the APP application end needs to be repackaged after the testing environment is modified and set by developers or testers, and the setting and the packing operation need to be repeatedly implemented after the testing environment is switched every time, so that the time of testing operation is prolonged, a large amount of labor cost is wasted, and efficient work is not facilitated for the developers and the testers, therefore, the development cost of the APP application end is finally increased, the development period of the APP application end is prolonged, and the requirement of accelerating the update of the APP product in the Internet enterprises is obviously not met.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method for switching test environment of a mobile phone client, which determines the adaptive starting operation of an APP according to the state of the stored environment variable information in the APP, then determines the target test environment corresponding to the APP by acquiring the current test environment information of the mobile phone client, finally acquires the updated state of the stored environment variable information in the APP and executes the preset mode operation on the APP to switch the APP to the target test environment, and the method for switching test environment of the mobile phone client performs corresponding setting on the acquired environment variable information and an environment information dictionary as the basis for switching test environment of the mobile phone client, as the environment variable information is used for representing different test environment parameters, therefore, the current testing environment of the mobile phone client and the target testing environment to be switched to can be directly judged as long as the environment variable information is determined, a switching path between the current testing environment and the target testing environment is established based on the judgment result, and finally, a corresponding switching key is added on the interface of the mobile phone client, so that development and testing personnel can directly realize the switching of the testing environment by operating the switching key, the repeated setting and packaging operation in the switching process of the existing testing environment can be omitted, and the convenience of the mobile phone client for switching the testing environment can be improved.
The invention provides a method for switching test environments of a mobile phone client, which is characterized by comprising the following steps:
step (1), according to the state of the storage environment variable information in the APP, determining to execute adaptive starting operation on the APP;
step (2), obtaining the current testing environment information of the mobile phone client so as to determine the target testing environment corresponding to the APP;
step (3), obtaining an update state of the storage environment variable information in the APP, and executing a preset mode operation on the APP to switch the APP to the target test environment;
further, in the step (1), determining, according to the state about the environment variable information stored in the APP, that the adaptive start-up operation is performed on the APP specifically includes,
step (11), judging the current starting state of the APP, and determining an obtaining mode of the stored environment variable information in the APP based on the judging result of the starting state;
step (12), judging the storage state of the environment variable information corresponding to the APP currently, and acquiring the corresponding environment variable information from the APP based on the judgment result of the storage state;
further, in the step (11), the current starting state of the APP is determined, and the obtaining module for storing the environment variable information in the APP is determined to specifically include, based on the determination result of the starting state,
if the judgment result of the starting state indicates that the APP is currently in a non-starting state, executing a first environment variable information acquisition mode on the APP, wherein the first environment variable information acquisition mode is used for performing retrieval processing on stored data on an environment variable information storage region corresponding to the APP,
if the judgment result of the starting state indicates that the APP is currently in the starting state, executing a second environment variable information acquisition mode on the APP, wherein the second environment variable information acquisition mode is used for stopping retrieval processing on the stored data of the environment variable information storage area corresponding to the APP;
further, in the step (12), the storage state of the environment variable information currently corresponding to the APP is determined, and based on the determination result of the storage state, acquiring the corresponding environment variable information from the APP specifically includes,
step (121), judging the data storage state of the environment variable information storage area corresponding to the APP;
step (122), if the data storage state indicates that the storage area stores data information, extracting the data information currently stored in the storage area as corresponding environment variable information, and starting the APP based on the extracted environment variable information;
step (123), if the data storage status information indicates that the storage area does not store data information, extracting corresponding environment variable information through a default creation mode, wherein,
the default creating mode comprises the steps of creating corresponding variable information through an online environment connected with the APP, extracting the variable information formed by creating the online environment, storing the variable information into a local space corresponding to the mobile phone client, obtaining corresponding environment variable information through the variable information, and using the obtained environment variable information as a starting key of the APP;
further, in the step (122), if the data storage state indicates that the storage region stores data information, extracting the data information currently stored in the storage region as corresponding environment variable information, and starting the APP based on the extracted environment variable information specifically includes,
step (1221), if the data storage state indicates that the storage area stores data information, forming a corresponding environment information extraction matching instruction, where the environment information extraction matching instruction at least includes corresponding operation index parameters of the APP in a plurality of different working mode environments;
step (1222), performing feature matching processing on the environment information extraction matching instruction and a preset environment information dictionary, so as to extract corresponding environment information data from the preset environment information dictionary as the variable information;
further, in the step (2), obtaining the current testing environment information of the mobile phone client, so as to determine that the target testing environment corresponding to the APP specifically includes,
step (21), acquiring a plurality of current operating parameters of the mobile phone client, and matching the operating parameters with a plurality of preset client operating environment modes to determine the current corresponding operating environment mode of the mobile phone client;
step (22), extracting the current testing environment information according to the operating environment mode determined in the step (21);
step (23), determining the target test environment according to the current test environment information and the operation parameters corresponding to the test operation of the APP, and generating switching path information between the current APP running environment and the target test environment;
further, in the step (3), acquiring an updated state of the storage environment variable information in the APP, and performing a preset mode operation on the APP to switch to the target test environment specifically includes,
step (31), judging the updating state of the stored environment variable information in the APP, if the environment variable information is updated, forming a test environment switching signal, and if the environment variable information is not updated, forming a test environment maintaining signal;
step (32), the APP enters a test environment switching mode based on the test environment switching signal, so that the APP is switched from the current running environment to the target test environment;
step (33), the APP enters a test environment maintaining mode based on the test environment maintaining signal, so that the APP maintains the current operating environment unchanged;
further, in the step (32), the APP entering a test environment switching mode based on the test environment switching signal, such that switching the APP from the current operating environment to the target test environment specifically includes,
when the APP receives the test environment switching signal, a corresponding environment switching icon is additionally arranged in an operation page of the APP, and after a preset operation is executed on the environment switching icon, the APP is switched from the current operation environment to the target test environment,
the environment switching icon appears in the running operation page only when the APP is in a preset debugging mode;
further, in the step (2), obtaining the current testing environment information of the mobile phone client, so as to determine that the target testing environment corresponding to the APP specifically includes,
determining a testing environment database corresponding to the testing environment information, and performing a learning operation on the target testing environment through the testing environment database, wherein the learning operation comprises the following steps (201) to (205):
step (201), determining that the test environment database comprises N records, each record comprises S different operation parameters, the N records and the S operation parameters jointly form a matrix X, simultaneously forming a vector Y1 according to an operation environment mode of a mobile phone client corresponding to each record in the test environment database, and performing repeated value elimination processing on the vector Y1 to form a mobile phone client operation mode vector Y;
step (202), using the following formula (1) to perform the primary learning, so as to obtain the error value
In the above-mentioned formula (1),is a matrix W with D rows and S columns and each matrix element value is a random value between 0 and 1, and D is the mobile phone clientThe number of vector values in the operating mode vector Y,mapping W X for matrix X and f of matrix W, L being an error value,for the value of the element in the ith column of matrix X,is prepared by reacting withJ =1, 2, a.. times, N, which is a value of a kth row and a kth column in the matrix W, and k =1, 2, a.. times, D, t =1, 2, a.. times, S;
step (203) of optimizing the matrix W by using the following formula (2)
In the above-mentioned formula (2),is L pairsThe calculation of the partial derivatives is carried out,performing optimization processing on the matrix W to obtain a matrix W1 for the values obtained after the partial derivation operation, namely k =1, 2,. and D, and t =1, 2,. and S;
and (204) substituting the matrix W1 into the following formula (3), solving and calculating L2
Step (205), calculating an absolute value of L-L2, if the absolute value is equal to zero, ending the learning operation and outputting the corresponding matrix W, and if the absolute value is not equal to zero, repeating the steps (203) to (205) until the repetition times reach ten thousand times and outputting the corresponding matrix W;
obtaining S operation parameters currently corresponding to the mobile phone client by combining the matrix W corresponding to the output, substituting the S operation parameters into the following equation (4) to calculate and obtain an operation environment vector P
In the above-mentioned equation (4),for the t-th operation parameter of the mobile phone client,for the kth value of the runtime environment vector P to be computed,the method comprises the steps of obtaining a running environment vector P, determining a maximum value Pz in the running environment vector P after calculating the running environment vector P, and determining a running environment mode of a mobile phone client corresponding to a z-th value in the running environment vector Y as a target test environment currently corresponding to the mobile phone client if the maximum value Pz, Pz is the z-th value of the running environment vector P and z =1, 2, …, D.
Compared with the prior art, the method for switching the test environment of the mobile phone client determines to execute adaptive starting operation on the APP according to the state of the stored environment variable information in the APP, then determines the target test environment corresponding to the APP by acquiring the current test environment information of the mobile phone client, finally executes the preset mode operation on the APP by acquiring the updated state of the stored environment variable information in the APP and switching the APP to the target test environment, and the method for switching the test environment of the mobile phone client performs corresponding setting on the acquired environment variable information and the environment information dictionary as the basis for switching the test environment of the mobile phone client, and can directly judge the test environment where the mobile phone client is currently located and the target test environment to which the mobile phone client is to be switched as long as the environment variable information is determined to represent different test environment parameters, based on the judgment result, a switching path between the current testing environment and the target testing environment is established, and finally, a corresponding switching key is added on the interface of the mobile phone client, so that development and testing personnel can directly realize the switching of the testing environment by operating the switching key, the repeated setting and packaging operation in the existing testing environment switching process can be omitted, and the convenience of the mobile phone client for switching the testing environment can be improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for switching test environments of a mobile phone client according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flowchart of a method for switching test environments of a mobile phone client according to an embodiment of the present invention. The method for switching the test environment of the mobile phone client specifically comprises the following steps:
and (1) determining to execute adaptive starting operation on the APP according to the state of the stored environment variable information in the APP.
Preferably, in the step (1), determining to perform adaptive startup operation on the APP according to the state of the information about the stored environment variable in the APP specifically includes,
step (11), judging the current starting state of the APP, and determining an obtaining mode of the stored environment variable information in the APP based on the judging result of the starting state;
and (12) judging the storage state of the environmental variable information corresponding to the APP currently, and acquiring the corresponding environmental variable information from the APP based on the judgment result of the storage state.
Preferably, in the step (11), the starting state of the APP at present is determined, and based on the determination result of the starting state, the obtaining module for storing the environment variable information in the APP is determined to specifically include,
if the judgment result of the starting state indicates that the APP is currently in a non-starting state, executing a first environment variable information acquisition mode on the APP, wherein the first environment variable information acquisition mode is used for performing retrieval processing on stored data on an environment variable information storage area corresponding to the APP,
and if the judgment result of the starting state indicates that the APP is currently in the starting state, executing a second environment variable information acquisition mode on the APP, wherein the second environment variable information acquisition mode is used for stopping retrieval processing on the stored data of the environment variable information storage area corresponding to the APP.
Preferably, in the step (12), the storage state of the environment variable information currently corresponding to the APP is judged, and based on the judgment result of the storage state, acquiring the corresponding environment variable information from the APP specifically includes,
step (121), judge the data storage state of the corresponding storage area of the environmental variable information of this APP;
step (122), if the data storage state indicates that the storage area stores data information, extracting the data information currently stored in the storage area as corresponding environment variable information, and starting the APP based on the extracted environment variable information;
step (123), if the data storage status information indicates that the storage area does not store data information, extracting corresponding environment variable information through a default creation mode, wherein,
the default creating mode comprises the steps of creating corresponding variable information through an online environment connected with the APP, extracting the variable information formed by creating the online environment, storing the variable information into a local space corresponding to the mobile phone client, obtaining corresponding environment variable information, and taking the obtained environment variable information as a starting key of the APP.
Preferably, in the step (122), if the data storage status indicates that the storage area stores data information, extracting the data information currently stored in the storage area as corresponding environment variable information, and starting the APP based on the extracted environment variable information specifically includes,
step (1221), if the data storage state indicates that the storage area stores data information, a corresponding environment information extraction matching instruction is formed, wherein the environment information extraction matching instruction at least includes corresponding operation index parameters of the APP in a plurality of different working mode environments;
and (1222), performing feature matching processing on the environment information extraction matching instruction and a preset environment information dictionary, so as to extract corresponding environment information data from the preset environment information dictionary as the variable information.
And (2) acquiring the current test environment information of the mobile phone client so as to determine the target test environment corresponding to the APP.
Preferably, in the step (2), obtaining the current testing environment information of the mobile phone client, so as to determine that the target testing environment corresponding to the APP specifically includes,
step (21), acquiring a plurality of current operating parameters of the mobile phone client, and matching the operating parameters with a plurality of preset client operating environment modes to determine the current corresponding operating environment mode of the mobile phone client;
step (22), extracting the current test environment information according to the operation environment mode determined in the step (21);
and (23) determining the target test environment according to the current test environment information and the operation parameters corresponding to the test operation of the APP, and generating switching path information between the current operation environment of the APP and the target test environment.
Preferably, in the step (2), obtaining the current testing environment information of the mobile phone client, so as to determine that the target testing environment corresponding to the APP specifically includes,
determining a testing environment database corresponding to the testing environment information, and performing a learning operation on the target testing environment through the testing environment database, wherein the learning operation comprises the following steps (201) to (205):
step (201), determining that the testing environment database comprises N records, each record comprises S different operation parameters, the N records and the S operation parameters jointly form a matrix X, simultaneously forming a vector Y1 according to the operation environment mode of the mobile phone client corresponding to each record in the testing environment database, and performing repeated value elimination processing on the vector Y1 to form a mobile phone client operation mode vector Y;
step (202), using the following formula (1) to perform the primary learning, so as to obtain the error value
In the above-mentioned formula (1),is a matrix W with D rows and S columns and each matrix element value is a random value between 0 and 1, D is the number of vector values in the mobile phone client operation mode vector Y,mapping W X for matrix X and f of matrix W, L being an error value,for the value of the element in the ith column of matrix X,is composed ofJ =1, 2, the.. times.N, which is a value of the kth row and the kth column in the matrix W, and k =1, 2, the.. times.D, t =1, 2, the.. times.S, wherein j =1, 2, the.. times. Yli-1, Yli +1, …, D, Yli +1 is a position value of a corresponding value in the mobile phone client operation mode vector Y corresponding to the ith value in the vector Y1;
by using the above formula (1), the information loss amount of the obtained L and the L in the actual situation can be calculated in the case of the matrix W, and the loss amount is calculated by addingPartially, the equilibrium of W is fully considered, so that the matrix W is uniformly distributed, and the overfitting condition when the target test environment is calculated later is reduced;
step (203) of optimizing the matrix W by using the following formula (2)
In the above-mentioned formula (2),is L pairsThe calculation of the partial derivatives is carried out,performing the optimization processing on the matrix W to obtain a matrix W1 for the values obtained after the partial derivation operation, namely k =1, 2,. and D, and t =1, 2,. and S;
the matrix W can be optimized by using the formula (2), so that the result of W is close to the optimal result step by step;
and (204) substituting the matrix W1 into the following formula (3), solving and calculating L2
Step (205), calculating an absolute value of L-L2, if the absolute value is equal to zero, ending the learning operation and outputting the corresponding matrix W, and if the absolute value is not equal to zero, repeating the steps (203) to (205) until the repetition times reach ten thousand times and outputting the corresponding matrix W;
the information loss amount after optimization can be obtained by using the formula (3), and whether the optimal effect is achieved can be obtained by comparing the information loss amount before and after optimization;
combining the matrix W corresponding to the output to obtain S operation parameters currently corresponding to the mobile phone client, substituting the S operation parameters into the following equation (4) to calculate and obtain an operation environment vector P
In the above-mentioned equation (4),for the t-th operation parameter of the mobile phone client,for the kth value of the runtime environment vector P to be computed,determining a maximum value Pz in the operating environment vector P after the operating environment vector P is obtained through calculation, and if the maximum value Pz and Pz are the z-th value of the operating environment vector P and z =1, 2, … and D, determining the operating environment mode of the mobile phone client corresponding to the z-th value in the operating mode vector Y of the mobile phone client as the target test environment currently corresponding to the mobile phone client;
the target test environment of the current environment of the client can be obtained by using W which achieves the optimal effect or is obtained after hundred thousand secondary optimization by using the equation (4), and the optimization is performed by selecting ten thousand times, so that the optimization sufficiency is ensured, and the overfitting of the optimization is avoided;
by utilizing the learning operation, an optimal matrix W can be obtained through a continuous optimization process, so that corresponding target test environments can be obtained for the obtained current S running parameters of any mobile phone terminal, and meanwhile, because the optimization process of the matrix W can be completed before testing in the learning process, only the equation (4) needs to be solved when the target test environments of the mobile phone terminal are confirmed, so that the calculated amount is greatly reduced, the matching speed is greatly improved, and the requirement of accurately determining the corresponding target test environments in the current test environments in colleges and universities is met.
And (3) acquiring the update state of the storage environment variable information in the APP, and executing a preset mode operation on the APP to switch the APP to the target test environment.
Preferably, in the step (3), the obtaining of the updated state of the storage environment variable information in the APP, and the performing of the preset mode operation on the APP to switch to the target test environment specifically includes,
step (31), judging the updating state of the stored environment variable information in the APP, if the environment variable information is updated, forming a test environment switching signal, and if the environment variable information is not updated, forming a test environment maintaining signal;
step (32), the APP enters a test environment switching mode based on the test environment switching signal, so that the APP is switched from the current operation environment to the target test environment;
step (33), the APP enters a test environment maintaining mode based on the test environment maintaining signal, so that the APP maintains the current operating environment.
Preferably, in the step (32), the APP entering a test environment switching mode based on the test environment switching signal, so that the APP switching from the current operating environment to the target test environment specifically includes,
when the APP receives the test environment switching signal, a corresponding environment switching icon is added in an operation page of the APP, and the APP is switched from the current operation environment to the target test environment by executing a preset operation on the environment switching icon,
the environment switching icon appears in the running operation page only when the APP is in a preset debugging mode.
It can be seen from the above embodiments that, in the method for switching test environments of a mobile phone client, adaptive start operation on an APP is determined according to a state of environment variable information stored in the APP, a target test environment corresponding to the APP is determined by obtaining current test environment information of the mobile phone client, and finally an update state of the environment variable information stored in the APP is obtained and a preset mode operation is performed on the APP to switch the APP to the target test environment, the method for switching test environments of the mobile phone client performs corresponding settings on the obtained environment variable information and an environment information dictionary as a basis for switching test environments of the mobile phone client, and since the environment variable information is used for representing different test environment parameters, the test environment where the mobile phone client is currently located and the target test environment to which the mobile phone client is to be switched can be directly determined as long as the environment variable information is determined, based on the judgment result, a switching path between the current testing environment and the target testing environment is established, and finally, a corresponding switching key is added on the interface of the mobile phone client, so that development and testing personnel can directly realize the switching of the testing environment by operating the switching key, the repeated setting and packaging operation in the existing testing environment switching process can be omitted, and the convenience of the mobile phone client for switching the testing environment can be improved.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (7)
1. A method for switching test environments of a mobile phone client is characterized by specifically comprising the following steps:
step (1), according to the state of the storage environment variable information in the APP, determining to execute adaptive starting operation on the APP;
step (2), obtaining the current testing environment information of the mobile phone client so as to determine the target testing environment corresponding to the APP;
step (3), obtaining an update state of the storage environment variable information in the APP, and executing a preset mode operation on the APP to switch the APP to the target test environment;
in the step (1), determining, based on the state of the information about the stored environment variable in the APP, that the adaptive start-up operation is to be performed on the APP specifically includes,
step (11), judging the current starting state of the APP, and determining an obtaining mode of the stored environment variable information in the APP based on the judging result of the starting state;
step (12), judging the storage state of the environment variable information corresponding to the APP currently, and acquiring the corresponding environment variable information from the APP based on the judgment result of the storage state;
in the step (12), the storage state of the environment variable information currently corresponding to the APP is judged, and the obtaining of the corresponding environment variable information from the APP based on the judgment result of the storage state specifically includes,
step (121), judging the data storage state of the environment variable information storage area corresponding to the APP;
step (122), if the data storage state indicates that the storage area stores data information, extracting the data information currently stored in the storage area as corresponding environment variable information, and starting the APP based on the extracted environment variable information;
step (123), if the data storage status information indicates that the storage area does not store data information, extracting corresponding environment variable information through a default creation mode, wherein,
the default creating mode comprises the steps of creating corresponding variable information through an online environment connected with the APP, extracting the variable information formed by creating the online environment, storing the variable information into a local space corresponding to the mobile phone client, obtaining corresponding environment variable information through the variable information, and using the obtained environment variable information as a starting key of the APP.
2. The method for the mobile phone client to perform the test environment switching according to claim 1, wherein:
in the step (11), the current starting state of the APP is determined, and the obtaining module for storing the environment variable information in the APP is determined to specifically include, based on the determination result of the starting state,
if the judgment result of the starting state indicates that the APP is currently in a non-starting state, executing a first environment variable information acquisition mode on the APP, wherein the first environment variable information acquisition mode is used for performing retrieval processing on stored data on an environment variable information storage region corresponding to the APP,
and if the judgment result of the starting state indicates that the APP is currently in the starting state, executing a second environment variable information acquisition mode on the APP, wherein the second environment variable information acquisition mode is used for stopping retrieval processing on the stored data of the environment variable information storage area corresponding to the APP.
3. The method for the mobile phone client to perform the test environment switching according to claim 1, wherein: in the step (122), if the data storage state indicates that the storage region stores data information, extracting the data information currently stored in the storage region as corresponding environment variable information, and starting the APP based on the extracted environment variable information specifically includes,
step (1221), if the data storage state indicates that the storage area stores data information, forming a corresponding environment information extraction matching instruction, where the environment information extraction matching instruction at least includes corresponding operation index parameters of the APP in a plurality of different working mode environments;
and (1222), performing feature matching processing on the environment information extraction matching instruction and a preset environment information dictionary, so as to extract corresponding environment information data from the preset environment information dictionary as the variable information.
4. The method for the mobile phone client to perform the test environment switching according to claim 1, wherein:
in the step (2), obtaining the current testing environment information of the mobile phone client to determine that the target testing environment corresponding to the APP specifically includes,
step (21), acquiring a plurality of current operating parameters of the mobile phone client, and matching the operating parameters with a plurality of preset client operating environment modes to determine the current corresponding operating environment mode of the mobile phone client;
step (22), extracting the current testing environment information according to the operating environment mode determined in the step (21);
and (23) determining the target test environment according to the current test environment information and the operation parameters corresponding to the test operation of the APP, and generating switching path information between the current APP operation environment and the target test environment.
5. The method for the mobile phone client to perform the test environment switching according to claim 1, wherein:
in the step (3), acquiring an updated state of the storage environment variable information in the APP, and performing a preset mode operation on the APP to switch the APP to the target test environment specifically includes,
step (31), judging the updating state of the stored environment variable information in the APP, if the environment variable information is updated, forming a test environment switching signal, and if the environment variable information is not updated, forming a test environment maintaining signal;
step (32), the APP enters a test environment switching mode based on the test environment switching signal, so that the APP is switched from the current running environment to the target test environment;
and (33) the APP enters a test environment maintaining mode based on the test environment maintaining signal, so that the APP maintains the current operation environment unchanged.
6. The method for the mobile phone client to perform the test environment switch as claimed in claim 5, wherein:
in the step (32), the APP entering a test environment switching mode based on the test environment switching signal, such that switching the APP from a current operating environment to the target test environment specifically includes,
when the APP receives the test environment switching signal, a corresponding environment switching icon is additionally arranged in an operation page of the APP, and after a preset operation is executed on the environment switching icon, the APP is switched from the current operation environment to the target test environment,
and the environment switching icon appears in the running operation page only when the APP is in a preset debugging mode.
7. The method for the mobile phone client to perform the test environment switching according to claim 1, wherein:
in the step (2), obtaining the current testing environment information of the mobile phone client to determine that the target testing environment corresponding to the APP specifically includes,
determining a testing environment database corresponding to the testing environment information, and performing a learning operation on the target testing environment through the testing environment database, wherein the learning operation comprises the following steps (201) to (205):
step (201), determining that the test environment database comprises N records, each record comprises S different operation parameters, the N records and the S operation parameters jointly form a matrix X, simultaneously forming a vector Y1 according to an operation environment mode of a mobile phone client corresponding to each record in the test environment database, and performing repeated value elimination processing on the vector Y1 to form a mobile phone client operation mode vector Y;
step (202), using the following formula (1) to perform the primary learning, so as to obtain the error value
In the above-mentioned formula (1),is a matrix W with D rows and S columns and each matrix element value is a random value between 0 and 1, D is the number of vector values in the mobile phone client operation mode vector Y,mapping W X for matrix X and f of matrix W, L being an error value,for the value of the element in the ith column of matrix X,is composed ofJ =1, 2, a.. multidot. Yli-1, Yli +1, …, D, Yli +1 are position values of values corresponding to the ith value in the vector Y1 in the mobile phone client operation mode vector Y, i =1, 2, a.. multidot.n,for the values of the kth row and the tth column in the matrix W, k =1, 2, ·, D, t =1, 2,. and S;
step (203) of optimizing the matrix W by using the following formula (2)
In the above-mentioned formula (2),is L pairsThe calculation of the partial derivatives is carried out,performing optimization processing on the matrix W to obtain a matrix W1 for the values obtained after the partial derivation operation, namely k =1, 2,. and D, and t =1, 2,. and S;
and (204) substituting the matrix W1 into the following formula (3), solving and calculating L2
Step (205), calculating an absolute value of L-L2, if the absolute value is equal to zero, ending the learning operation and outputting the corresponding matrix W, and if the absolute value is not equal to zero, repeating the steps (203) to (205) until the repetition times reach ten thousand times and outputting the corresponding matrix W;
obtaining S operation parameters currently corresponding to the mobile phone client by combining the matrix W corresponding to the output, substituting the S operation parameters into the following equation (5) to calculate and obtain an operation environment vector P
In the above-mentioned equation (4),for the t-th operation parameter of the mobile phone client,for the kth value of the runtime environment vector P to be computed,the method comprises the steps of obtaining a running environment vector P, determining a maximum value Pz in the running environment vector P after calculating the running environment vector P, and determining a running environment mode of a mobile phone client corresponding to a z-th value in the running environment vector Y as a target test environment currently corresponding to the mobile phone client if the maximum value Pz, Pz is the z-th value of the running environment vector P and z =1, 2, …, D.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910372789.6A CN110333999B (en) | 2019-05-06 | 2019-05-06 | Method for switching test environments of mobile phone client |
CN202110094818.4A CN112711542B (en) | 2019-05-06 | 2019-05-06 | Method for switching testing environment of mobile phone client |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910372789.6A CN110333999B (en) | 2019-05-06 | 2019-05-06 | Method for switching test environments of mobile phone client |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110094818.4A Division CN112711542B (en) | 2019-05-06 | 2019-05-06 | Method for switching testing environment of mobile phone client |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110333999A CN110333999A (en) | 2019-10-15 |
CN110333999B true CN110333999B (en) | 2021-02-23 |
Family
ID=68140029
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910372789.6A Active CN110333999B (en) | 2019-05-06 | 2019-05-06 | Method for switching test environments of mobile phone client |
CN202110094818.4A Active CN112711542B (en) | 2019-05-06 | 2019-05-06 | Method for switching testing environment of mobile phone client |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110094818.4A Active CN112711542B (en) | 2019-05-06 | 2019-05-06 | Method for switching testing environment of mobile phone client |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN110333999B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111475763B (en) * | 2020-04-15 | 2020-12-15 | 成都安易迅科技有限公司 | Webpage running method and device, storage medium and equipment |
CN112597027B (en) * | 2020-12-25 | 2024-10-15 | 上海高顿教育科技有限公司 | Method and device suitable for APP to carry out environment switching debugging |
CN112799670B (en) * | 2021-04-14 | 2021-08-03 | 盛威时代科技集团有限公司 | Method and system for unified multi-terminal logic development |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105989083A (en) * | 2015-02-11 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Access environment switching method and apparatus |
CN107861863A (en) * | 2017-08-24 | 2018-03-30 | 平安普惠企业管理有限公司 | Running environment switching method, equipment and computer-readable recording medium |
JP2018120362A (en) * | 2017-01-24 | 2018-08-02 | 日本放送協会 | Scene variation point model learning device, scene variation point detection device and programs thereof |
CN109684201A (en) * | 2018-11-26 | 2019-04-26 | 平安科技(深圳)有限公司 | It is switched fast the method, apparatus, computer equipment and storage medium of running environment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10536357B2 (en) * | 2015-06-05 | 2020-01-14 | Cisco Technology, Inc. | Late data detection in data center |
WO2018066040A1 (en) * | 2016-10-03 | 2018-04-12 | 株式会社日立製作所 | Management computer and test environment determination method |
-
2019
- 2019-05-06 CN CN201910372789.6A patent/CN110333999B/en active Active
- 2019-05-06 CN CN202110094818.4A patent/CN112711542B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105989083A (en) * | 2015-02-11 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Access environment switching method and apparatus |
JP2018120362A (en) * | 2017-01-24 | 2018-08-02 | 日本放送協会 | Scene variation point model learning device, scene variation point detection device and programs thereof |
CN107861863A (en) * | 2017-08-24 | 2018-03-30 | 平安普惠企业管理有限公司 | Running environment switching method, equipment and computer-readable recording medium |
CN109684201A (en) * | 2018-11-26 | 2019-04-26 | 平安科技(深圳)有限公司 | It is switched fast the method, apparatus, computer equipment and storage medium of running environment |
Non-Patent Citations (3)
Title |
---|
iOS App内切换环境;两个手指敲代码;《https://www.jianshu.com/p/cd8fb442ba8b》;20180518;第1-5页 * |
Switching Environments With Configurations;Bart Jacobs;《https://cocoacasts.com/switching-environments-with-configurations/》;20160804;第1-9页 * |
手把手教你给一个iOS app配置多个环境变量;一缕疡流化隐半边冰霜;《https://www.jianshu.com/p/83b6e781eb51》;20160811;第1-23页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112711542A (en) | 2021-04-27 |
CN112711542B (en) | 2023-12-01 |
CN110333999A (en) | 2019-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110333999B (en) | Method for switching test environments of mobile phone client | |
CN108959644A (en) | Search ordering method, device, computer equipment and storage medium | |
CN111310057B (en) | Online learning mining method and device, online learning system and server | |
CN111209215B (en) | Application program testing method and device, computer equipment and storage medium | |
CN110471585A (en) | Function of application icon methods of exhibiting, device and computer equipment | |
CN110209378A (en) | Page generation method, device, terminal and storage medium | |
CN111432003B (en) | Data pushing method and device applied to cloud computing, electronic equipment and system | |
CN111414540B (en) | Online learning recommendation method and device, online learning system and server | |
CN111934908A (en) | Internet of things simulation method, device and system and storage medium | |
CN115329204A (en) | Cloud business service pushing method and pushing processing system based on big data mining | |
CN117370523A (en) | Large language model application service method and device | |
CN109992659B (en) | Method and device for text sorting | |
CN110888800A (en) | Service interaction function test method, device, storage medium and test system | |
CN117194276A (en) | Chip software and hardware joint simulation debugging system | |
CN111338955B (en) | Software graphical interface testing method and device, software development system and server | |
CN113032078A (en) | Page display method and device, electronic equipment and computer readable storage medium | |
CN112214978A (en) | Data processing method and related equipment | |
CN109344335B (en) | Content recommendation method and electronic equipment | |
CN115173569B (en) | Power distribution equipment testing method, device, equipment and medium based on BS (browser/server) framework | |
CN105095093A (en) | Intelligent terminal performance test method and system | |
CN114925750A (en) | Information recommendation method and device, computer readable storage medium and electronic equipment | |
CN110647314B (en) | Skill generation method and device and electronic equipment | |
CN113326180A (en) | Method and equipment for testing task guide | |
CN111428886A (en) | Fault diagnosis deep learning model self-adaptive updating method and device | |
CN112837040B (en) | Power data management method and system applied to smart grid |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 701-28, floor 7, building 5, yard 1, Shangdi East Road, Haidian District, Beijing 100000 Applicant after: Shengwei times Technology Group Co.,Ltd. Address before: 100000 E701F, Building 1, Courtyard 1, Shangdi East Road, Haidian District, Beijing Applicant before: BEIJING SHENGWEI TIMES TECHNOLOGY Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |