CN116974895A - Test method, test device, electronic apparatus, readable storage medium, and program product - Google Patents

Test method, test device, electronic apparatus, readable storage medium, and program product Download PDF

Info

Publication number
CN116974895A
CN116974895A CN202211651939.5A CN202211651939A CN116974895A CN 116974895 A CN116974895 A CN 116974895A CN 202211651939 A CN202211651939 A CN 202211651939A CN 116974895 A CN116974895 A CN 116974895A
Authority
CN
China
Prior art keywords
time
module
schedule data
period
stage
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
CN202211651939.5A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211651939.5A priority Critical patent/CN116974895A/en
Publication of CN116974895A publication Critical patent/CN116974895A/en
Pending legal-status Critical Current

Links

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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The embodiment of the application provides a testing method, a testing device, electronic equipment, a readable storage medium and a program product, and relates to the fields of artificial intelligence, cloud technology and the like. According to the method, the first administrator instruction of the schedule data is adjusted for the target module, the cached schedule data in the memory corresponding to the target module is updated, the updated schedule data is pushed to the test client, the application logic of the target module is triggered and executed based on the updated schedule data, the test client is controlled to display, namely, the cached schedule data is updated through the administrator instruction, the application logic to be tested is triggered rapidly, so that the correctness of functions is verified, stable operation of online business is guaranteed, and the working efficiency of developing and testing time-driven system events is greatly improved.

Description

