CN115934540A - Test account management method and device, computing equipment and storage medium - Google Patents

Test account management method and device, computing equipment and storage medium Download PDF

Info

Publication number
CN115934540A
CN115934540A CN202211591135.0A CN202211591135A CN115934540A CN 115934540 A CN115934540 A CN 115934540A CN 202211591135 A CN202211591135 A CN 202211591135A CN 115934540 A CN115934540 A CN 115934540A
Authority
CN
China
Prior art keywords
account
test
test account
information
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211591135.0A
Other languages
Chinese (zh)
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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202211591135.0A priority Critical patent/CN115934540A/en
Publication of CN115934540A publication Critical patent/CN115934540A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application discloses a test account management method, a test account management device, a computing device and a storage medium, wherein the method comprises the following steps: receiving a first call request of a tester to a first interface; selecting target test account information with an account state being an idle state from a shared account data table; returning the target test account information to the tester, and changing the account state of the target test account information from an idle state to a locked state; receiving a second call request of the tester to the second interface; the second calling request carries information of the test account to be released; and changing the account state of the test account information to be released from a locked state to an idle state. By means of the method, the problem of test account number conflict can be avoided, meanwhile, a tester can release the test account numbers according to the requirements of the tester, and efficient sharing and use of the test account numbers can be achieved.

Description

