Multi-time-zone time data conversion automatic test method and device, terminal and medium

Through the automated test method, the preset time zone time conversion logic is used to switch and capture the time and time zone, and the conversion time difference is calculated in combination with the back-end time zone time, the problem of low testing efficiency of traditional multi-time zone time conversion is solved, and automated verification and improvement of testing efficiency is achieved.

CN119829462APending Publication Date: 2025-04-15创优数字科技(广东)有限公司

Patent Information

Application Number
CN202510069686.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

Traditional multi-time zone time conversion testing requires manual verification of multiple conversion testing scenarios, which is inefficient in testing.

Method used

It provides an automated testing method for multi-time zone time data conversion. Through the preset time zone time conversion logic, it switches the time zone displayed on the front-end node page, and captures the front-end time zone time, calculates the conversion time difference in the back-end time zone time, and automatically determines the test results.

Benefits of technology

It realizes the consistency and correctness of the time field in the front-end display and back-end storage, which significantly improves the testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829462A_ABST
    Figure CN119829462A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic test method and device for multi-time-zone time data conversion, a terminal and a medium. According to the scheme provided by the invention, in response to a multi-time-zone conversion test instruction, time zones displayed by a page of a front-end node are switched through preset time zone time conversion logic; the method comprises the following steps: acquiring a front-end time zone time displayed on a page of a front-end node, acquiring a back-end time zone time corresponding to a preset reference time zone from a back-end service node according to a preset back-end service node, calculating a conversion time difference between the back-end time zone time and the front-end time zone time, and obtaining a standard time difference according to a comparison result of the conversion time difference and the standard time difference. And determining a test result, thereby realizing automatic identification and verification of consistency and correctness of the time field in front-end display and back-end storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, terminal and medium for automated testing of multi-time zone time data conversion. Background Art

[0002] At present, in global business scenarios, it is particularly important to support time data processing in multiple time zones. Therefore, the quality of time data conversion processing for multiple time zones is of great significance to the stability of the business. However, traditional multi-time zone time conversion testing requires manual verification of multiple conversion test scenarios, which has the technical problem of low testing efficiency. Summary of the invention

[0003] The present application provides a method, device, terminal and medium for automated testing of time data conversion in multiple time zones, which are used to solve the technical problem that the existing multi-time zone time conversion test requires manual verification of multiple conversion test scenarios and has low testing efficiency.

[0004] In order to solve the above technical problems, the first aspect of the present application provides an automated testing method for multi-time zone time data conversion, comprising:

[0005] In response to the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched through the preset time zone time conversion logic, and the front-end time zone time displayed on the page of the front-end node is captured;

[0006] According to a preset backend service node, obtaining a backend time zone time corresponding to a preset reference time zone from the backend service node;

[0007] The conversion time difference between the backend time zone time and the frontend time zone time is calculated according to the backend time zone time and the frontend time zone time, and the test result is determined according to the comparison result of the conversion time difference and the standard time difference.

[0008] Preferably, it also includes:

[0009] In response to the time zone time conversion logic verification instruction, capturing the first time zone time displayed on the page of the front-end node;

[0010] Calling the time zone conversion logic to switch the time zone displayed on the page of the front-end node, and capturing the second time zone displayed on the page of the front-end node again;

[0011] The conversion time difference between the first time zone and the second time zone is calculated, and the verification result of the time zone conversion logic is determined according to the comparison result of the conversion time difference and the standard time difference.

[0012] Preferably, the switching of the time zone displayed on the page of the front-end node through the preset time zone conversion logic and capturing the front-end time zone displayed on the page of the front-end node specifically includes:

[0013] According to the conversion mode information contained in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched, and the front-end time zone time displayed on the page of the front-end node is captured, wherein the conversion mode information is used to indicate the configuration of the front-end page initialization.

[0014] Preferably, when the conversion mode information is a default conversion mode, switching the time zone displayed on the page of the front-end node according to the conversion mode information included in the multi-time zone conversion test instruction includes:

[0015] Switch the time zone displayed on the front-end node page according to the local time zone of the front-end.

[0016] Preferably, when the conversion mode information is a specified conversion mode, according to the conversion mode information included in the multi-time zone conversion test instruction, switching the time zone displayed on the page of the front-end node includes:

[0017] According to the designated time zone included in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched.