Test method, test device, electronic apparatus, readable storage medium, and program product
Technical Field
The present application relates to the field of software development, and in particular, to a testing method, an apparatus, an electronic device, a readable storage medium, and a program product.
Background
Time-driven system events are widely used in software, such as holiday activities, time-limited tasks, and the like. System events are time driven, meaning automatically triggered by the server system time reaching a point in time, rather than by the client sending a request protocol.
Because the system event is triggered for a long period, for example, the festival activity can be triggered once only a year, and how to trigger all logic in the system event driven by time in real time in the development test process is a problem to be solved, so as to test whether the function is correctly implemented, whether the performance meets the requirement, whether the edge condition is triggered normally or not, and the like.
Disclosure of Invention
Embodiments of the present application aim to address the problem of how to quickly trigger a time-driven system event to execute its application logic.
According to an aspect of an embodiment of the present application, there is provided a test method including:
receiving a first administrator instruction to adjust schedule data for a target module;
updating the time table data cached in the memory corresponding to the target module based on the first administrator instruction;
pushing the updated schedule data to a test client;
And executing the application logic of the target module based on the updated schedule data, and controlling the test client to display.
According to another aspect of an embodiment of the present application, there is provided a test apparatus including:
a receiving module for receiving a first administrator instruction to adjust schedule data for the target module;
the updating module is used for updating the time table data cached in the memory corresponding to the target module based on the first administrator instruction;
the pushing module is used for pushing the updated time table data to the test client;
and the execution module is used for triggering the application logic of the execution target module based on the updated schedule data and controlling the test client to display.
In an alternative embodiment, the receiving module is further configured to receive a second administrator instruction to reset the schedule data for the target module;
the device also comprises a loading module for acquiring and loading the original schedule data based on the second administrator instruction.
In an alternative embodiment, the schedule data is stored in a schedule of a predetermined structure;
wherein, in a schedule of a predetermined structure,
each module is stored in association with at least one stage corresponding to the module;
Each stage is stored in association with a corresponding time span;
each time span is stored in association with a trigger time of at least one event during the time span.
In an alternative embodiment, at least one phase constitutes a cycle;
wherein, in a schedule of a predetermined structure,
each module is stored in association with at least one period corresponding to the module;
each period is stored in association with at least one phase corresponding to the period;
each period is stored in association with a corresponding time span.
In an alternative embodiment, the first administrator instructions indicate periods and/or phases to be tested;
the updating module is used for updating the time table data cached in the memory corresponding to the target module based on the first administrator instruction, and is specifically used for:
based on a first administrator instruction, after the preset time points of each period and/or stage before the period and/or stage to be tested are sequentially changed into the current system time, changing the starting time corresponding to the time span of the period and/or stage to be tested into the current system time;
wherein the predetermined point in time comprises at least one of:
start time corresponding to the time span;
the trigger time of each event;
The time span corresponds to the end time.
In an alternative embodiment, the updating module is specifically configured to, when configured to sequentially change a predetermined time point of each cycle and/or phase before the cycle and/or phase to be tested to the current system time:
the following processes are repeatedly executed until the next period and/or stage is determined to be the period and/or stage to be tested:
if the next period and/or stage is determined not to be the period and/or stage to be tested, changing the starting time corresponding to the time span of the next period and/or stage into the current system time, and entering the current period and/or stage;
sequentially changing the trigger time of each event in the current period and/or stage into the current system time;
changing the ending time corresponding to the time span of the current period and/or stage into the current system time, and exiting the current period and/or stage.
In an optional implementation manner, the apparatus further includes a generating module, before the updating module is configured to update the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, the generating module is configured to:
acquiring time information related to each module;
The time information of various data structures is initialized into a schedule of a predetermined structure, and schedule data is generated.
In an optional implementation manner, the apparatus further includes a caching module, where before the updating module is configured to update the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, the caching module is configured to:
memory for caching time table data is allocated for each module;
and based on the memories respectively corresponding to the modules, isolating and caching the schedule data corresponding to the modules.
In an optional implementation manner, the apparatus further includes a synchronization module, where after the update module is configured to update the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, the synchronization module is configured to:
and synchronizing the updated schedule data to the relevant server of the target module.
In an alternative embodiment, the apparatus further comprises a setup module, before the synchronization module is configured to synchronize the updated schedule data to the relevant server of the target module, the setup module is configured to:
determining the corresponding relevant service types of each module respectively;
based on the relevant service type, an association with the relevant server is established for each module.
In an alternative embodiment, the apparatus further comprises a recording module, before the loading module is configured to acquire and load the original schedule data, the recording module is configured to: recording the address of the original schedule data;
the loading module is used for acquiring and loading the original schedule data, and is specifically used for: raw schedule data is obtained from the address and the obtained raw schedule data is loaded.
According to still another aspect of the embodiments of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory, the processor executing the computer program to implement the data processing method provided by the embodiments of the present application.
According to still another aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the data processing method provided by the embodiments of the present application.
According to a further aspect of the embodiments of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a data processing method provided by the embodiments of the present application.
According to the testing method, the testing device, the electronic equipment, the readable storage medium and the program product, the first administrator instruction for adjusting the schedule data aiming at the target module is used for updating the schedule data cached in the memory corresponding to the target module, and pushing the updated schedule data to the testing client, further, the application logic of the target module is triggered and executed based on the updated schedule data, and the testing client is controlled to display, namely, the cached schedule data is updated through the administrator instruction, the application logic to be tested is triggered quickly, so that the correctness of functions is verified, stable operation of on-line business is guaranteed, and the working efficiency of development and testing of time-driven system events is greatly improved.
The testing method, the testing device, the electronic equipment, the readable storage medium and the program product provided by the embodiment of the application adopt the cached time table data as an intermediate layer between the configuration data and the service logic, accept the configuration data and the service logic, decouple the strong dependence between the system time and the configuration data, isolate the system time from the online environment and have higher stability.
According to the testing method, the testing device, the electronic equipment, the readable storage medium and the program product, the cached time table data are updated through the administrator instruction, the application logic to be tested is triggered rapidly, and the flexibility is high.
According to the testing method, the testing device, the electronic equipment, the readable storage medium and the program product, the first administrator instruction for adjusting the schedule data is conducted on the target module, the updated schedule data is cached in the memory corresponding to the target module, the schedule data is separated according to different system modules, the modules are kept independent, the mutual influence is avoided, the testing of the target module is prevented from affecting other service modules, and convenience and safety are both considered.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
FIG. 1a is a schematic diagram of a test method according to prior art scheme 1;
FIG. 1b is a schematic diagram of a test method according to prior art scheme 2;
FIG. 2 is a schematic flow chart of a testing method according to an embodiment of the present application;
FIG. 3 is a flow chart of another testing method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a public land system play schedule structure according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a schedule with a predetermined structure according to an embodiment of the present application;
FIG. 6 is a UML diagram illustrating a schedule of a predetermined structure provided in accordance with an embodiment of the present application;
fig. 7 is a schematic diagram of a horse triggering preset time point according to an embodiment of the present application;
FIG. 8 is a flowchart of updating schedule data according to an embodiment of the present application;
fig. 9 is a schematic diagram of a testing method in a distributed server according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of a testing device according to an embodiment of the present application;
FIG. 11 is a schematic structural diagram of another testing device according to an embodiment of the present application;
Fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this specification, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, all of which may be included in the present specification. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates that at least one of the items defined by the term, e.g., "a and/or B" may be implemented as "a", or as "B", or as "a and B".
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
First, several terms related to the present application are described and explained:
(1) Time driving: the system time reaches a certain time point and is automatically triggered, and the system time is not triggered by the player sending a request protocol through the client.
(2) System events: the integrated event structure of a series of basic events is generally composed of a longer period of time, more complex goal achievement conditions, more extensive user engagement, etc.
(3) Time Travel (Time shuttle) test: during testing, the system time of the server program is changed by technical means so as to achieve the effect that the time in the program moves forwards or backwards.
(4) Administrator instructions: methods for modifying the value or flow of a server program by a special protocol are generally only effective in a test environment.
(5) Timing protocol: the system time of the server is synchronized to the client by adopting a timing protocol between the game server and the client of a C/S (server/client) architecture so as to achieve time synchronization.
In the prior art, the following two ways may be generally adopted to test the system event based on time driving in real time, and the implementation principles and some problems of the two existing schemes are respectively described below.
Existing scheme 1: the configuration data is changed and the server and client versions are reissued.
In the release environment, as shown in fig. 1a, a developer typically configures the driving time of a system event into a table file to obtain a configuration file. The server and the client respectively load configuration files into the program, and then compare the system time with the time configured by the configuration files to judge whether to trigger the corresponding application logic.
In the test environment, a developer quickly triggers related application logic by modifying the configuration file, for example, modifying the configured trigger Time time=t to a Time point time=t' which is reached more recently, and reissuing programs of the server and the client to load a new configuration file for testing.
This solution has the following drawbacks:
(1) The method involves more developers and has long process time period: in the development process of the game project, a first developer is required to be responsible for maintaining the configuration file, and a second developer and a tester of the game program want to adjust the configuration data and inform the first developer of time information to be modified. After the first developer modifies, the server version of the testing environment needs to be updated respectively, the client version is constructed, and then the testing is carried out by the tester, so that the whole process can waste development time for a plurality of hours, and development efficiency and engineering progress are seriously affected.
(2) The management cost is increased, and the safety degree is low: for software projects which are distributed and developed by using the same asset warehouse, after configuration data is modified into test data, the original distributed configuration data needs to be restored after the test, otherwise, the test data is distributed to an online environment, and serious operation accidents are caused. Such a procedure increases the management costs and increases the risk of project development.
Existing scheme 2: time Travel test method based on modified system Time.
As shown in fig. 1b, a developer typically configures the driving time Tcfg of the system event into a table file, resulting in a configuration file. The system time is modified by the instructions and the updated server system time is synchronized to the client by a timing protocol between the server and the client. The implementation scheme is that a static variable Tdelta representing the increment of the system time is added in a server program to record the correction of the current system time, and the system time Tgame in the game is obtained by adding the system time Tsystem of a computer and the increment time Tdelta, namely Tgame=Tsystem+Tdelta. The server and the client both adopt the new game time Tgame to compare with the time Tcfg configured by the configuration file, and judge whether to trigger the corresponding game logic.
This solution has the following drawbacks:
(1) The business impact is large: the system time is used as a key global parameter, and after modification, all services used for the system time by the server are directly affected, so that abnormal performance of part of the services can be caused. If a whole set of test environment is deployed for each service needing to modify the system time, great equipment waste is caused, and unnecessary development cost is brought.
(2) Cache failure: some of the services may cache some time data based on system time, such as timeout time, etc., and updating incremental time cannot change the cached system time, resulting in cache failure of these services, resulting in many plausible bug performances, and causing trouble to the development and test process.
(3) Rollback difficulty: because setting the delta time to a negative number can cause a number of timeout problems for the system, this approach generally does not support setting the system delta time forward, but can only recover the system time by scrolling through the update server. And the delta time variable is stored in the shared memory, a full amount of the rolling update server is needed to recover the system time.
The embodiment of the application provides a high-efficiency, convenient, safe and robust testing method, a device, electronic equipment, a readable storage medium and a program product, and aims to solve the technical problems in the prior art.
The technical solutions of the embodiments of the present application and technical effects produced by the technical solutions of the present application are described below by describing several exemplary embodiments. It should be noted that the following embodiments may be referred to, or combined with each other, and the description will not be repeated for the same terms, similar features, similar implementation steps, and the like in different embodiments.
The embodiment of the application provides a testing method, as shown in fig. 2, which comprises the following steps:
step S201: receiving a first administrator instruction to adjust schedule data for a target module;
in the embodiment of the application, the time table data are separated according to different service modules. The target modules are one or more modules for testing the system events to be rapidly triggered and driven by time in each service module. In practical applications, the target module may be specified by the administrator terminal, for example, carried in a first administrator instruction sent by the administrator terminal, or may be specified separately. The server receives the first administrator instruction and/or the designated instruction of the target module, and determines that the schedule data of the target module needs to be adjusted.
In the embodiment of the application, an administrator instruction interface for adjusting schedule data is provided, and is used for a developer/tester to send out a first administrator instruction through an administrator terminal according to the test requirement.
Step S202: updating the time table data cached in the memory corresponding to the target module based on the first administrator instruction;
in the embodiment of the application, the memory supporting dynamic update is provided to cache the schedule data as the transfer layer data between the configuration data and the application logic, and the strong dependence between the system time and the configuration data is decoupled.
Further, the different modules have independent time schedule data memories, and modification of the time schedule data of the target module does not affect the application logic of other modules.
That is, based on the first administrator instruction and the specified target module, the schedule data cached in the memory corresponding to the target module (corresponding to the target module) may be updated. The schedule data cached in the other modules is not altered.
In the embodiment of the application, the time table data cached in the memory corresponding to the target module is updated and used for rapidly triggering the corresponding application logic of the target module.
Step S203: pushing the updated schedule data to a test client;
The test client and the administrator terminal may be the same terminal or different terminals, and the embodiment of the present application is not limited herein.
In the embodiment of the application, the updated time table data is pushed to the test client, and the system time between the server and the test client is not required to be synchronized through a timing protocol, so that abnormal performance of part of business caused by affecting other modules using the system time is avoided.
Step S204: and triggering the application logic of the execution target module based on the updated schedule data, and controlling the test client to display.
In the embodiment of the application, the server and the client can quickly and automatically trigger the application logic defined by the execution target module based on the updated schedule data, and the server controls the test client to display, so as to verify the correctness of the function, the standard of the performance, the normality of the edge condition trigger and the like, but the application is not limited to the method.
According to the testing method, the testing device, the electronic equipment, the readable storage medium and the program product, the first administrator instruction for adjusting the schedule data aiming at the target module is used for updating the schedule data cached in the memory corresponding to the target module, and pushing the updated schedule data to the testing client, further, the application logic of the target module is triggered and executed based on the updated schedule data, and the testing client is controlled to display, namely, the cached schedule data is updated through the administrator instruction, the application logic to be tested is triggered quickly, so that the correctness of functions is verified, stable operation of on-line business is guaranteed, and the working efficiency of development and testing of time-driven system events is greatly improved.
In an embodiment of the present application, on the basis of fig. 2, as shown in fig. 3, the method further includes:
step S205: receiving a second administrator instruction to reset schedule data for the target module;
in the embodiment of the application, an administrator instruction interface for resetting the schedule data is provided, and is used for sending a second administrator instruction through an administrator terminal according to the requirement of recovering the schedule data after the development/testing personnel test the functions of the module.
Similarly, the second administrator command may carry information specifying the target module, or, when the schedule data is reset, the target module to be targeted may be specified by the administrator terminal alone.
Step S206: the original schedule data is obtained and loaded based on the second administrator instructions.
The original schedule data refers to schedule configuration data which is originally released, namely schedule data before the test process is updated, and is used for normally triggering application logic on line.
In the embodiment of the application, the updated time table data in the test process is cached in the memory corresponding to the target module, so that the original time table data is not influenced. The second administrator command can directly acquire and load the original schedule data and cover the updated schedule data in the test process, so that the schedule data can be restored to the originally issued configuration data, and the process is very safe and quick.
In the embodiment of the present application, an alternative implementation manner is provided for step S206, specifically, before step S206, for example, the address of the original schedule data may be recorded at the time of starting the server or other time nodes, and then in step S206, the original schedule data may be obtained from the address and the obtained original schedule data may be loaded.
Or in other embodiments, the original schedule data may be recorded directly, then in step S206 the original schedule data may be read from and loaded.
Further, after loading the original schedule data, the original schedule data is pushed to online clients, including but not limited to test clients. The online client can normally use the application without synchronizing the system time between the server and the client via a timing protocol.
Compared with the prior art, the testing method provided by the embodiment of the application has the following advantages:
(1) Labor and management cost are saved: the scheme is used for testing the time-driven system event, is very safe and quick, avoids the complicated process of repeatedly modifying the configuration file or changing the system time and the defects caused by the complicated process, greatly improves the testing efficiency of developers and greatly saves the labor cost.
(2) Stability is high: the cached time table data is used as an intermediate layer between the configuration data and the service logic, the configuration data and the service logic are accepted, the strong dependence between the system time and the configuration data is decoupled, the system time is isolated from an online environment, the stability is high, and bug (fault) performance caused by cache failure can be avoided.
(3) The flexibility is high: the cached time table data is updated through the administrator instruction, so that the application logic to be tested is triggered quickly, and the flexibility is high.
(4) Easy recovery: the original schedule data is reset through an administrator instruction, the updated schedule data in the test process is covered, and the originally issued configuration data can be quickly restored.
(5) And convenience and safety are considered: the first administrator instruction for adjusting the schedule data is performed for the target module, the updated schedule data is cached in the memory corresponding to the target module, the schedule data is separated according to different system modules, the modules are kept independent, the influence on other service modules caused by the test of the target module is avoided, and convenience and safety are considered.
The testing method provided by the embodiment of the application can be applied to testing various services which need time driving. As an example, it may be applied to various types of time-driven system play common to gaming services.
Where systematic play is understood as systematic events in gaming applications where there are some underlying game operations, such as logging in, combat, team, etc. combined into an integrated play structure, as such, generally have longer time periods and more complex goal achievement conditions, as well as a wider range of player engagement. Events in some systematic plays in games, such as combat matching, start of combat, prize delivery, etc., are time driven, i.e., reaching a certain point in time automatically triggers the start of execution.
For the Game application, the administrator instruction may specifically refer to a GM (Game Manager) instruction, but is not limited thereto.
Time-driven system play is widely used in multiplayer online games, such as full-suit holiday activities, time-limited tasks, full-suit public battles, and the like. By adopting the testing method provided by the embodiment of the application, the testing efficiency of the system playing method based on time driving in the game can be improved as well.
In the embodiment of the application, in order to improve the flexibility of the test method, a self-defined time table data structure is provided, namely, the time table data is stored in a time table of a preset structure.
In particular, through the analysis of the time configuration data by the inventors of the present application, it was found that the time configuration data can be refined into two basic time units: time span (ScheduleSpan) and time point (ScheduleEvent). Wherein the time span represents a time interval, which may be represented by recording a start time and an end time. The time point represents a specific trigger time of an event.
In an embodiment of the application, therefore, in the schedule of the predetermined structure,
each module is stored in association with at least one stage corresponding to the module;
each stage is stored in association with a corresponding time span;
each time span is stored in association with a trigger time of at least one event during the time span.
In particular, one or more time phases may be included in each module, each time phase may correspond to a different time logic unit, i.e. each time phase has a respective time span, which may be stored in association with its start time and end time. There may be one or more events in each time period (i.e., each time span) that are triggered individually.
Taking a popular meeting checking system playing method of a player in 'hand game L' as an example, the system playing method triggers a meeting of a full service meeting condition at zero point every week to automatically match opponents, formally opens meeting checking at nine am on monday, triggers a plurality of game events in the meeting checking process, finally ends the checking at nine am on sunday, gives rewards to members of a winning meeting, and triggers a new meeting opponent to automatically match at least the next zero point on monday. Then as shown in fig. 4:
The automatic matching of the opponents at the congress can be regarded as a time stage, the zero point of the monday is the starting time of the time span, and the nine am point of the monday is the ending time of the time span.
The convention may be considered as a time phase, with nine am on monday being the start time of its time span and nine pm on sunday being the end time of its time span. The period includes a trigger time point for a plurality of game events.
The prize delivery may be considered as a time period, with the evening nine points being the start time of its time span and the zero point being the end time of its time span.
In the embodiment of the application, another alternative implementation manner is provided for the self-defined time table data structure, and the time configuration data can be abstracted into two-level module time objects on the basis of the time table data structure. Wherein, the liquid crystal display device comprises a liquid crystal display device,
the primary index corresponds to a time period that identifies the time logical units of the homogeneous cycle.
The secondary index corresponds to a time period and is used to identify different time logic units contained in the same period.
I.e. in the practice of the application, at least one phase constitutes a cycle.
Then storing in association with each module and its corresponding at least one phase; each stage is stored in association with a corresponding time span; each time span is stored in association with a trigger time of at least one event during the time span, and in a schedule of a predetermined structure,
Each module is stored in association with at least one period corresponding to the module;
each period is stored in association with at least one phase corresponding to the period;
each period is stored in association with a corresponding time span.
Specifically, as shown in fig. 5, one or more time periods may be included in each module, each time period being executed in a loop. Each time period has a respective time span, and the time span of each time period may be stored in association with its start time and end time. Each time period includes at least one time phase, each time phase also has a respective time span, and the time span of each time phase can be stored in association with its start time and end time. There may be one or more events in each time span that are triggered individually. It will be appreciated that if a cycle includes only one phase, the time span corresponding to the cycle and the time span corresponding to the phase may be the same.
The method for playing the system of the meeting in the previous example is that the meeting is played by the system taking the week as the period unit, namely the time span of the period is one week, the starting time of the time span is one monday zero point, and the ending time of the time span is the next monday zero point. One period includes 3 time spans, which correspond to automatic match of opponents in a meeting, a process of checking a meeting, and prize release, and other details which are not described in detail in the above examples are omitted here.
In an embodiment of the present application, a possible UML (Unified Modelling Language, unified modeling language) diagram of a schedule of a predetermined structure is shown in fig. 6. Specifically, the application includes a Module table (Module), in which different service modules (modules) are distinguished by Module identifiers, for example, module id (Identity document, identity number) in the int format, but not limited thereto (the identifier may also refer to a name, a link, etc., and similar contents will not be repeated herein); and each business module is associated with a periodic table (schedule) corresponding to N1 system events stored (List). Different periods (cycles) are distinguished by a period identification, such as, but not limited to, a period id in an int format; each period is associated with a store (List) of its corresponding time span table (ScheduleSpan) and N2 span tables (ScheduleStage) each period contains. Different phases (stages) are distinguished by a phase identification, such as, but not limited to, the StageId in the int format; each phase is associated with a store (List) of its corresponding time span table (schedule). Each time span table (corresponding period or phase) contains a corresponding start time (StartTime) and end time (EndTime), which can be stored in uint32_t format. Each time span is associated with N3 event tables (ScheduleEvent) during which it is deposited (List). Different events (events) are distinguished by Event identification, such as, but not limited to, eventIdx (index) in int format; each event contains a corresponding trigger time (TriggerTime), or may be stored in uint32_t format.
In the embodiment of the application, a time trigger interface of application logic is provided, including but not limited to a callback function entering a time span, a callback function leaving the time span, and a callback function of a trigger event, which can be respectively expressed as:
int enter_schedule_span(int module_id,int cycle_id,int stage_id);
int leave_schedule_span(int module_id,int cycle_id,int stage_id);
int trigger_schedule_event(int module_id,int cycle_id,int stage_id,int event_idx);
the parameters int module_id, int cycle_id, int stage_id, int event_idx, etc. are information for distinguishing modules, periods, phases, events, respectively.
The schedule of the predetermined structure provided by the embodiment of the present application supports in-run updating, for example, updating the schedule data by the first administrator instruction of step S202.
Optionally, the first administrator instruction indicates the (target) period and/or phase to be tested. Step S202 may specifically include step S2021: based on a first administrator instruction, after the preset time points of each period and/or stage before the period and/or stage to be tested are sequentially changed to the current system time, the starting time corresponding to the time span of the period and/or stage to be tested is changed to the current system time.
For example, continuing with the above-described game-like application, the convention pair triggers corresponding system play in cycles and phases, and at various points in time, triggers specified play content. In the development test process, if all logic in each period and/or stage before the period and/or stage to be tested can be triggered in time and the period and/or stage to be tested is triggered in time, the period and/or stage to be tested can be tested quickly and efficiently.
In the embodiment of the application, in order to increase the usability of the schedule, a more simplified first administrator instruction for updating the schedule data is provided.
In an alternative embodiment, the process of step S2021 may be implemented by a Goto type instruction. For example, the goto_dest_cycle_and_stage, i.e. according to the current system time of the server and the period and/or stage parameters set by the first administrator instruction (i.e. the period and/or stage to be tested), the system automatically updates the pre-period, stage of the schedule, trigger time of the event, and continuously triggers the corresponding game logic, until the current system time enters the time span of the designated period and/or stage, so as to realize the rapid automatic triggering of the logic to be tested.
Wherein the predetermined point in time comprises at least one of:
(1) Start time corresponding to the time span;
in an alternative embodiment, the process may be implemented by a Next type instruction. For example, enter_next_span, i.e. based on the current system time of the server, the latest time span object is searched in the schedule, and its start time is updated to the current system time, i.e. the entry into the span event is immediately triggered, as shown in fig. 7.
(2) The trigger time of each event;
in an alternative embodiment, the process may be implemented by a Next type instruction. For example, the trigger_next_event is that according to the current system time of the server, searching the time span object to which the server belongs in the time table, searching the time span object for the time object to be triggered recently in the time span object, and changing the triggering time of the time object to the current system time, namely, immediately triggering the event, as shown in fig. 7.
(3) The time span corresponds to the end time.
In an alternative embodiment, the process may be implemented by a Next type instruction. For example, leave_curr_span, i.e. according to the current system time of the server, searches the time span object to which the server belongs in the time table, and updates its end time to the current system time, i.e. immediately triggers the leave span event, as shown in fig. 7.
The test method provided by the embodiment of the application can meet the requirement of development test by only providing the next type instruction and the goto type instruction which are two types of administrator instructions for updating the time table, has simple and easy-to-use instruction and is matched with a flexible and easy-to-use time table structure, so that the flexibility of the test is further improved.
In the embodiment of the application, the first administrator instruction can be further simplified. Optionally, the first administrator instructions indicate a stage to be tested. Step S202 may specifically include: based on a first administrator instruction, after the preset time points of each stage before the stage to be tested are sequentially changed to the current system time, the starting time corresponding to the time span of the stage to be tested is changed to the current system time. For example, the Goto instruction may be goto_dest_stage, that is, according to the current system time of the server and the stage parameter set by the first administrator instruction, the system automatically updates the pre-period, stage, and trigger time of the event of the schedule, and continuously triggers the corresponding game logic until the current system time enters the time span of the designated stage. Since the phases are more fine-grained time units, the required time span can be correctly specified.
In the embodiment of the present application, an alternative implementation manner is provided for step S2021, which specifically may include: the following processes are repeatedly executed until the next period and/or stage is determined to be the period and/or stage to be tested: if the next period and/or stage is determined not to be the period and/or stage to be tested, changing the starting time corresponding to the time span of the next period and/or stage into the current system time, and entering the current period and/or stage; sequentially changing the trigger time of each event in the current period and/or stage into the current system time; changing the ending time corresponding to the time span of the current period and/or stage into the current system time, and exiting the current period and/or stage.
As an example, as shown in fig. 8, after receiving the first administrator instruction, storing the period and/or stage set by the first administrator instruction, further starting to traverse the schedule data, determining whether the next (i.e. the next nearest) period and/or stage is the period and/or stage to be tested, if not, executing the enter_next_span, changing the start time corresponding to the time span of the next period and/or stage to the current system time, and entering the current period and/or stage; then traversing the events of the current period and/or stage, sequentially executing trigger_next_event, and sequentially changing the trigger time of each event in the current period and/or stage into the current system time; and executing the leave_curr_span, changing the ending time corresponding to the time span of the current period and/or stage into the current system time, and exiting the current period and/or stage. And repeatedly executing the process of the period and/or stage before the period and/or stage to be tested until the next period and/or stage is the period and/or stage to be tested, if the judgment result is yes, executing the enter_next_span, and changing the starting time corresponding to the time span of the next period and/or stage to the current system time, namely entering the period and/or stage to be tested.
According to the testing method provided by the embodiment of the application, the first administrator instruction is used for rapidly triggering the pre-logic of the period and/or stage to be tested, so that the period and/or stage to be tested can be rapidly entered, and the testing efficiency of the period and/or stage to be tested is effectively improved.
In the embodiment of the present application, before step S202, for example, when the server is started or other time nodes, the method may further include the steps of: acquiring time information related to each module; the time information of various data structures is initialized into a schedule of a predetermined structure, and schedule data is generated.
Optionally, after the server is started, the time information of each module (Id) of the application is registered. After the time information related to each module is successfully registered, a callback interface can be executed: the schedule initialization interface may be expressed as int init_module_schedule (void_cfg), where void_res_cfg represents time information of various data structures in the resource configuration file, and void_cfg represents a schedule of a predetermined structure. Furthermore, the time information of various data structures (module customization) can be uniformly initialized to the time table of the preset structure to generate time table data, and the description of the time table of the preset structure can be referred to above and will not be repeated here.
According to the testing method provided by the embodiment of the application, the time information of various data structures is uniformly loaded into the flexible and easy-to-use schedule with the preset structure, so that a data base is provided for improving the testing efficiency of the testing method.
In the embodiment of the present application, before step S202, for example, when the server is started or other time nodes, the method may further include the steps of: memory for caching time table data is allocated for each module; and based on the memories respectively corresponding to the modules, isolating and caching the schedule data corresponding to the modules.
Optionally, after the server is started, a corresponding time table memory is allocated to each module (Id) of the application, and in the embodiment of the application, different modules have independent time table memories, so that the time table data corresponding to each module can be isolated and cached, the modules are kept independent, one module is convenient to be independently modified, the modification of the time table of one module does not influence the business logic of other modules, and convenience and safety are both considered.
In the embodiment of the application, the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, a CDN (Content Delivery Network ), basic cloud computing services such as big data and an artificial intelligent platform.
Optionally, the test method provided by the embodiment of the application can be applied to the application deployed in the distributed server. Wherein different modules of the application may be deployed on the same or different servers, and each module may be deployed on one or more servers.
In the embodiment of the present application, before step S202, for example, when the server is started or other time nodes, the method may further include the steps of: and synchronizing the updated schedule data to the relevant server of the target module. I.e. the updated schedule data is automatically updated to the server process of the other management target module.
Similarly, after the original schedule data is loaded in step S206, the original schedule data is pushed to the relevant server of the target module, and the updated schedule data in the test procedure is overlaid.
In the embodiment of the present application, before synchronizing the updated schedule data to the relevant server of the target module, for example, when the server is started or other time nodes, the method may further include the steps of: determining the corresponding relevant service types of each module respectively; based on the relevant service type, an association with the relevant server is established for each module.
Optionally, after the server is started, determining for each module (Id) of the application a corresponding relevant service type; based on the determined relevant service type, a relevant server associated with each module service can be determined, and then an association between each module and the relevant server can be established.
In an embodiment of the present application, based on at least one of the foregoing embodiments, a schedule module registration interface is provided, which may be expressed as an int register_module_schedule (int module_id, list < string > associates_svrs, void_cfg); when the server is started, an independent schedule memory is allocated for the designated module id, the association between the module id and the related server is established, and the address of the original schedule data is recorded. The parameter module_id is a registration module id, the parameter list < string > association_svrs is an associated server for associated storage, and the parameter voltage_cfg is a resource configuration file.
According to the testing method provided by the embodiment of the application, the working efficiency of the system event driven by the development and testing time of the distributed server is greatly improved by synchronously updating the time table data cached on the distributed server.
In the embodiment of the present application, based on at least one embodiment described above, a complete test example is provided, as shown in fig. 9, in this example, a test is mainly performed on a module 1, where the module 1 is deployed on a service a and a service B, and the server a that receives an administrator instruction is determined according to the deployment situation. In practical applications, the number of servers B may be one or more, or there may be no servers B. Specifically, the main flow includes:
1. After the server is started, registering time information of each module, distributing independent time table memory for each module, establishing association between each module and a related server, recording addresses of original time table data, and associating callback functions for each module. For example, in this example, server a has associated with it server B for module 1.
2. After the time information is successfully registered, the server A and the server B both load the registered time information into a time table of a preset structure corresponding to each module, and initialize time table data.
3. After the player logs into the server, the player requests the schedule data of the required module to the client.
4. The time table data in the internal memory related to the module 1 is updated through a first administrator instruction sent to the server A, and the period and/or the stage to be tested are adjusted.
5. The updated schedule data is automatically updated to the process of the server B module 1 and pushed to the online client.
6. The server and the client automatically update the trigger time of the front period, the stage and the event of the schedule, and continuously trigger the corresponding game logic until the current system time enters the time span of the designated period and/or stage, so as to test the designated period and/or stage of the module 1 by the development and/or testing personnel.
7. After the function to be tested of the module 1 is tested, the schedule data is reset, namely the original schedule data is reloaded, the updated schedule data is covered, and the updated schedule data is synchronized to the server B and pushed to the client through a second administrator instruction sent to the server A.
The test method provided by the embodiment of the application provides a time table with a self-defined structure and abstract middle layer (buffer) time table data to replace configuration data, accepts the configuration data and business logic, and provides a method for updating the time table so as to realize rapid triggering of time driving logic and improve the test efficiency of time driving system events. The time table data are separated according to different modules, cannot affect each other, are isolated from an online environment, and have convenience and safety.
Specifically, the time information of the time-driven system time is converted into the original time table data, a method for updating and resetting the time table in operation is provided, and the automatic synchronization and the automatic pushing of the update of the time table data to the client side between server processes associated with the service are supported.
The scheme can be applied to the test of various time-driven application logics, such as various system playing methods common to game services. Taking the above public convention checking system playing method as an example, through a great amount of experimental verification by the inventor of the present application, the test method using the above existing scheme 2 completely covers the functional system and needs an independent test server environment, and the test manpower requirement is 12 days; the complete coverage function system of this scheme does not need independent test server environment, and the test manpower demand is 5 people days, has saved human cost and resource cost by a wide margin.
From the foregoing description, it can be appreciated that embodiments of the present application can be applied to a variety of scenarios, including but not limited to the fields of cloud technology (e.g., cloud computing, cloud gaming, etc.), artificial intelligence (e.g., after entering a period and/or stage to be tested, a test process can be performed using artificial intelligence, etc.), and so on.
Wherein cloud computing (cloud computing) refers to a delivery and usage mode of an IT infrastructure, which refers to obtaining required resources in an on-demand, easily-extensible manner through a network; generalized cloud computing refers to the delivery and usage patterns of services, meaning that the required services are obtained in an on-demand, easily scalable manner over a network. Such services may be IT, software, internet related, or other services. Cloud Computing is a product of fusion of traditional computer and network technology developments such as Grid Computing (Grid Computing), distributed Computing (distributed Computing), parallel Computing (Parallel Computing), utility Computing (Utility Computing), network storage (Network Storage Technologies), virtualization (Virtualization), load balancing (Load balancing), and the like.
With the development of the internet, real-time data flow and diversification of connected devices, and the promotion of demands of search services, social networks, mobile commerce, open collaboration and the like, cloud computing is rapidly developed. Unlike the previous parallel distributed computing, the generation of cloud computing will promote the revolutionary transformation of the whole internet mode and enterprise management mode in concept.
Cloud gaming (Cloud gaming), which may also be referred to as game on demand, is an online gaming technology based on Cloud computing technology. Cloud gaming technology enables lightweight devices (thin clients) with relatively limited graphics processing and data computing capabilities to run high quality games. In a cloud game scene, the game is not run in a player game terminal, but is run in a cloud server, the cloud server renders the game scene into a video and audio stream, and the video and audio stream is transmitted to the player game terminal through a network. The player game terminal does not need to have strong graphic operation and data processing capability, and only needs to have basic streaming media playing capability and the capability of acquiring player input instructions and sending the player input instructions to the cloud server.
Artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
Machine Learning (ML) is a multi-domain interdisciplinary, involving multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, confidence networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like.
With research and progress of artificial intelligence technology, research and application of artificial intelligence technology are being developed in various fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned, automatic driving, unmanned aerial vehicle, robot, intelligent customer service, internet of vehicles, automatic driving, intelligent transportation, etc., and it is believed that with the development of technology, artificial intelligence technology will be applied in more fields and become more and more important value.
An embodiment of the present application provides a testing apparatus, as shown in fig. 10, the apparatus 100 may include: a receiving module 1001, an updating module 1002, a pushing module 1003, and an executing module 1004, wherein,
the receiving module 1001 is configured to receive a first administrator instruction for adjusting schedule data for a target module;
the updating module 1002 is configured to update, based on the first administrator instruction, the schedule data cached in the memory corresponding to the target module;
the pushing module 1003 pushes the updated schedule data to the test client;
the execution module 1004 is configured to trigger, based on the updated schedule data, application logic of the execution target module, and control the test client to display.
In an alternative embodiment, the apparatus 100 may load a module 1005, as shown in fig. 11, on the basis of fig. 10, wherein,
the receiving module 1001 is further configured to receive a second administrator instruction for the target module to reset the schedule data;
the loading module 1005 is configured to obtain and load the original schedule data based on the second administrator instruction.
In an alternative embodiment, the schedule data is stored in a schedule of a predetermined structure;
wherein, in a schedule of a predetermined structure,
each module is stored in association with at least one stage corresponding to the module;
each stage is stored in association with a corresponding time span;
each time span is stored in association with a trigger time of at least one event during the time span.
In an alternative embodiment, at least one phase constitutes a cycle;
wherein, in a schedule of a predetermined structure,
each module is stored in association with at least one period corresponding to the module;
each period is stored in association with at least one phase corresponding to the period;
each period is stored in association with a corresponding time span.
In an alternative embodiment, the first administrator instructions indicate periods and/or phases to be tested;
The updating module 1002 is specifically configured to, when configured to update the schedule data cached in the memory corresponding to the target module based on the first administrator instruction:
based on a first administrator instruction, after the preset time points of each period and/or stage before the period and/or stage to be tested are sequentially changed into the current system time, changing the starting time corresponding to the time span of the period and/or stage to be tested into the current system time;
wherein the predetermined point in time comprises at least one of:
start time corresponding to the time span;
the trigger time of each event;
the time span corresponds to the end time.
In an alternative embodiment, the updating module 1002 is specifically configured to, when configured to sequentially change a predetermined time point of each cycle and/or phase before the cycle and/or phase to be tested to the current system time:
the following processes are repeatedly executed until the next period and/or stage is determined to be the period and/or stage to be tested:
if the next period and/or stage is determined not to be the period and/or stage to be tested, changing the starting time corresponding to the time span of the next period and/or stage into the current system time, and entering the current period and/or stage;
Sequentially changing the trigger time of each event in the current period and/or stage into the current system time;
changing the ending time corresponding to the time span of the current period and/or stage into the current system time, and exiting the current period and/or stage.
In an alternative embodiment, as shown in fig. 11, the apparatus 100 further includes a generating module 1006, where, before the updating module 1002 is configured to update the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, the generating module 1006 is configured to:
acquiring time information related to each module;
the time information of various data structures is initialized into a schedule of a predetermined structure, and schedule data is generated.
In an alternative embodiment, as shown in fig. 11, the apparatus further includes a buffering module 1007, where, before the updating module 1002 is configured to update the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, the buffering module 1007 is configured to:
memory for caching time table data is allocated for each module;
and based on the memories respectively corresponding to the modules, isolating and caching the schedule data corresponding to the modules.
In an alternative embodiment, as shown in fig. 11, the apparatus further includes a synchronization module 1008, where after the update module 1002 is configured to update the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, the synchronization module 1008 is configured to:
And synchronizing the updated schedule data to the relevant server of the target module.
In an alternative embodiment, as shown in fig. 11, the apparatus further includes a setup module 1009, where, before the synchronization module 1008 is configured to synchronize the updated schedule data to the relevant server of the target module, the setup module 1009 is configured to:
determining the corresponding relevant service types of each module respectively;
based on the relevant service type, an association with the relevant server is established for each module.
In an alternative embodiment, as shown in fig. 11, the apparatus further includes a recording module 1010, where before the loading module is configured to acquire and load the original schedule data, the recording module 1010 is configured to: recording the address of the original schedule data;
the loading module 1005, when used to acquire and load the original schedule data, is specifically configured to: raw schedule data is obtained from the address and the obtained raw schedule data is loaded.
The apparatus according to the embodiments of the present application may perform the method provided by the embodiments of the present application, and the implementation principle is similar, and actions performed by each module in the apparatus according to the embodiments of the present application correspond to steps in the method according to the embodiments of the present application, and detailed functional descriptions and beneficial effects of each module in the apparatus may be specifically referred to descriptions in the corresponding methods shown in the foregoing, which are not repeated herein.
An embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory, where the processor executes the computer program to implement the steps of the foregoing method embodiments. Alternatively, the electronic device may refer to a server, and the electronic device may refer to the above-mentioned terminals such as a client, an administrator terminal, a test terminal, and a player terminal, where the terminal (may also be referred to as a user terminal or a user device) may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart voice interaction device (e.g., a smart speaker), a wearable electronic device (e.g., a smart watch), a vehicle-mounted terminal, a smart home appliance (e.g., a smart television), an AR (Augmented Reality )/VR (Virtual Reality) device, and the like, but is not limited thereto. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
In an alternative embodiment, an electronic device is provided, as shown in fig. 12, the electronic device 1200 shown in fig. 12 includes: a processor 1201 and a memory 1203. The processor 1201 is coupled to the memory 1203, for example, via bus 1202. Optionally, the electronic device 1200 may further include a transceiver 1204, where the transceiver 1204 may be used for data interactions between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. It should be noted that, in practical applications, the transceiver 1204 is not limited to one, and the structure of the electronic device 1200 is not limited to the embodiment of the present application.
The processor 1201 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor 1201 may also be a combination of computing functions, e.g., including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
The bus 1202 may include a path to transfer information between the components. The bus 1202 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 1202 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 12, but not only one bus or one type of bus.
The Memory 1203 may be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory ), a CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer, without limitation.
The memory 1203 is used for storing a computer program for executing an embodiment of the present application, and is controlled to be executed by the processor 1201. The processor 1201 is configured to execute a computer program stored in the memory 1203 to implement the steps shown in the foregoing method embodiments.
Embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the foregoing method embodiments and corresponding content.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program can realize the steps and corresponding contents of the embodiment of the method when being executed by a processor.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate, such that the embodiments of the application described herein may be implemented in other sequences than those illustrated or otherwise described.
It should be understood that, although various operation steps are indicated by arrows in the flowcharts of the embodiments of the present application, the order in which these steps are implemented is not limited to the order indicated by the arrows. In some implementations of embodiments of the application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time, or each of these sub-steps or phases may be performed at different times, respectively. In the case of different execution time, the execution sequence of the sub-steps or stages can be flexibly configured according to the requirement, which is not limited by the embodiment of the present application.
The foregoing is only an optional implementation manner of some implementation scenarios of the present application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the present application are adopted without departing from the technical ideas of the scheme of the present application, which also belongs to the protection scope of the embodiments of the present application.

