Digital lottery APP number selection specification automatic verification system, method, device and medium
By utilizing Appium's automation technology and modular design, the automatic verification of the number selection specifications for digital lottery apps has been achieved. This solves the problems of low testing efficiency, delayed feedback, and poor adaptability in existing technologies, thereby improving testing efficiency and user experience while reducing maintenance costs.
Patent Information
- Application Number
- CN202511613332.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-02-03
AI Technical Summary
Existing technologies for digital lottery apps suffer from low testing efficiency, delayed feedback, and poor adaptability in simulating number selection specifications. They cannot achieve automatic, real-time, and comprehensive verification of number selection specifications on the app side, resulting in a degraded user experience and high maintenance costs.
Using Appium automation technology, through general function encapsulation modules, PO model page design modules, test data management modules, test case execution modules, and log management modules, the system realizes automatic verification of the number selection specifications of the digital lottery APP. This includes functions such as click_position, get_element, element positioning definition, operation function encapsulation, and logging, providing batch testing and real-time feedback for all color types and gameplay.
It significantly improved testing efficiency, reduced labor costs, ensured compliance of number selection operations, enhanced user experience, reduced maintenance costs, and enabled full-track retention and data traceability of the testing process through Allure's visual reports.
Smart Images

Figure CN121455820A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lottery management technology, and in particular to an automatic verification system, method, equipment, and medium for the selection criteria of digital lottery apps. Background Technology
[0002] In the development and operation of digital lottery apps, the simulated number selection function is a core module for improving user stickiness, and the compliance of its number selection standards directly affects the user experience. Various digital lotteries (such as Double Color Ball, Super Lotto, and Welfare Lottery 3D) have unique and complex number selection rule systems, covering multiple dimensions of constraints such as the range of number values (e.g., 1-33 red balls and 1-16 blue balls in Double Color Ball), the number of numbers to be selected (e.g., at least 5 numbers to be selected in the front area and at least 2 numbers to be selected in the back area in Super Lotto), and special combination rules (e.g., the ratio of the number of fixed and variable numbers in the combination selection). If users perform number selection operations that do not comply with the standards in the app, it will directly lead to the failure of simulated betting, causing user confusion and a degraded experience. Therefore, it is necessary to ensure the strict verification of the number selection standards through testing methods.
[0003] In existing technologies, the verification of the simulated number selection specifications of digital lottery APP mainly relies on two types of solutions: one is manual testing, in which testers simulate number selection operations one by one in the APP interface and check whether the number selection results are compliant according to the preset rules; the other is server-side interface testing, in which after the user submits the number selection data, the number selection data is verified by the preset rule logic of the server and the verification result is returned.
[0004] However, the aforementioned existing technologies have significant drawbacks: First, manual testing is extremely inefficient, requiring substantial manpower and time to complete full-scenario coverage testing. Furthermore, when faced with massive combinations of selected numbers (such as multiple number arrangements in a combination selection), it is prone to missed detections and misjudgments, failing to meet the testing needs of rapid iterations in digital lottery apps (such as updates to gameplay rules and interface optimizations). Second, server-side interface testing can only perform post-event verification after the selection data is submitted, unable to provide real-time feedback during the user's selection process. This forces users to complete the entire selection process before they know if the compliance is correct, creating a long-term "trial and error-correction" closed loop that severely impacts the user experience. In addition, both solutions lack adaptability to rule changes. When lottery rules are adjusted, manual testing requires a complete overhaul of the test scenarios, and interface testing requires modifications to the server-side verification logic, both resulting in high maintenance costs and slow response times.
[0005] Therefore, there is an urgent need for a method that can automatically, in real time, comprehensively and flexibly verify the number selection criteria on the APP, in order to solve the core problems of low efficiency, delayed feedback and poor adaptability in the existing technology. Summary of the Invention
[0006] The purpose of this invention is to provide an automatic verification system, method, device, and medium for the selection criteria of digital lottery apps, thereby solving all or one of the aforementioned problems in the prior art.
[0007] To solve the above-mentioned technical problems, the specific technical solution of the present invention is as follows:
[0008] On one hand, the present invention provides an automatic verification system for the selection criteria of a digital lottery app, comprising:
[0009] A general-purpose function encapsulation module, used to encapsulate Appium's basic operation functions;
[0010] The PO model page design module is used to create corresponding page object classes for the simulated number selection page of each lottery type;
[0011] The test data management module is used to store test case data for different gameplay modes of various lottery games using a Python dictionary structure;
[0012] The test case execution module is used to create the TestMnxh test execution class, and based on the TestMnxh test execution class, call the page object function created by the PO model page design module to simulate and verify the number selection process;
[0013] The log management module is used to record logs, screenshot anomalies, and generate reports during the simulation and verification of the number selection process.
[0014] As an improved solution, the Appium basic operation functions include: click_position function, get_element function, and get_elements function.
[0015] As an improved solution, the PO model page design module includes: an element positioning definition submodule;
[0016] The element location definition submodule is used to: define key page elements using AppiumBy.ID, AppiumBy.ANDROID_UIAUTOMATOR, and AppiumBy.XPATH.
[0017] The key elements of the page include: a simulated number selection guide button, a combination tab, and pop-up text.
[0018] As an improved solution, the PO model page design module further includes: an operation function encapsulation submodule;
[0019] The operation function encapsulation submodule is used to: call the encapsulation function of the common module to define the corresponding operation function for element positioning; the operation function includes: click_red_ball function and click_mnxh_pt_tab_loc function.
[0020] As an improved approach, the Python dictionary structure includes: title, num, and expected;
[0021] The title is used to identify the use case scenario;
[0022] The num parameter is used to adapt to different formats based on the gameplay type.
[0023] The "expected" refers to the expected verification result of the number selection specification.
[0024] As an improved solution, the test case execution module is further used to: sequentially execute environment initialization, boot shutdown and gameplay switching, number selection operation and result verification operation based on the TestMnxh test execution class;
[0025] The number selection operation includes: parsing the num of the test case, and calling the click_red_ball and click_blue_ball functions to select a number based on the parsing result.
[0026] As an improved solution, the log management module is further configured to: record the timestamp, operation description, and status of each step of the number selection process simulation and verification in real time using a log tool; when an operation fails or an assertion exception occurs during the number selection process simulation and verification, call the error_save_screenshot function to take a screenshot of the interface; and after the test execution is completed, generate an HTML report containing a test case execution list, duration statistics, parameter details, log traces, and visualization charts.
[0027] On the other hand, the present invention also provides an automatic verification method for the selection criteria of a digital lottery APP, comprising the following steps:
[0028] The basic operation functions of Appium are encapsulated by calling the general function encapsulation module;
[0029] Call the PO model page design module to create a corresponding page object class for the simulated number selection page of each lottery type;
[0030] The test data management module uses a Python dictionary structure to store test case data for different gameplay modes of each lottery type;
[0031] The test case execution module is invoked to create the TestMnxh test execution class. Based on the TestMnxh test execution class, the page object function created by the PO model page design module is invoked to simulate and verify the number selection process.
[0032] The log management module is invoked to record logs, screenshot anomalies, and generate reports during the simulation and verification of the number selection process.
[0033] On the other hand, the present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the automatic verification method for the selection specifications of the digital lottery app.
[0034] On the other hand, the present invention also provides a computer device, the computer device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein:
[0035] The memory is used to store computer programs;
[0036] The processor is used to execute the steps of the automatic verification method for the selection specifications of the digital lottery app by running the program stored in the memory.
[0037] The beneficial effects of the technical solution of this invention are:
[0038] 1. This invention utilizes Appium automation technology to simulate user number selection, replacing traditional manual testing. It enables batch execution of test scenarios covering all color types and gameplay modes, significantly improving verification efficiency. Through general function encapsulation and PO model design, code reuse is achieved, avoiding redundant development and further reducing the workload of testers. Furthermore, this invention overcomes the limitations of post-test verification in existing interface testing by extracting and verifying feedback information from the app in real time during the number selection process. This accurately captures compliance issues in the number selection operation, ensuring a high degree of consistency between the test scenario and the user's actual operation scenario, effectively reducing user experience problems after app launch due to missed tests. The design concept of separating test data from code significantly reduces maintenance costs. Through the collaboration of log recording, exception screenshots, and Allure visualization reports, the entire testing process is retained, improving data traceability efficiency.
[0039] 2. The computer-readable storage medium of the present invention can enable the system module to cooperate in order to realize the automatic verification method for the selection specifications of the digital lottery APP. Furthermore, the computer-readable storage medium of the present invention can effectively improve the operability of the automatic verification method for the selection specifications of the digital lottery APP.
[0040] 3. The computer device described in this invention can store and execute the computer-readable storage medium, thereby realizing the automatic verification method for digital lottery APP number selection specifications described in this invention. Attached Figure Description
[0041] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0042] Figure 1 This is a schematic diagram of the architecture of the automatic verification system for the number selection standard of the digital lottery APP described in Embodiment 1 of the present invention;
[0043] Figure 2 This is a flowchart illustrating the automatic verification method for the selection criteria of the digital lottery app described in Embodiment 2 of the present invention;
[0044] Figure 3 This is a schematic diagram of the structure of the computer device described in Embodiment 4 of the present invention;
[0045] Figure 4 This is a partial code diagram of the get_elements function in the automatic verification system for the number selection specification of the digital lottery APP described in Embodiment 1 of the present invention;
[0046] Figure 5 This is a partial code diagram of the element positioning definition submodule in the automatic verification system for digital lottery APP number selection specifications described in Embodiment 1 of the present invention;
[0047] Figure 6 This is a partial code diagram of the operation function encapsulation submodule in the automatic verification system for digital lottery APP number selection specifications described in Embodiment 1 of the present invention;
[0048] Figure 7 This is a partial code diagram of the dictionary structure in the automatic verification system for the number selection specification of the digital lottery APP described in Embodiment 1 of the present invention;
[0049] Figure 8 This is a partial code diagram of the test case execution module in the automatic verification system for the digital lottery APP number selection specification described in Embodiment 1 of the present invention;
[0050] Figure 9 This is a schematic diagram of the test case execution list in the log management module of the automatic verification system for digital lottery APP number selection specifications described in Embodiment 1 of the present invention;
[0051] Figure 10This is a schematic diagram illustrating the implementation effect of the error_images folder in the log management module of the automatic verification system for digital lottery APP number selection specifications described in Embodiment 1 of the present invention.
[0052] Figure 11 This is a schematic diagram of the visual charts in the log management module of the automatic verification system for the digital lottery APP number selection standard described in Embodiment 1 of the present invention;
[0053] Figure 12 This is a schematic diagram of parameter details in the log management module of the automatic verification system for digital lottery APP number selection specifications described in Embodiment 1 of the present invention;
[0054] The markings in the attached diagram are explained as follows:
[0055] 1501. Processor; 1502. Communication interface; 1503. Memory; 1504. Communication bus. Detailed Implementation
[0056] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby providing a clearer and more explicit definition of the scope of protection of the present invention.
[0057] In the description of this invention, it should be noted that the embodiments described in this invention are only some embodiments of this invention, not all embodiments; based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0058] The terms "first," "second," etc., used in this specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0059] In the description of this invention, it should be noted that the following embodiments use simulated number selection verification of Double Color Ball, Super Lotto, Welfare Lottery 3D, Arrangement 3, Arrangement 5, Happy 8, Seven Star Lottery and Seven Lucky Lottery as application scenarios to illustrate this invention.
[0060] Example 1
[0061] This embodiment provides an automatic verification system for the selection criteria of a digital lottery app, such as... Figure 1 , Figures 4-12 As shown, it includes:
[0062] (1) General Function Encapsulation Module, deployed in the common folder under the project root directory. This module is used to encapsulate the basic operation functions of Appium to achieve operation standardization and code reuse. The encapsulated functions include:
[0063] (1.1) The click_position function is used to: receive coordinate parameters (x, y) and operation description (desc), simulate user coordinate click operation through the ActionChains class, trigger my_log log error (record error information and stack trace) if the operation fails, and call the error_save_screenshot function to capture the current interface screenshot;
[0064] (1.2) The get_element function is used to: receive element positioning parameters (loc, in the format of (positioning method, positioning expression)) and element description (desc), find a single page element through the driver.find_element method, execute the same exception handling logic as the click_position function when the operation fails, and return the found element object when the operation succeeds;
[0065] (1.3) get_elements function: Similar to the get_element function, the difference is that it uses the driver.find_elements method to find multiple page elements and returns a list of elements (see detailed code). Figure 4 ).
[0066] (2) The PO model page design module is deployed in the page folder. It is used to create independent page object classes for each lottery type's simulated number selection page (such as the MnxhPage class corresponding to the Double Color Ball simulated number selection page) to achieve decoupling of page elements and operation logic. Taking the MnxhPage class as an example, its core processing module and processing logic are as follows:
[0067] (2.1) Element positioning definition sub-module, used for: Defining key page elements in ways such as AppiumBy.ID, AppiumBy.ANDROID_UIAUTOMATOR, AppiumBy.XPATH, etc., such as mnxh_guide_loc (simulated number selection guide button, ID is "com.ddyc.lotterytool:id / btn_next"), mnxh_dt_tab_loc (danduo Tab, AndroidUIAutomator expression is "newUiSelector().text(\"胆拖\")"), mnxh_popup_text_loc (popup copywriting, ID is "com.ddyc.lotterytool:id / tv_title"), etc. (see specific code in Figure 5 )
[0068] (2.2) Operation function encapsulation sub-module, used for: Calling the encapsulation functions of the common module to define corresponding operation functions for element positioning, such as the click_red_ball function (receiving the number parameter num, obtaining the red ball number selection area element through the get_element function, and then positioning the specific number through XPATH and performing a click), the click_mnxh_pt_tab_loc function (calling the click_element function to trigger the switching of the common Tab), etc. (see specific code in Figure 6 )
[0069] (3) Test data management module, deployed in the test_data file of the data folder, used for storing test case data of different playing methods of each lottery type in the form of Python dictionaries to ensure the separation of data and code; taking the test data of the Double Color Ball as an example, the dictionary structure is as follows:
[0070] success_test_ssq_data = [ { "title": "Double Color Ball Ordinary Selection - Single Bet", "num": "01 02 03 04 05 06+01", "expected": "1 bet selected, totaling 2 yuan"}, { "title": "Double Color Ball Fixed Bet Selection - Insufficient Red Ball Fixed Bets", "num": "01+02 03|01", "expected": "Please select at least 2 red ball fixed bets"}]
[0071] In the above dictionary structure, "title" is used to identify the case scenario, "num" adapts to different formats according to the playing method type (ordinary number selection uses "+" to separate the red balls and the blue ball, danduo number selection uses "|" to separate the red ball combination and the blue ball), and "expected" is the expected verification result of the number selection specification (see specific code in Figure 7 )
[0072] (4) Test case execution module, deployed in the testcases folder, used for creating the TestMnxh test execution class; the core of this class is to call the page object functions of the PO module to implement the simulation of the number selection process and the verification logic. The specific execution steps are as follows:
[0073] (4.1) Environment initialization: Start the Appium driver through the enter_toolbox_fixture fixture to enter the simulated number selection tool page of the digital lottery APP;
[0074] (4.2) Close the guide and switch the gameplay: Call the click function corresponding to mnxh_guide_loc to close the number selection guide pop-up. According to the gameplay identifier in the test case "title" (such as "normal" or "combination"), call the corresponding Tab click function (such as click_mnxh_pt_tab_loc) to switch the gameplay.
[0075] (4.3) Number selection operation execution: Parse the test case "num" parameter. If it is a normal number selection, split the red ball and blue ball, and call the click_red_ball and click_blue_ball functions in a loop to complete the number selection; if it is a combination number selection, split the red ball fixed code, red ball variable code and blue ball, and call the click_red_dan_ball and click_red_tuo_ball functions to perform the operation.
[0076] (4.4) Result Verification: The get_bets_money function is called to extract real-time feedback information from the APP (such as betting amount and rule prompts). The feedback information is compared with the "expected" parameter using an assertion. If they match, a "verification successful" log is recorded. If they do not match, a screenshot is triggered and an AssertionError exception is thrown (see detailed code). Figure 8 );
[0077] (4.5) Batch execution: Test case data from the test_data file is passed in through the @pytest.mark.parametrize decorator to achieve batch execution in multiple scenarios.
[0078] (5) Log management module, which runs through the entire test execution process, and its specific functions include:
[0079] (5.1) Log recording: The my_log logging tool (based on the logging module) records the timestamp, operation description and status of each operation in real time (such as "2025-03-24 16:29:06,587-INFO: Click element--
OK
[0080] (5.2) Screenshot of an error: When an operation fails or an assertion fails, the error_save_screenshot function is automatically called. The screenshot is saved in the error_images folder with the filename "timestamp + scene identifier" (e.g., "2025-03-10_15_47_39_Double Color Ball Assertion Failure.png"). (See the code for details.) Figure 10 );
[0081] (5.3) Report Generation: After the test is completed, the test results are generated as an HTML report using the Allure command (alluregenerate. / allure-results-o. / reports--clean). The report includes a list of test case executions, duration statistics, parameter details, log traces, and visualization charts (such as a pass rate pie chart and an execution duration bar chart) to help testers quickly locate problems (see the code for details). Figure 9 , Figure 11 , Figure 12 ).
[0082] It should be noted that the above examples are merely for explaining the present invention and should not be construed as limiting the scope of protection of the present invention.
[0083] Example 2
[0084] This embodiment is based on the same inventive concept as the automatic verification system for digital lottery app number selection specifications described in Embodiment 1, and provides an automatic verification method for digital lottery app number selection specifications, such as... Figure 2 As shown, it includes the following steps:
[0085] S100: Call the general function encapsulation module to encapsulate the basic operation functions of Appium;
[0086] S200: Call the PO model page design module to create a corresponding page object class for the simulated number selection page of each lottery type;
[0087] S300 calls the test data management module to store test case data for different gameplay modes of each lottery using a Python dictionary structure;
[0088] S400: Call the test case execution module to create the TestMnxh test execution class, and call the page object function created by the PO model page design module to simulate and verify the number selection process based on the TestMnxh test execution class;
[0089] S500: Call the log management module to record logs, screenshot anomalies, and generate reports during the simulation and verification of the number selection process.
[0090] Example 3
[0091] This embodiment provides a computer-readable storage medium, including:
[0092] The storage medium is used to store computer software instructions used to implement the automatic verification method for the digital lottery number selection standard described in Embodiment 2 above. It includes a program for executing the program set for the automatic verification method for the digital lottery number selection standard. Specifically, the executable program can be built into the automatic verification system for the digital lottery number selection standard described in Embodiment 1. In this way, the automatic verification system for the digital lottery number selection standard can implement the automatic verification method for the digital lottery number selection standard described in Embodiment 2 by executing the built-in executable program.
[0093] Furthermore, the computer-readable storage medium in this embodiment can be any combination of one or more readable storage media, wherein the readable storage medium includes an electrical, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
[0094] Example 4
[0095] This embodiment provides an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.
[0096] Memory 1503 is used to store computer programs;
[0097] When the processor 1501 executes the computer program stored in the memory 1503, it implements the steps of the automatic verification method for the digital lottery APP number selection standard described in Embodiment 1 above.
[0098] As one embodiment of the present invention, the communication bus mentioned in the terminal above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0099] As one embodiment of the present invention, the communication interface is used for communication between the aforementioned terminal and other devices.
[0100] In one embodiment of the present invention, the memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0101] As one embodiment of the present invention, the processor described above may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0102] It should be understood that in the various embodiments of this document, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0103] It should also be understood that, in the embodiments herein, the term "and / or" is merely a description of the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following associated objects have an "or" relationship.
[0104] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this document.
[0105] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0106] In the embodiments provided herein, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or units, or they may be electrical, mechanical, or other forms of connection.
[0107] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments described herein, depending on actual needs.
[0108] Furthermore, the functional units in the various embodiments of this document can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0109] If the integrated unit is implemented as 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 this paper, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this paper. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0110] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An automatic verification system for the selection criteria of a digital lottery app, characterized in that, include: A general-purpose function encapsulation module, used to encapsulate Appium's basic operation functions; The PO model page design module is used to create corresponding page object classes for the simulated number selection page of each lottery type; The test data management module is used to store test case data for different gameplay modes of various lottery games using a Python dictionary structure; The test case execution module is used to create the TestMnxh test execution class, and based on the TestMnxh test execution class, call the page object function created by the PO model page design module to simulate and verify the number selection process; The log management module is used to record logs, screenshot anomalies, and generate reports during the simulation and verification of the number selection process.
2. The automatic verification system for digital lottery APP number selection specifications according to claim 1, characterized in that: The Appium basic operation functions include: click_position function, get_element function, and get_elements function.
3. The automatic verification system for digital lottery APP number selection specifications according to claim 1, characterized in that: The PO model page design module includes: an element positioning definition submodule; The element location definition submodule is used to: define key page elements using AppiumBy.ID, AppiumBy.ANDROID_UIAUTOMATOR, and AppiumBy.XPATH. The key elements of the page include: a simulated number selection guide button, a combination tab, and pop-up text.
4. The automatic verification system for digital lottery APP number selection specifications according to claim 3, characterized in that: The PO model page design module also includes: an operation function encapsulation submodule; The operation function encapsulation submodule is used to: call the encapsulation function of the common module to define the corresponding operation function for element positioning; the operation function includes: the click_red_ball function and the click_mnxh_pt_tab_loc function.
5. The automatic verification system for digital lottery APP number selection specifications according to claim 1, characterized in that: The Python dictionary structure includes: title, num, and expected; The title is used to identify the use case scenario; The num parameter is used to adapt to different formats based on the gameplay type. The "expected" refers to the expected verification result of the number selection specification.
6. The automatic verification system for digital lottery APP number selection specifications according to claim 5, characterized in that: The test case execution module is further configured to: sequentially execute environment initialization, boot shutdown and gameplay switching, number selection operation and result verification operations based on the TestMnxh test execution class; The number selection operation includes: parsing the num of the test case, and calling the click_red_ball and click_blue_ball functions to select a number based on the parsing result.
7. The automatic verification system for the selection criteria of digital lottery apps according to claim 1, characterized in that: The log management module is further configured to: record the timestamp, operation description and status of each step of the number selection process simulation and verification in real time using a log tool; and call the error_save_screenshot function to take a screenshot of the interface when an operation fails or an assertion exception occurs during the number selection process simulation and verification. After the test is completed, the test results will be generated as an HTML report containing a list of test case executions, duration statistics, parameter details, log traces, and visualization charts.
8. The automatic verification method for the selection criteria of a digital lottery app based on the automatic verification system for selection criteria of a digital lottery app according to any one of claims 1 to 7, characterized in that, The method includes the following steps: The basic operation functions of Appium are encapsulated by calling the general function encapsulation module; Call the PO model page design module to create a corresponding page object class for the simulated number selection page of each lottery type; The test data management module uses a Python dictionary structure to store test case data for different gameplay modes of each lottery type; The test case execution module is invoked to create the TestMnxh test execution class. Based on the TestMnxh test execution class, the page object function created by the PO model page design module is invoked to simulate and verify the number selection process. The log management module is invoked to record logs, screenshot anomalies, and generate reports during the simulation and verification of the number selection process.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the automatic verification method for the digital lottery APP number selection specification as described in claim 8.
10. A computer device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute the steps of the automatic verification method for the digital lottery app number selection specification as described in claim 8 by running a program stored in the memory.