[0018] At the same time, the second aspect of the present application provides a multi-time zone time data conversion automatic testing device, including:

[0019] A test response unit, for responding to a multi-time zone conversion test instruction, switching the time zone displayed on the page of the front-end node through a preset time zone time conversion logic, and capturing the front-end time zone time displayed on the page of the front-end node;

[0020] A backend time zone time acquisition unit, configured to acquire the backend time zone time corresponding to a preset reference time zone from a preset backend service node according to the preset backend service node;

[0021] The time comparison test unit is used to calculate the conversion time difference between the backend time zone time and the frontend time zone time according to the backend time zone time and the frontend time zone time, and determine the test result according to the comparison result of the conversion time difference and the standard time difference.

[0022] Preferably, it also includes: a conversion logic verification unit, which is used to:

[0023] In response to the time zone time conversion logic verification instruction, capturing the first time zone time displayed on the page of the front-end node;

[0024] Calling the time zone conversion logic to switch the time zone displayed on the page of the front-end node, and capturing the second time zone displayed on the page of the front-end node again;

[0025] The conversion time difference between the first time zone and the second time zone is calculated, and the verification result of the time zone conversion logic is determined according to the comparison result of the conversion time difference and the standard time difference.

[0026] Preferably, the test response unit switches the time zone displayed on the page of the front-end node by using a preset time zone time conversion logic, specifically including:

[0027] According to the conversion mode information contained in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched, and the front-end time zone time displayed on the page of the front-end node is captured, wherein the conversion mode information is used to indicate the configuration of the front-end page initialization.

[0028] A third aspect of the present application provides a multi-time zone time data conversion automated test terminal, comprising: a memory and a processor;

[0029] The memory is used to store program code, and the program code is used to implement an automatic testing method for multi-time zone time data conversion as provided in the first aspect of the present application;

[0030] The processor is used for reading and executing the program code.

[0031] The fourth aspect of the present application provides a computer-readable storage medium, in which program code is stored. The program code is used to be read and executed by a processor to implement an automated testing method for multi-time zone time data conversion as provided in the first aspect of the present application.

[0032] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0033] The solution provided by the present application responds to a multi-time zone conversion test instruction, switches the time zone displayed on the page of the front-end node through a preset time zone conversion logic, and captures the front-end time zone time displayed on the page of the front-end node, and then, according to the preset back-end service node, obtains the back-end time zone time corresponding to the preset reference time zone from the back-end service node, and then calculates the conversion time difference between the back-end time zone time and the front-end time zone time, and determines the test result based on the comparison result of the conversion time difference and the standard time difference, thereby realizing automatic identification and verification of the consistency and correctness of the time field in the front-end display and back-end storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0035] Figure 1 A flowchart of an embodiment of an automated testing method for multi-time zone time data conversion provided by the present application.

[0036] Figure 2 A schematic diagram of the flow of time zone time conversion logic verification in an embodiment of an automated testing method for multi-time zone time data conversion provided by the present application.

[0037] Figure 3 A schematic diagram of the structure of an embodiment of an automated testing device for multi-time zone time data conversion provided by the present application.

[0038] Figure 4 A schematic diagram of the structure of an embodiment of a multi-time zone time data conversion automatic test terminal provided by the present application. DETAILED DESCRIPTION

[0039] Regarding the time data processing for multiple time zones in global business scenarios, as shown in the following example, suppose there is a global clothing brand with a design center in France (East Zone 1), production factories in India (East Zone 5) and Vietnam (East Zone 7), and products are distributed to warehouses and sales points around the world, including logistics centers in the United States (West Zone 5) and Brazil (West Zone 3). In the process of logistics distribution, it is necessary to consider the working hours of warehouses in different regions to arrange the transportation and receipt of goods. For example, when shipping from a Vietnamese factory to a US warehouse, the logistics company must consider the local shipping time in Vietnam and the receiving time of the US warehouse. Assuming that the goods are shipped at 10 am local time in Vietnam, the transportation time is 15 days. If the time zone is not considered, the simple calculation time to arrive in the United States is 11 pm (10 + 15 - 24) 15 days later. However, considering the time zone difference (Vietnam and the United States differ by 12 time zones), the actual local time to arrive at the US warehouse should be 11 am. This allows the US warehouse to arrange personnel and equipment for receiving and warehousing in advance, optimize transportation scheduling, reduce the waiting time of goods outside the warehouse, and improve the logistics efficiency of the entire supply chain.

[0040] Since the system uses different time zones for different countries, traditional testing methods require manual verification of multiple scenarios. This requires manual switching of machine time zones to verify different scenarios, and multiple traversals and statistics of business group time zone pages and stored data corresponding to multiple different countries, resulting in low testing efficiency.

[0041] In view of this, an embodiment of the present application provides a method, device, terminal and medium for automated testing of multi-time zone time data conversion, which is used to solve the technical problem that the existing multi-time zone time conversion test requires manual verification of multiple conversion test scenarios and has low testing efficiency.

[0042] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] First, a detailed description of an embodiment of an automated testing method for multi-time zone time data conversion provided by the present application is as follows:

[0044] See also Figure 1 , the present application provides an embodiment of a multi-time zone time data conversion automated testing method, comprising:

[0045] Step 101, in response to a multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched through a preset time zone time conversion logic, and the front-end time zone time displayed on the page of the front-end node is captured;

[0046] Step 102: According to the preset backend service node, obtain the backend time zone time corresponding to the preset reference time zone from the backend service node;

[0047] Step 103: Calculate the conversion time difference between the back-end time zone and the front-end time zone according to the back-end time zone and the front-end time zone, and determine the test result according to the comparison result of the conversion time difference and the standard time difference.

[0048] It should be noted that when a multi-time zone data conversion test is required, the test process is triggered by inputting the relevant multi-time zone conversion test instructions. When the system receives the instructions, it will respond to the multi-time zone conversion test instructions and start executing the test steps, specifically including: switching the time zone displayed on the page of the front-end node through a preset time zone conversion logic script, and capturing the front-end time zone time displayed on the page of the front-end node, and then, according to the preset back-end service node, obtaining the back-end time zone time corresponding to the preset base time zone from the back-end service node, so as to judge whether the time difference between the two times meets the standard time difference based on the back-end time zone time and the front-end time zone time, so as to verify whether the front-end display and back-end storage of the cross-time zone system are consistent and whether the cross-time zone time conversion is correct.

[0049] Among them, the above-mentioned preset reference time zone can generally be selected according to the commonly used time zone of the target enterprise. For example, for an enterprise headquartered in China, the preset reference time zone preferably adopts the Eastern Time Zone corresponding to Beijing Time, but other time zones or universal standard time zones such as Coordinated Universal Time (UTC) can also be used.

[0050] Furthermore, if Figure 2 As shown, the method provided in this embodiment may further include the following steps, which are preferably performed before step 101:

[0051] Step 1001: In response to a time zone time conversion logic verification instruction, capture the first time zone time displayed on the page of the front-end node;

[0052] Step 1002: Call the time zone conversion logic to switch the time zone displayed on the page of the front-end node, and capture the second time zone displayed on the page of the front-end node again;

[0053] Step 1003: Calculate the conversion time difference between the first time zone and the second time zone, and determine the verification result of the time zone time conversion logic according to the comparison result of the conversion time difference and the standard time difference.

[0054] It should be noted that the local time zone of the front-end node is first set to the first time zone, such as the Eastern Time Zone, through the script logic, and the conversion time displayed on the front-end page in the time zone is captured, and then the time zone is switched to any other time zone, and the page time is recaptured. Finally, the difference between the two times is compared with the theoretical time difference between the two time zones to verify whether the multi-time zone data conversion is correct. It can be understood that the time zone time conversion logic mentioned in this embodiment can use the existing conversion logic such as the tzutil.exe command line tool in the Windows system. In the automation script, the switching of different time zones can be realized by executing system commands, or a custom conversion logic can be used. Furthermore, if a custom conversion logic is used, the steps 1001 to 1003 provided in this embodiment can be further added to determine the correctness of the time zone time conversion logic.

[0055] Furthermore, the step 101 of this embodiment mentioned in the preset time zone time conversion logic, switching the time zone displayed on the page of the front-end node, and capturing the front-end time zone time displayed on the page of the front-end node specifically includes:

[0056] According to the conversion mode information contained in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched, and the front-end time zone time displayed on the page of the front-end node is captured, wherein the conversion mode information is used to indicate the configuration of the front-end page initialization.

[0057] More specifically, when the conversion mode information is the default conversion mode, according to the conversion mode information included in the multi-time zone conversion test instruction, switching the time zone displayed on the page of the front-end node includes:

[0058] Switch the time zone displayed on the front-end node page according to the local time zone of the front-end.

[0059] More specifically, when the conversion mode information is a specified conversion mode, according to the conversion mode information included in the multi-time zone conversion test instruction, switching the time zone displayed on the page of the front-end node includes:

[0060] According to the specified time zone contained in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched.

[0061] Through the method provided in this embodiment, through automated script time zone simulation, automated capture and dynamic verification, the actual storage value is extracted through the back-end API and compared with the expected value after rule conversion, so as to quickly verify the time zone logic of different scenarios, significantly reduce manual testing time, and automatically compare the results with the expected value to quickly identify deviations.

[0062] The above is a detailed description of an embodiment of an automated testing method for multi-time zone time data conversion provided by the present application. The following is a detailed description of an embodiment of an automated testing device for multi-time zone time data conversion provided by the present application.

[0063] See also Figure 3 The present application provides a multi-time zone time data conversion automatic test device, comprising:

[0064] The test response unit 201 is used to respond to the multi-time zone conversion test instruction, switch the time zone displayed on the page of the front-end node through the preset time zone time conversion logic, and capture the front-end time zone time displayed on the page of the front-end node;

[0065] The backend time zone time acquisition unit 202 is used to acquire the backend time zone time corresponding to the preset reference time zone from the backend service node according to the preset backend service node;

[0066] The time comparison test unit 203 is used to calculate the conversion time difference between the backend time zone time and the frontend time zone time according to the backend time zone time and the frontend time zone time, and determine the test result according to the comparison result of the conversion time difference and the standard time difference.

[0067] Furthermore, it also includes: a conversion logic check unit 200, which is used to:

[0068] In response to the time zone time conversion logic verification instruction, capturing the first time zone time displayed on the page of the front-end node;

[0069] Call the time zone conversion logic to switch the time zone displayed on the page of the front-end node, and capture the second time zone displayed on the page of the front-end node again;

[0070] The conversion time difference between the first time zone and the second time zone is calculated, and the verification result of the time zone time conversion logic is determined according to the comparison result of the conversion time difference and the standard time difference.

[0071] Furthermore, the test response unit 201 switches the time zone displayed on the page of the front-end node through the preset time zone time conversion logic, specifically including:

[0072] According to the conversion mode information contained in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched, and the front-end time zone time displayed on the page of the front-end node is captured, wherein the conversion mode information is used to indicate the configuration of the front-end page initialization.

[0073] Further, when the conversion mode information is the default conversion mode, according to the conversion mode information included in the multi-time zone conversion test instruction, switching the time zone displayed on the page of the front-end node includes:

[0074] Switch the time zone displayed on the front-end node page according to the local time zone of the front-end.

[0075] Further, when the conversion mode information is a specified conversion mode, according to the conversion mode information included in the multi-time zone conversion test instruction, switching the time zone displayed on the page of the front-end node includes:

[0076] According to the specified time zone contained in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched.

[0077] like Figure 4 As shown, the present application provides a multi-time zone time data conversion automatic test terminal, wherein the implementation types of the terminal include: personal computers, industrial computers, servers and embedded intelligent devices, etc., and the main components of the terminal include: a memory 33 and a processor 31, and the memory 33 and the processor 31 can be connected via a communication bus 34;

[0078] The memory 33 is used to store program codes, and the program codes are used to implement a multi-time zone time data conversion automatic testing method as provided in the first aspect of the present application;

[0079] The processor 31 is used to read and execute program codes.

[0080] At the same time, the present application also provides an embodiment of a computer-readable storage medium, in which program code is stored, and the program code is used to be read and executed by a processor to implement an automated testing method for multi-time zone time data conversion as provided in the first aspect of the present application.

[0081] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the terminals, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0082] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0083] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0084] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0085] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0086] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0087] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0088] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the terminals, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0089] In the several embodiments provided in the present application, it should be understood that the disclosed terminals, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0090] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0091] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0092] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0093] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0094] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0095] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for automated testing of time data conversion in multiple time zones, characterized in that: include: In response to the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched through the preset time zone time conversion logic, and the front-end time zone time displayed on the page of the front-end node is captured; According to a preset backend service node, obtaining a backend time zone time corresponding to a preset reference time zone from the backend service node; The conversion time difference between the backend time zone time and the frontend time zone time is calculated according to the backend time zone time and the frontend time zone time, and the test result is determined according to the comparison result of the conversion time difference and the standard time difference.

2. The method for automated testing of multi-time zone time data conversion according to claim 1, characterized in that: Also includes: In response to the time zone time conversion logic verification instruction, capturing the first time zone time displayed on the page of the front-end node; Calling the time zone conversion logic to switch the time zone displayed on the page of the front-end node, and capturing the second time zone displayed on the page of the front-end node again; The conversion time difference between the first time zone and the second time zone is calculated, and the verification result of the time zone conversion logic is determined according to the comparison result of the conversion time difference and the standard time difference.

3. The method for automated testing of multi-time zone time data conversion according to claim 1, characterized in that: The switching of the time zone displayed on the page of the front-end node through the preset time zone conversion logic and capturing the front-end time zone displayed on the page of the front-end node specifically includes: According to the conversion mode information contained in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched, and the front-end time zone time displayed on the page of the front-end node is captured, wherein the conversion mode information is used to indicate the configuration of the front-end page initialization.

4. The method for automated testing of multi-time zone time data conversion according to claim 3, characterized in that: When the conversion mode information is the default conversion mode, switching the time zone displayed on the page of the front-end node according to the conversion mode information included in the multi-time zone conversion test instruction includes: Switch the time zone displayed on the front-end node page according to the local time zone of the front-end.

5. The method for automated testing of multi-time zone time data conversion according to claim 3, characterized in that: When the conversion mode information is a specified conversion mode, switching the time zone displayed on the page of the front-end node according to the conversion mode information contained in the multi-time zone conversion test instruction includes: According to the designated time zone included in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched.

6. A multi-time zone time data conversion automatic test device, characterized in that: include: A test response unit, for responding to a multi-time zone conversion test instruction, switching the time zone displayed on the page of the front-end node through a preset time zone time conversion logic, and capturing the front-end time zone time displayed on the page of the front-end node; A backend time zone time acquisition unit, configured to acquire the backend time zone time corresponding to a preset reference time zone from a preset backend service node according to the preset backend service node; The time comparison test unit is used to calculate the conversion time difference between the backend time zone time and the frontend time zone time according to the backend time zone time and the frontend time zone time, and determine the test result according to the comparison result of the conversion time difference and the standard time difference.

7. The multi-time zone time data conversion automatic test device according to claim 6, characterized in that: Also includes: Conversion logic check unit, used to: In response to the time zone time conversion logic verification instruction, capturing the first time zone time displayed on the page of the front-end node; Calling the time zone conversion logic to switch the time zone displayed on the page of the front-end node, and capturing the second time zone displayed on the page of the front-end node again; The conversion time difference between the first time zone and the second time zone is calculated, and the verification result of the time zone conversion logic is determined according to the comparison result of the conversion time difference and the standard time difference.

8. The multi-time zone time data conversion automatic test device according to claim 6, characterized in that: The test response unit switches the time zone displayed on the page of the front-end node by using the preset time zone time conversion logic, specifically including: According to the conversion mode information contained in the multi-time zone conversion test instruction, the time zone displayed on the page of the front-end node is switched, and the front-end time zone time displayed on the page of the front-end node is captured, wherein the conversion mode information is used to indicate the configuration of the front-end page initialization.

9. A multi-time zone time data conversion automatic test terminal, characterized in that: include: Memory and processor; The memory is used to store program codes, and the program codes are used to implement the multi-time zone time data conversion automatic testing method according to any one of claims 1 to 5; The processor is used for reading and executing the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, and the program code is used to be read and executed by a processor to implement an automated testing method for multi-time zone time data conversion as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Activity display time verification method and device, equipment and storage medium

    CN114417218A

  • Vehicle-mounted display time verification method and device based on GPS information and related equipment

    CN115542714A

Cited By

  • Time zone lossless switching and real-time verification method and application thereof

    CN122045071A

  • Lossless Time Zone Switching and Real-Time Verification Methods and Their Applications

    CN122045071B