Test account management method and device, computing equipment and storage medium
Technical Field
The application relates to the technical field of computers, in particular to a test account management method, a test account management device, a computing device and a storage medium.
Background
In the daily service test process, the condition that service test is required to be performed through test accounts is often met, in order to reduce repeated registration of the test accounts and improve test efficiency, a batch of test accounts are prepared in advance for being shared by a tester, and the tester selects the test accounts from the test accounts prepared in advance to perform service function test.
However, the test account sharing mode has the problem of test account use conflict, so that the test effect is influenced. For example, different testers may select the same test account to perform a service test, which causes confusion of test data flow, and due to account security setting, a login conflict problem may occur, and a user of a previous test account may be forced to quit, thereby affecting a test flow; for another example, in an automated test script, when different test cases use the same test account, the problem of test account conflict may also be caused, so that the automated script fails to be executed, thereby affecting the automated test efficiency and causing interference to the test result.
Disclosure of Invention
An embodiment of the application aims to provide a test account management method, a test account management device, a computing device and a storage medium, so as to solve the problem of test account use conflict in a test account sharing mode in the prior art.
According to one aspect of the application, a test account management method is provided, and includes:
receiving a first call request of a tester to a first interface;
selecting target test account information with an account state being an idle state from a shared account data table;
returning the target test account information to the tester, and changing the account state of the target test account information from an idle state to a locked state;
receiving a second call request of the tester to the second interface; the second calling request carries information of the test account to be released;
and changing the account state of the test account information to be released from the locked state into an idle state.
Optionally, the first call request carries a test account label; selecting the target test account information with the account state being the idle state from the shared account data table further comprises:
selecting a group of test account information of which the account label is matched with the test account label and the account state is an idle state from the shared account data table;
and randomly selecting the test account information from the group of test account information as target test account information.
Optionally, the account label is determined according to the authority and/or the use scenario of the test account.
Optionally, the method further comprises:
registering and generating a plurality of test account numbers;
recording the test account information of a plurality of test accounts in a shared account data table; wherein, the test account information comprises: and testing the ID of the account and the password of the account.
Optionally, the method further comprises:
and responding to the test account information update of any test account, and pushing an information update notice of the test account to each tester.
Optionally, after the target test account information is returned to the tester, the method further includes:
recording the corresponding relation between the target test account information and the tester in a shared account data table;
after the account state of the test account information to be released is changed from the locked state to the idle state, the method further comprises the following steps:
and deleting the corresponding relation between the test account information to be released and the corresponding tester.
Optionally, after the target test account information is returned to the tester, the method further includes:
and recording the corresponding relation between the target test account information and the request time information of the target test account information in the shared account data table.
Optionally, the method further comprises:
and scanning the shared account data table through a timing task, and if the difference value between the request time information corresponding to at least one piece of test account information in the locked state and the current time information exceeds a preset value, changing the account state of the at least one piece of test account information in the locked state into an idle state.
Optionally, the first interface and the second interface are different API interfaces.
According to another aspect of the present application, there is provided a test account management apparatus, including:
the first receiving module is suitable for receiving a first calling request of a tester to the first interface;
the selection module is suitable for selecting target test account information with an account state being an idle state from the shared account data table;
the feedback module is suitable for returning the target test account information to the tester;
the change module is suitable for changing the account state of the target test account information from an idle state to a locking state;
the second receiving module is suitable for receiving a second calling request of the tester to the second interface; the second calling request carries information of the test account to be released;
the modification module is further adapted to: and changing the account state of the test account information to be released from a locked state to an idle state.
Optionally, the first call request carries a test account label; the selection module is further adapted to:
selecting a group of test account information of which the account label is matched with the test account label and the account state is an idle state from the shared account data table;
and randomly selecting the test account information from the group of test account information as target test account information.
Optionally, the account label is determined according to the authority and/or the use scenario of the test account.
Optionally, the apparatus further comprises: the registration module is suitable for registering and generating a plurality of test accounts; recording the test account information of a plurality of test accounts in a shared account data table; wherein, the test account information comprises: and testing the ID and the password of the account.
Optionally, the apparatus further comprises: and the updating notification module is suitable for responding to the updating of the test account information of any test account and pushing the information updating notification of the test account to each tester.
Optionally, the apparatus further comprises: the recording module is suitable for recording the corresponding relation between the target test account information and the tester in the shared account data table; and after the account state of the test account information to be released is changed from the locked state to the idle state, deleting the corresponding relation between the test account information to be released and the corresponding tester.
Optionally, the recording module is further adapted to: and recording the corresponding relation between the target test account information and the request time information of the target test account information in the shared account data table.
Optionally, the modification module is further adapted to: and scanning the shared account data table through a timing task, and if the difference value between the request time information corresponding to the test account information in the at least one locking state and the current time information exceeds a preset value, changing the account state of the test account information in the at least one locking state into an idle state.
Optionally, the first interface and the second interface are different API interfaces.
According to yet another aspect of the present application, there is provided a computing device comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the test account management method.
According to another aspect of the present application, a computer storage medium is provided, where at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform an operation corresponding to the test account management method.
According to the test account management method, device, computing equipment and storage medium, on one hand, test account sharing is achieved through pooled test accounts, and repeated registration of the test accounts can be avoided; on the other hand, by adding the account number acquisition interface and the account number release interface, when a tester needs to acquire a test account number, the tester can randomly acquire a specified label and a free test account number from the pooling test account number library by calling the account number acquisition interface, so that the tester can acquire the test account number matched with the authority requirement and/or the scene requirement of the tester, and meanwhile, the test account number is locked, so that the test account number cannot be acquired by the account number acquisition interface, the test account number can be prevented from being used in other test scenes, and the problem of account number use conflict is avoided; when a tester needs to release a test account, the tester can conveniently and flexibly acquire and release the test account by calling an account release interface and carrying the ID of the test account to be released in request parameters, and changing the locked state of the test account to be released into an idle state; on the other hand, the time and/or user information of the test account acquired by the tester are recorded in the shared account data table, so that the use duration and/or user information of the test account can be conveniently acquired; on the other hand, the shared account data table is scanned at regular time through the timing task to obtain the locking duration of each test account, the test accounts with abnormal locking duration are released, and the condition that the test accounts are unavailable due to the fact that a tester does not release the test accounts in time is avoided; on the other hand, when the related information of the test account is updated, the update notification is pushed to all the testers, so that all the account users can acquire the information modification of the test account in real time, and the problem that the notification of the information modification of the test account is not timely is avoided.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flowchart of a test account management method provided in an embodiment of the present application;
fig. 2 is a flowchart illustrating a test account management method according to another embodiment of the present application;
fig. 3 is a flowchart illustrating a test account management method according to another embodiment of the present application;
fig. 4 is a schematic structural diagram illustrating a test account management apparatus according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of a computing device provided in an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Fig. 1 shows a flowchart of a test account management method provided in an embodiment of the present application, where the method is applied to any device with computing capability. As shown in fig. 1, the method comprises the steps of:
step S110, a first call request of the tester to the first interface is received.
The first interface is used for acquiring a test account, and when a tester needs to acquire the test account, the tester calls the first interface to acquire one test account.
Step S120, selecting target test account information with an account status being an idle status from the shared account data table.
The shared account data table records a plurality of pieces of test account information and account states thereof, the account states are divided into an idle state and a locked state, the idle state indicates that no tester uses the test account currently, and the locked state indicates that a tester uses the test account currently.
And responding to a first call request of a tester to the first interface, and screening test account information with an account state being an idle state from the shared account data table as target test account information.
And step S130, returning the target test account information to the tester, and changing the account state of the target test account information from an idle state to a locked state.
And returning the screened target test account information to the tester, wherein the target test account information comprises an account ID, an account password and the like, so that the tester can use the target test account information to perform a service function test. Meanwhile, the account state of the target test account information is changed from an idle state to a locked state, and in the subsequent process, before the target test account is released, the target test account information cannot be provided to other testers, so that account use conflict caused by continuous use of the target test account information in other scenes is avoided.
Step S140, receiving a second call request from the tester to the second interface.
The second interface is used for releasing the specified test account information, when the test account is used by the tester, the test account can be released by calling the second interface, the tester needs to specify the test account to be released, and the test account information to be released is carried in the parameters of the calling request.
Step S150, changing the account status of the test account information to be released from the locked status to an idle status.
And responding to a second call request of the tester to the second interface, and changing the account state of the test account information to be released carried in the second call request, namely changing the locked state into an idle state, so as to release the test account information, so that the test account information can be acquired by the first interface and provided to other testers with requests.
According to the test account management method, a first call request of a tester to a first interface is received; selecting target test account information with an account state being an idle state from a shared account data table; returning the target test account information to the tester, and changing the account state of the target test account information from an idle state to a locked state; receiving a second call request of the tester to the second interface; the second calling request carries information of the test account to be released; and changing the account state of the test account information to be released from a locked state to an idle state. Through the method, the target test account is obtained from the shared account data table in the mode of adding the interface, and meanwhile, the target test account is locked, so that the target test account cannot be selected and returned to other testers, the problem of account conflict can be avoided, the implementation mode of releasing the test account is further provided, after the test account is used, the tester releases the test account through calling the interface, the tester can release the test account according to the requirement of the tester, and the high-efficiency shared use of the test account can be realized.
Fig. 2 is a flowchart illustrating a test account management method according to another embodiment of the present application, where the method is applied to any device with computing capability. As shown in fig. 2, the method comprises the steps of:
step S210, registering to generate a plurality of test accounts; and recording the test account information of the plurality of test accounts in a shared account data table.
In practical application, a plurality of related test account numbers can be registered according to a business process, a shared account number data table is established in a database, and the registered and applied test account number information is maintained in the shared account number data table. The test account information specifically comprises fields such as a test account ID, a test account password and a user name, and is equivalent to a pooling shared test account library.
Step S220, a first call request of the tester to the first interface is received.
The first Interface is specifically an API (Application Programming Interface), and the first Interface is called by an http request when the testing party needs to obtain the test account, and the testing party may be a service function, a service person, and/or an automated test script, and the like.
In the embodiment of the application, the first calling request carries the test account label, so that the test account information is selected according to the test account label. The account label is determined according to the permission and/or the use scene of the test account, for example, different test accounts have different data operation permissions, and the method is suitable for different test scenes. The authority and/or the use scene of the test account can be preset, and the test account is marked according to the authority and/or the use scene. By the method, the registered test account numbers can be classified according to different labels, so that a tester can obtain the test account numbers matched with the authority requirements and/or scene requirements of the tester, and the sharing performance of the test account numbers is further improved.
Step S230, selecting a group of test account information of which the account label is matched with the test account label and the account state is an idle state from the shared account data table; and randomly selecting the test account information from the group of test account information as target test account information.
Extracting a test account number tag carried in the first calling request, firstly selecting a group of idle test account number information with the account number tag matched with the test account number tag from the shared account number data table, and then randomly selecting one test account number information from the group of test account number information as target test account number information.
Step S240, returning the target test account information to the tester, changing the account status of the target test account information from an idle state to a locked state, and recording a corresponding relationship between the target test account information and the tester in the shared account data table.
And returning the target test account information to the testing party through the first interface, wherein the returned data format is a JSON format, the testing party obtains a test account ID, a test account password, a user name and the like by analyzing JSON data, and the account ID, the password and the user name are used for performing function test of the service flow in the function test or the automatic test.
And changing the account state of the target test account information from an idle state to a locked state, and recording the account state of the test account information in a shared account data table. Because the tester calls the first interface to select the idle test account information from the shared account data table to return, the target test account information can not be provided to other testers before the tester releases the target test account information, so that the problem of test account conflict can be avoided, and the smooth operation of the service function test and the accuracy of the test data can be ensured.
In addition, the current user information of the target test account information is recorded in the shared account data table, for example, the corresponding relationship between the target test account information and the tester identifier is recorded, so that the user information of the test account information can be obtained in real time.
In an optional manner, a corresponding relationship between the target test account information and the request time information of the target test account information is recorded in the shared account data table. The request time information of the target test account information can be the time when the target test account information is returned to the tester, and the service time condition of the test account information can be obtained in real time by recording the request time information of the target test account information.
Step S250, receiving a second call request of the tester to the second interface; and the second calling request carries the information of the test account to be released.
The second interface may also be an API interface, and the second interface is configured to release specified test account information, and when the tester finishes using the test account, the tester may release the test account by calling the second interface, where the tester needs to specify the test account information to be released, and specifically, the parameter of the second call request carries the test account information to be released, such as the test account ID to be released.
Step S260, the account status of the test account information to be released is changed from the locked state to the idle state, and the corresponding relationship between the test account information to be released and the corresponding tester is deleted.
And changing the account state corresponding to the test account information to be released carried in the second calling request from a locked state to an idle state, so that the test account information can be acquired by the first interface, the purpose of releasing the test account is achieved, and meanwhile, the identifier of the test party corresponding to the test account information to be released, which is recorded in the shared account data, is removed.
In an optional mode, in order to avoid the problem that the test account is not available due to the fact that the test account is not released in time after the test party finishes using the test account, the test account information which should be released is released by scanning the shared account data table at regular time. Specifically, the shared account data table is scanned through a timing task, and if the difference value between the request time information corresponding to the test account information in the at least one locked state and the current time information exceeds a preset value, the account state of the test account information in the at least one locked state is changed into an idle state. And setting a timing task for scanning a shared data table at regular time, calculating the difference value between the request time corresponding to the test account information in the locking state and the current time, if the difference value exceeds a specified time threshold, releasing the test account, and changing the account state from the locking state to the idle state, so that the test account information can be continuously put into use, the account is prevented from being unavailable due to the fact that the account is not released in time after the previous tester finishes using, and the efficient sharing of the test account is realized.
In an optional mode, in response to the test account information update of any test account, an information update notification of the test account is pushed to each tester, for example, when the password of the test account is updated, a password update notification of the test account is pushed to all testers in real time, so that account locking caused by using an old password by the testers is avoided, and through the mode, all testers can know the modification of the relevant information of the test account in real time.
According to the test account management method provided by the embodiment of the application, on one hand, test account sharing is realized through pooled test accounts, and repeated registration of the test accounts can be avoided; on the other hand, by adding the account number acquisition API interface and the account number release API interface, when a tester needs to acquire a test account number, the tester can randomly acquire a specified label and a free test account number from the pooling test account number library by calling the account number acquisition API interface, so that the tester can acquire the test account number matched with the authority requirement and/or the scene requirement of the tester, and meanwhile, the test account number is locked, so that the test account number cannot be acquired by the API interface any more, the test account number can be prevented from being used in other test scenes, and the problem of account number use conflict is avoided; when a tester needs to release a test account, the test account to be released is changed from a locked state to an idle state by calling an account release API (application programming interface) interface and carrying the test account ID to be released in request parameters, so that the tester can conveniently and flexibly acquire and release the test account, and the high-efficiency sharing of the test account is realized; on the other hand, the time and/or user information of the test account acquired by the tester are recorded in the shared account data table, so that the use duration and/or user information of the test account can be conveniently acquired; on the other hand, the shared account data table is scanned at regular time through the timing task to obtain the locking duration of each test account, the test accounts with abnormal locking duration are released, and the condition that the test accounts are unavailable due to the fact that a tester does not release the test accounts in time is avoided; on the other hand, when the related information of the test account is updated, the update notification is pushed to all the testers, so that all the account users can acquire the information modification of the test account in real time, and the problem that the notification of the information modification of the test account is not timely is avoided.
Fig. 3 shows a flowchart of a test account management method according to another embodiment of the present application, and as shown in fig. 3, a plurality of test accounts are registered by an application registration unit 31, and relevant information of each test account is written into a shared account data table 32, where a plurality of pieces of test account information are recorded in the shared account data table 32, and the test account information specifically includes the following fields of the test account: the test account ID 321, the user name 322, the test account password 323, the account status 324 (idle status or locked status), the account tag 325, the acquisition time 326, and the tester identity 327. It should be noted that the acquisition time and the tester identity are recorded only when the test account information is provided to the tester. The shared account data table is scanned by the timing task 33 to release the test account whose lock time is too long. The business test 34, the salesman test 35, and the test script 36 specify an account label and call an account acquisition interface to acquire test account information in an idle state consistent with the specified account label. And in response to the calling of the account number acquisition interface, firstly selecting a group of test account number information which is consistent with the specified account number label and is in an idle state, and then selecting a target test account number information from the group of test account number information and returning the target test account number information to the tester.
Fig. 4 shows a schematic structural diagram of a test account management device according to an embodiment of the present application. As shown in fig. 4, the apparatus includes:
a first receiving module 41, adapted to receive a first call request of a tester to a first interface;
a selection module 42, adapted to select target test account information with an account status being an idle status from the shared account data table;
a feedback module 43 adapted to return the target test account information to the tester;
a changing module 44, adapted to change the account status of the target test account information from an idle status to a locked status;
a second receiving module 45, adapted to receive a second call request of the tester to the second interface; the second calling request carries information of the test account to be released;
the modification module 44 is further adapted to: and changing the account state of the test account information to be released from the locked state into an idle state.
In an optional mode, the first call request carries a test account label; the selection module 42 is further adapted to:
selecting a group of test account information of which the account label is matched with the test account label and the account state is an idle state from the shared account data table;
and randomly selecting the test account information from the group of test account information as target test account information.
In an alternative manner, the account label is determined according to the authority and/or the use scenario of the test account.
In an optional manner, the apparatus further comprises: the registration module is suitable for registering and generating a plurality of test accounts; recording the test account information of a plurality of test accounts in a shared account data table; wherein, the test account information comprises: and testing the ID of the account and the password of the account.
In an optional manner, the apparatus further comprises: and the updating notification module is suitable for responding to the updating of the test account information of any test account and pushing the information updating notification of the test account to each tester.
In an optional manner, the apparatus further comprises: the recording module is suitable for recording the corresponding relation between the target test account information and the tester in the shared account data table; and after the account state of the test account information to be released is changed from the locked state to the idle state, deleting the corresponding relation between the test account information to be released and the corresponding tester.
In an alternative, the recording module is further adapted to: and recording the corresponding relation between the target test account information and the request time information of the target test account information in the shared account data table.
In an alternative approach, the modification module 44 is further adapted to: and scanning the shared account data table through a timing task, and if the difference value between the request time information corresponding to at least one piece of test account information in the locked state and the current time information exceeds a preset value, changing the account state of the at least one piece of test account information in the locked state into an idle state.
In an alternative, the first interface and the second interface are different API interfaces.
The embodiment of the application provides a nonvolatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the test account management method in any method embodiment.
Fig. 5 is a schematic structural diagram of a computing device provided in an embodiment of the present application, and the specific embodiment of the present application does not limit a specific implementation of the computing device.
As shown in fig. 5, the computing device may include: a processor (processor) 502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508. A communication interface 504 for communicating with network elements of other devices, such as clients or other servers. The processor 502 is configured to execute the program 510, and may specifically execute relevant steps in the above-described test account management method embodiment for a computing device.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement embodiments of the present Application. The computing device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present application are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and any descriptions of specific languages are provided above to disclose the best mode of use of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the embodiments of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the application and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be construed to reflect the intent: this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the devices in an embodiment may be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Moreover, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components according to embodiments of the present application. The present application may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limited to the order of execution unless otherwise specified.

Claims (12)

1. A test account management method comprises the following steps:
receiving a first call request of a tester to a first interface;
selecting target test account information with an account state being an idle state from a shared account data table;
returning the target test account information to the tester, and changing the account state of the target test account information from an idle state to a locked state;
receiving a second call request of the tester to the second interface; the second calling request carries information of the test account to be released;
and changing the account state of the test account information to be released from a locked state to an idle state.
2. The method of claim 1, wherein the first invocation request carries a test account label; the step of selecting the target test account information with the account state being the idle state from the shared account data table further comprises the following steps:
selecting a group of test account information of which the account labels are matched with the test account labels and the account states are idle states from the shared account data table;
and randomly selecting the test account information from the group of test account information as the target test account information.
3. The method of claim 2, wherein the account label is determined according to a permission and/or usage scenario of the test account.
4. The method according to any one of claims 1-3, wherein the method further comprises:
registering and generating a plurality of test account numbers;
recording the test account information of the plurality of test accounts in the shared account data table; wherein, the test account information includes: and testing the ID of the account and the password of the account.
5. The method of claim 4, wherein the method further comprises:
and responding to the test account information update of any test account, and pushing an information update notice of the test account to each tester.
6. The method of any of claims 1-5, wherein after returning the target test account information to the tester, the method further comprises:
recording the corresponding relation between the target test account information and the tester in the shared account data table;
after the account status of the test account information to be released is changed from the locked state to the idle state, the method further includes:
and deleting the corresponding relation between the account information to be released and the corresponding testing party.
7. The method of any of claims 1-6, wherein after returning the target test account information to the tester, the method further comprises:
and recording the corresponding relation between the target test account information and the request time information of the target test account information in the shared account data table.
8. The method of claim 7, wherein the method further comprises:
and scanning the shared account data table through a timing task, and if the difference value between the request time information corresponding to the test account information in at least one locking state and the current time information exceeds a preset value, changing the account state of the test account information in at least one locking state into an idle state.
9. The method of any of claims 1-8, wherein the first and second interfaces are different API interfaces.
10. A test account management apparatus, comprising:
the first receiving module is suitable for receiving a first calling request of a tester to the first interface;
the selection module is suitable for selecting target test account information with an account state being an idle state from the shared account data table;
the feedback module is suitable for returning the target test account information to the tester;
the changing module is suitable for changing the account state of the target test account information from an idle state to a locking state;
the second receiving module is suitable for receiving a second calling request of the tester to the second interface; the second calling request carries information of the test account to be released;
the altering module is further adapted to: and changing the account state of the test account information to be released from a locked state to an idle state.
11. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the test account management method according to any one of claims 1-9.
12. A computer storage medium having stored therein at least one executable instruction that causes a processor to perform operations corresponding to the test account management method of any one of claims 1-9.
CN202211591135.0A 2022-12-12 2022-12-12 Test account management method and device, computing equipment and storage medium Pending CN115934540A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211591135.0A CN115934540A (en) 2022-12-12 2022-12-12 Test account management method and device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211591135.0A CN115934540A (en) 2022-12-12 2022-12-12 Test account management method and device, computing equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115934540A true CN115934540A (en) 2023-04-07

Family

ID=86700431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211591135.0A Pending CN115934540A (en) 2022-12-12 2022-12-12 Test account management method and device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115934540A (en)

Similar Documents

Publication Publication Date Title
CN108984388B (en) Method and terminal equipment for generating automatic test case
CN111163072B (en) Method and device for determining characteristic value in machine learning model and electronic equipment
CN108256006B (en) Method and system for loading badge pictures in live broadcast room
CN109766317B (en) File deletion method, device, equipment and storage medium
CN112783760B (en) Processing method and device for test cases and storage medium
CN110738479A (en) Order management method and system based on multi-person ordering
CN110677453A (en) ZooKeeper-based distributed lock service implementation method, device, equipment and storage medium
CN110728505A (en) Payment method, server, client and system based on multi-person order ordering
CN111045941B (en) Positioning method and device for user interface control and storage medium
CN112433936A (en) Test method, test device and storage medium
CN110852603A (en) High-throughput wind control data processing method, device, equipment and storage medium
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN108647139A (en) Test method, device, storage medium and the electronic device of system
CN115934540A (en) Test account management method and device, computing equipment and storage medium
CN111291127B (en) Data synchronization method, device, server and storage medium
CN108848183B (en) Login method and device for simulation user
CN110221952B (en) Service data processing method and device and service data processing system
CN110149356A (en) Method and device is uniformly processed in a kind of network request abnormality
CN111324472B (en) Method and device for judging garbage items of information to be detected
CN113360164B (en) Method, device and storage medium for rapidly deploying application
CN118114214B (en) Method, device and computer equipment for Pod executing privileged user command in Kubernetes
CN109241066B (en) Request processing method and device
US20230103049A1 (en) Developer-focused context-aware application security platform
CN112732664B (en) Evidence extraction method, device, electronic equipment and storage medium
CN115687126A (en) Test account sharing method and system and computer equipment

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