Claims (15)

1. A method of testing, comprising:
receiving a first administrator instruction to adjust schedule data for a target module;
updating the time table data cached in the memory corresponding to the target module based on the first administrator instruction;
pushing the updated schedule data to a test client;
triggering and executing the application logic of the target module based on the updated schedule data, and controlling the test client to display.
2. The test method of claim 1, further comprising:
receiving a second administrator instruction to reset schedule data for the target module;
and acquiring and loading original schedule data based on the second administrator instruction.
3. The test method of claim 1, wherein the schedule data is stored in a schedule of a predetermined structure; wherein, in the schedule of the predetermined structure,
Each module is stored in association with at least one stage corresponding to the module;
each stage is stored in association with a corresponding time span;
each time span is stored in association with a trigger time of at least one event during the time span.
4. The test method of claim 1, wherein at least one phase constitutes a cycle; wherein, in the schedule of the predetermined structure,
each module is stored in association with at least one period corresponding to the module;
each period is stored in association with at least one phase corresponding to the period;
each period is stored in association with a corresponding time span.
5. A test method according to claim 3 or 4, wherein the first administrator instruction indicates a period and/or phase to be tested;
based on the first administrator instruction, updating the schedule data cached in the memory corresponding to the target module includes:
based on the first administrator instruction, after the preset time points of each period and/or stage before the period and/or stage to be tested are sequentially changed into the current system time, changing the starting time corresponding to the time span of the period and/or stage to be tested into the current system time;
Wherein the predetermined point in time comprises at least one of:
start time corresponding to the time span;
the trigger time of each event;
the time span corresponds to the end time.
6. The method according to claim 5, wherein said sequentially changing the predetermined time point of each cycle and/or phase before the cycle and/or phase to be tested to the current system time comprises:
repeatedly executing the following processes until the next period and/or stage is determined to be the period and/or stage to be tested;
if the next period and/or stage is not the period and/or stage to be tested, changing the starting time corresponding to the time span of the next period and/or stage into the current system time, and entering the current period and/or stage;
sequentially changing the trigger time of each event in the current period and/or stage into the current system time;
changing the ending time corresponding to the time span of the current period and/or stage into the current system time, and exiting the current period and/or stage.
7. The method according to any one of claims 1-4, wherein before updating the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, further comprises:
Acquiring time information related to each module;
initializing the time information of various data structures into a schedule of a predetermined structure, and generating schedule data.
8. The test method according to claim 7, wherein before updating the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, further comprises:
memory for caching time table data is allocated for each module;
and based on the memories respectively corresponding to the modules, isolating and caching the schedule data corresponding to the modules.
9. The test method according to any one of claims 1-4, wherein after updating the schedule data cached in the memory corresponding to the target module based on the first administrator instruction, further comprising:
and synchronizing the updated schedule data to a relevant server of the target module.
10. The method of testing according to claim 9, wherein before synchronizing the updated schedule data to the associated server of the target module, further comprising:
determining the corresponding relevant service types of each module respectively;
based on the relevant service type, an association with a relevant server is established for each module.
11. The method of testing according to claim 2, comprising, prior to acquiring and loading the raw schedule data:
recording the address of the original schedule data;
the acquiring and loading the original schedule data comprises:
and acquiring the original schedule data from the address, and loading the acquired original schedule data.
12. A test device, comprising:
a receiving module for receiving a first administrator instruction to adjust schedule data for the target module;
the updating module is used for updating the time table data cached in the memory corresponding to the target module based on the first administrator instruction;
the pushing module is used for pushing the updated time table data to the test client;
and the execution module is used for triggering and executing the application logic of the target module based on the updated schedule data and controlling the test client to display.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to implement the method of any one of claims 1-11.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1-11.
15. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 1-11.
CN202211651939.5A 2022-12-21 2022-12-21 Test method, test device, electronic apparatus, readable storage medium, and program product Pending CN116974895A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211651939.5A CN116974895A (en) 2022-12-21 2022-12-21 Test method, test device, electronic apparatus, readable storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211651939.5A CN116974895A (en) 2022-12-21 2022-12-21 Test method, test device, electronic apparatus, readable storage medium, and program product

Publications (1)

Publication Number Publication Date
CN116974895A true CN116974895A (en) 2023-10-31

Family

ID=88482051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211651939.5A Pending CN116974895A (en) 2022-12-21 2022-12-21 Test method, test device, electronic apparatus, readable storage medium, and program product

Country Status (1)

Country Link
CN (1) CN116974895A (en)

Similar Documents

Publication Publication Date Title
CN111405304B (en) Anchor interaction method and device, computer equipment and storage medium
CN107153603B (en) Simulation test method, device and system for game
CN101604358B (en) Method, device and system for updating resources
CN106610854A (en) Model update method and device
CN110898428A (en) Multi-virtual object interaction method, device, server and storage medium
US11789846B2 (en) Method and system for using stacktrace signatures for bug triaging in a microservice architecture
CN110474820B (en) Flow playback method and device and electronic equipment
CN109936749A (en) Special efficacy implementation method, device and readable storage medium storing program for executing
CN110457200B (en) Test case generation method and equipment, storage medium and electronic equipment thereof
CN111290965B (en) Test method, test device, computer equipment and storage medium
US7739232B2 (en) Programming system for occasionally-connected mobile business applications
CN114191822A (en) Test method, test device, computer equipment, storage medium and product
US20180200629A1 (en) System and method for managing bonuses in a multi-player online game
CN113254424A (en) Data service migration method, device and equipment
CN116974895A (en) Test method, test device, electronic apparatus, readable storage medium, and program product
US20230251871A1 (en) Techniques for migrating services from a virtual bootstrap environment
US10565160B1 (en) Managing state changes of modeled objects in a three dimensional virtual environment
CN112138372B (en) Data synchronization method in distributed system and related equipment
CN117009626A (en) Service processing method, device, equipment and storage medium of game scene
CN116521509A (en) Intelligent contract testing method, device, equipment, storage medium and product
CN113505179A (en) Access path synchronization method and device
JP2018526717A (en) Content test during image production
JP6412667B1 (en) Server, method, and program for providing game
CN111346372A (en) Game login loading method and device based on data backup and server
CN113326059A (en) Resource updating method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication