CN112711542A - Method for switching test environments of mobile phone client - Google Patents

Method for switching test environments of mobile phone client Download PDF

Info

Publication number
CN112711542A
CN112711542A CN202110094818.4A CN202110094818A CN112711542A CN 112711542 A CN112711542 A CN 112711542A CN 202110094818 A CN202110094818 A CN 202110094818A CN 112711542 A CN112711542 A CN 112711542A
Authority
CN
China
Prior art keywords
environment
app
mobile phone
phone client
matrix
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.)
Granted
Application number
CN202110094818.4A
Other languages
Chinese (zh)
Other versions
CN112711542B (en
Inventor
姜生喜
卢岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shengwei Times Technology Group Co ltd
Original Assignee
Shengwei Times Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shengwei Times Technology Group Co ltd filed Critical Shengwei Times Technology Group Co ltd
Priority to CN202110094818.4A priority Critical patent/CN112711542B/en
Publication of CN112711542A publication Critical patent/CN112711542A/en
Application granted granted Critical
Publication of CN112711542B publication Critical patent/CN112711542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

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

Method for switching test environments of mobile phone client
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
Figure BDA0002913684730000051
In the above formula (1), W (ran, S) 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, f (X, W) ═ Wx is a mapping W X of the matrix X and f of the matrix W, L is an error value, X is a matrix X, and X is a matrix XiIs the value of the element in column i of matrix X, f (X)i,W)jIs XiAnd f, mapping j to a matrix W to obtain a j value of a vector, wherein j is 1, 2, 3, Yli-1, YLi +1, …, D, Yli +1 is a position value of a value corresponding to the ith value in the vector Y1 in the mobile phone client operation mode vector Y, i is 1, 2, 3, N, Wk,tThe values in the kth row and the kth column in the matrix W, k being 1, 2,. and D, t being 1, 2,. and S;
step (203) of optimizing the matrix W by using the following formula (2)
Figure BDA0002913684730000061
In the above-mentioned formula (2),
Figure BDA0002913684730000062
is L to Wk,tDerivation of the partial derivatives, WSk,tPerforming optimization processing on the matrix W to obtain a matrix W1, wherein k is 1, 2,. and D, t is 1, 2,. and S;
and (204) substituting the matrix W1 into the following formula (3), solving and calculating L2
Figure BDA0002913684730000063
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
Figure BDA0002913684730000071
In the above equation (4), AtIs the t-th operation parameter, P, of the mobile phone clientkFor the kth value of the runtime environment vector P to be computed,
Figure BDA0002913684730000072
the method comprises the steps of obtaining a matrix W, wherein k is 1, 2, …, D, t is 1, 2, and S, calculating to obtain an operation environment vector P, determining a maximum value Pz in the operation environment vector P, and if the maximum value Pz and Pz are the z-th value of the operation environment vector P and z is 1, 2, …, D, determining a mobile phone client corresponding to the z-th value in the mobile phone client operation mode vector Y as a target test environment corresponding to the mobile phone client currently.
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
Figure BDA0002913684730000111
In the above formula (1), W (ran, S) 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, f (X, W) ═ Wx is a mapping W X of the matrix X and f of the matrix W, L is an error value, X is a matrix X, and X is a matrix XiIs the value of the element in column i of matrix X, f (X)i,W)jIs XiAnd f, mapping j to a matrix W to obtain a j value of a vector, wherein j is 1, 2, 3, Yli-1, YLi +1, …, D, Yli +1 is a position value of a value corresponding to the ith value in the vector Y1 in the mobile phone client operation mode vector Y, i is 1, 2, 3, N, Wk,tThe values in the kth row and the kth column in the matrix W, k being 1, 2,. and D, t being 1, 2,. and S;
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 adding
Figure BDA0002913684730000112
Partially, 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)
Figure BDA0002913684730000113
In the above-mentioned formula (2),
Figure BDA0002913684730000121
is L to Wk,tDerivation of the partial derivatives, WSk,tPerforming the optimization processing on the matrix W to obtain a matrix W1, wherein k is 1, 2, and D, t is 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
Figure BDA0002913684730000122
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
Figure BDA0002913684730000123
In the above equation (4), AtIs the t-th operation parameter, P, of the mobile phone clientkFor the kth value of the runtime environment vector P to be computed,
Figure BDA0002913684730000124
the method comprises the steps that the test environment is a specific matrix form of a matrix W, wherein k is 1, 2, … and D, t is 1, 2, 9 and S, after the operation environment vector P is obtained through calculation, the maximum value Pz in the operation environment vector P is determined, if the maximum value Pz is the z-th value of the operation environment vector P, and z is 1, 2, … and D, the mobile phone client corresponding to the z-th value in the mobile phone client operation mode vector Y is determined as the target test environment corresponding to the mobile phone client currently;
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 (4)

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 (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
W=rand(D,S)
f(x,W)=Wx
Figure FDA0002913684720000011
In the above formula (1), W (ran, S) 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, f (X, W) ═ Wx is a mapping W X of the matrix X and f of the matrix W, L is an error value, X is a matrix X, and X is a matrix XiIs the value of the element in column i of matrix X, f (X)i,W)jIs XiAnd f, mapping j to a matrix W to obtain a j value of a vector, wherein j is 1, 2, 3, Yli-1, YLi +1, …, D, Yli +1 is a position value of a value corresponding to the ith value in the vector Y1 in the mobile phone client operation mode vector Y, i is 1, 2, 3, N, Wk,tThe values in the kth row and the kth column in the matrix W, k being 1, 2,. and D, t being 1, 2,. and S;
step (203) of optimizing the matrix W by using the following formula (2)
Figure FDA0002913684720000021
In the above-mentioned formula (2),
Figure FDA0002913684720000022
is L to Wk,tDerivation of the partial derivatives, WSk,tPerforming optimization processing on the matrix W to obtain a matrix W1, wherein k is 1, 2,. and D, t is 1, 2,. and S;
and (204) substituting the matrix W1 into the following formula (3), solving and calculating L2
Figure FDA0002913684720000023
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
Figure FDA0002913684720000031
In the above equation (4), AtIs the t-th operation parameter, P, of the mobile phone clientkFor the kth value of the runtime environment vector P to be computed,
Figure FDA0002913684720000032
the method comprises the steps of obtaining a matrix W, wherein k is 1, 2, …, D, t is 1, 2, and S, calculating to obtain an operation environment vector P, determining a maximum value Pz in the operation environment vector P, and if the maximum value Pz and Pz are the z-th value of the operation environment vector P and z is 1, 2, …, D, determining a mobile phone client corresponding to the z-th value in the mobile phone client operation mode vector Y as a target test environment corresponding to the mobile phone client currently.
2. 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.
3. 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.
4. The method for the mobile phone client to perform the test environment switch as claimed in claim 3, 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 the running operation page of the APP, and after the environment switching icon executes preset operation, the APP is switched to the target test environment from the current running environment, wherein the environment switching icon only appears in the running operation page under the condition that the APP is in a preset debugging mode.
CN202110094818.4A 2019-05-06 2019-05-06 Method for switching testing environment of mobile phone client Active CN112711542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110094818.4A CN112711542B (en) 2019-05-06 2019-05-06 Method for switching testing environment of mobile phone client

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110094818.4A CN112711542B (en) 2019-05-06 2019-05-06 Method for switching testing environment of mobile phone client
CN201910372789.6A CN110333999B (en) 2019-05-06 2019-05-06 Method for switching test environments of mobile phone client

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201910372789.6A Division CN110333999B (en) 2019-05-06 2019-05-06 Method for switching test environments of mobile phone client

Publications (2)

Publication Number Publication Date
CN112711542A true CN112711542A (en) 2021-04-27
CN112711542B CN112711542B (en) 2023-12-01

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 Before (1)

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

Country Status (1)

Country Link
CN (2) CN110333999B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
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
CN112799670B (en) * 2021-04-14 2021-08-03 盛威时代科技集团有限公司 Method and system for unified multi-terminal logic development

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861863A (en) * 2017-08-24 2018-03-30 平安普惠企业管理有限公司 Running environment switching method, equipment and computer-readable recording medium
WO2018066040A1 (en) * 2016-10-03 2018-04-12 株式会社日立製作所 Management computer and test environment determination method
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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105989083B (en) * 2015-02-11 2020-01-14 阿里巴巴集团控股有限公司 Method and device for switching access environment
US10536357B2 (en) * 2015-06-05 2020-01-14 Cisco Technology, Inc. Late data detection in data center
JP6846216B2 (en) * 2017-01-24 2021-03-24 日本放送協会 Scene change point model learning device, scene change point detection device and their programs

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018066040A1 (en) * 2016-10-03 2018-04-12 株式会社日立製作所 Management computer and test environment determination method
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 (1)

* Cited by examiner, † Cited by third party
Title
林桂芳;: "全数字仿真技术在航天型号软件测试中的应用", 航天控制, no. 02 *

Also Published As

Publication number Publication date
CN110333999A (en) 2019-10-15
CN110333999B (en) 2021-02-23
CN112711542B (en) 2023-12-01

Similar Documents

Publication Publication Date Title
US10970097B2 (en) Adaptive web-based robotic process automation
CN111310057B (en) Online learning mining method and device, online learning system and server
CN110457214B (en) Application testing method and device and electronic equipment
CN111209215B (en) Application program testing method and device, computer equipment and storage medium
CN110162454B (en) Game running method and device, storage medium and electronic device
CN111414540B (en) Online learning recommendation method and device, online learning system and server
CN110333999B (en) Method for switching test environments of mobile phone client
CN110471585A (en) Function of application icon methods of exhibiting, device and computer equipment
CN115329204A (en) Cloud business service pushing method and pushing processing system based on big data mining
CN111432003B (en) Data pushing method and device applied to cloud computing, electronic equipment and system
CN111124898B (en) Question-answering system testing method and device, computer equipment and storage medium
CN116088882A (en) Function configuration method, system and medium based on intelligent wearable device
CN109992659B (en) Method and device for text sorting
CN111475628A (en) Session data processing method, device, computer equipment and storage medium
CN102622233A (en) System and method for automatically generating user interface applicable to certain interactive terminal equipment
CN113032078A (en) Page display method and device, electronic equipment and computer readable storage medium
CN117370523A (en) Large language model application service method and device
CN111190574B (en) Method, device, equipment and storage medium for selecting options of multi-stage linkage assembly
CN110647314A (en) Skill generation method and device and electronic equipment
CN109213490A (en) A kind of program processing method, device and relevant device
CN115173569B (en) Power distribution equipment testing method, device, equipment and medium based on BS (browser/server) framework
CN117618918B (en) Virtual scene processing method and device, electronic equipment and storage medium
CN113064588B (en) Command arranging method, device and computer readable medium
CN112837040B (en) Power data management method and system applied to smart grid
CN112631653B (en) Index library code adaptation method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant