A test device and method based on IPTV system
By embedding the test configuration management module, test environment interface and database configuration module in the IPTV system, the risk problem of traditional test environment configuration methods on the production environment is solved, and safe and effective functions and database testing are realized in the production environment, improving the Test validity and ensure system stability.
Patent Information
- Application Number
- CN202110905468.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-05
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-08-05
AI Technical Summary
In IPTV systems, the traditional test environment configuration method needs to be carried out in the actual production environment, which increases the risk of system stability and is inconvenient to configure multiple test portals, and may affect the production environment and even lead to system crashes.
By introducing test configuration management module, test environment interface configuration module, test environment database configuration module and test result analysis module in the IPTV system, embed the test entrance module into the production environment, generate the test environment interface and database process control switches, and ensure the test process Separated from the production environment, providing cache submodules and test annotations, and implementing step-by-step testing and verification of interfaces and databases.
It realizes the selection and configuration of interfaces and databases when the new functions are launched, and tests are combined with the real production environment, which improves the effectiveness of the test, while ensuring the stability of the production environment and does not affect normal operation.
Smart Images

Figure CN113709448B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer applications, and in particular to a testing device and method based on an IPTV system. Background Art
[0002] In order to facilitate more users to watch doctors broadcasting medical knowledge and case analysis in real time at home through network TV, and to consult and communicate with the doctors who are broadcasting live by phone, the video consultation application software that can be supported in the home IPTV box has been built, and the LWS system (including server and client) has been built to support the application of the functions of the video consultation application software based on the IPTV system. Among them, the LWS server (local web server) is a web-based application system, which mainly carries the support of client functions such as member management, transaction authentication, video on demand, video consultation, appointment registration, health testing, etc. on the server side. However, the application system is applied to the TV box, and it is necessary to comply with the application habits of the TV end as a client. Especially when new functions are launched, they need to run in a test environment and connect to the real production environment (such as real live broadcast, real doctor terminal). Therefore, it is necessary to implement the test function in a real production environment.
[0003] The traditional implementation method is to configure the test environment directly on the application's desktop recommendation position, which increases the risk of application system stability; and the number of desktop recommendation positions is limited, which makes it inconvenient to configure more test entrances. At the same time, there is also the risk of uninformed users entering the new test function module without knowing it; if the operation is improper, it will have a huge impact on the production environment and cause the system to crash. Summary of the invention
[0004] The main purpose of the present invention is to solve the problem that the test environment is separated from the actual environment, embed the test process into the actual production environment, obtain accurate test results, and at the same time not affect the normal operation of the production environment.
[0005] In a first aspect, to achieve the above-mentioned purpose, the present application provides a testing device based on an IPTV system, characterized in that it includes the following modules:
[0006] Test configuration management module: used to define and manage test information; test information includes: test entry information, test process information and preset test results; the test entry information includes: test name and ID, validity period, and user ID of participating test; test process information includes: test environment interface process and test environment database process;
[0007] Test environment interface configuration module: receives configuration requests from the test configuration management module and generates test environment interface process control switches;
[0008] Test environment database configuration module: receives configuration requests from the test configuration management module and generates test environment database process control switches;
[0009] Test result analysis module: receives preset test results from the test configuration management module, compares them with the actual test results, and generates analysis results.
[0010] The test entry module is used to receive the configuration request from the test configuration management module and generate the user test entry;
[0011] Furthermore, the test entry module is embedded behind the user entrance of the production environment interface. After the test environment verification is successful, the test entry module is displayed on the production environment interface.
[0012] Furthermore, a cache submodule is provided in the test environment interface process control switch to save data returned by multiple interfaces and generate a business request for the next interface.
[0013] The interfaces accessed by the test entry module include the production environment interface and the test environment interface, and the process is determined by the test environment interface process control switch.
[0014] At the same time, the request initiated by the test entry module carries the test annotation. After the test operation is completed in the production environment interface, the interface process control switch is returned according to the test annotation.
[0015] On the other hand, the present invention provides a testing method based on an IPTV system, comprising the following steps:
[0016] Accept test service requests from the user test portal, perform test process control on the test service requests according to the test process information, compare the preset test results with the actual test results, and generate analysis results.
[0017] The test entry information, test process information and preset test results are configured through test configuration management; the test entry information includes: test name and ID, effective period, and user ID of participating in the test; the test process information includes: test environment interface process, test environment database process; and the test business request includes the user ID of participating in the test.
[0018] Furthermore, the test entry information is obtained, and a user test entry is generated in the production environment interface. The user test entry is embedded in the user entry of the production environment interface. When the test environment is successfully verified, the user test entry is displayed in the production environment interface.
[0019] Furthermore, the test environment interface process provides storage and calculation of data returned by the interface and generates data requests.
[0020] Furthermore, the interface for user test entry access includes a production environment interface and a test environment interface, and the process is determined by the test environment interface process control.
[0021] Furthermore, the test request initiated from the user test entrance carries a test annotation, and the production environment interface makes a judgment based on the test annotation to determine whether to enter the test environment interface process after processing in the production environment is completed.
[0022] According to the present invention, when a new function is launched, the interfaces and databases required for the tested function can be selected and configured, and the processes, interfaces and databases required for testing can be gradually tested in combination with the real production environment, and the test results can be verified and analyzed, thereby improving the effectiveness of the test. At the same time, although the production environment is combined, the relative separation of the production environment and the test environment does not affect the normal operation of the production environment, thereby ensuring the stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a structural diagram of a test device based on an IPTV system according to an embodiment of the present invention;
[0024] Figure 2 is a flow chart of a testing method based on an IPTV system according to an embodiment of the present invention;
[0025] Figure 3 The present invention is a logic diagram of a testing method based on an IPTV system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The specific implementation of the present invention is described in detail below with reference to the accompanying drawings.
[0027] The present invention provides a testing device based on an IPTV system, which is used for embedding a testing process in the formal operation process of application software and related systems based on the IPTV system in a production environment, obtaining a test result based on formal data of the production environment, and comparing and analyzing the test result with the expected test result to increase the effectiveness of the test. At the same time, the control of the test entrance in an embedded manner does not affect the normal operation of the application software in the production environment.
[0028] Figure 1 This is a structural diagram of a test device based on an IPTV system in an embodiment of the present invention. As shown in the figure, it includes the following modules:
[0029] 1. P100 test configuration management module: some of which are deployed on the server side and some on the client side, including configuration entry and data management sub-modules.
[0030] The configuration entry is deployed on the client side, supporting the browser or application mode, and is provided to managers or testers to interact with the data management submodule, such as the web platform and mobile application platform. The content of data management is configured through the interactive page to define the test information. On the other hand, it is also possible to define variables or protocols directly in the server configuration file by programmers without interaction. For example: The management background of LWS provides configuration management functions, including the configuration entry of the test configuration management module and the data management submodule.
[0031] In actual applications, a corresponding operation page is added to the LWS management background for developers and testers to operate; a corresponding interface is provided in the management background for developers and testers to add data configuration for test items, and they will be classified according to the entry type; the classified test item data will be statistically analyzed.
[0032] The data management submodule is the core part of the test configuration management module, which is deployed on the server side and is used to manage the specifications and content of test information. Test information includes: test entry information, test process information and preset test results;
[0033] 1) Test entry information includes: test name and ID, validity period, and user ID of the test participant; this type of information is defined and managed in the data management submodule and is used to control the display of the test entry after the test environment is successfully verified in the production environment. There are many ways to verify the test environment. For example, if a user with a user ID of the test participant successfully logs in to the production environment and is within the corresponding validity period, the test entry displaying the test name can be seen.
[0034] After submitting the test data at the test entrance, the test ID is used as a parameter to identify the test. In addition, the test entrance information can also include: entrance type, entrance subtype and weight. The entrance type is what type of test is being conducted (including: entering the test server, test album, test activity); the entrance subtype indicates which album or activity it is. When the entrance type is the test server, the entrance subtype option is hidden.
[0035] The test entry can be defined in the LWS management background by clicking a button to enter the test entry configuration interface. After the selection and filling are completed, save it to generate the corresponding test information and realize the configuration of the test project.
[0036] After the test configuration is completed, a new test subsystem, namely the P110 test entry, is created in the production environment of the LWS application system.
[0037] When the client in the production environment loads data, the corresponding test data that has been successfully configured is obtained. After the test environment is successfully verified, different scenes in the production environment are displayed according to the configuration requirements, such as: LWS client homepage, user login success interface, etc.
[0038] The verification of the test environment is not limited to the user with the user ID participating in the test logging in to the production environment, but also supports the user to visit the LWS client homepage (or specified page), enter special instructions by pressing the remote control number keys, and compare the special instructions with the preset password (test ID). If the two are equal, it means that the verification is successful. At this time, the LWS client sends a notification to the LWS server to inform and enter the test entrance, that is, the test subsystem.
[0039] The test subsystem page can be a layout composed of multiple Tables, each of which is the entrance to a specified function (home page, activity, album, etc.); the content in the Table is filled after the page is loaded by requesting the configured test items from the management background through an asynchronous method.
[0040] According to the data returned by the management background, different tables are filled in by category. The table will dynamically generate cells according to the number of test items, and then set the specific test item information as the cell attributes to fill in row by row. If there are many test items of a certain type and one row cannot display them all, the row will be switched to the second row, and so on. This way, each type of test item is ensured to occupy an independent table.
[0041] When the user clicks on a cell in the test subsystem, the corresponding system will be started according to the properties of the current table and cell to perform the next test.
[0042] Since the present invention is applied to an IPTV system, the information display of the client needs to support the display habits of the TV screen, and the page layout is performed in a Table manner, which is more convenient and controllable.
[0043] 2) Test process information includes: test environment interface process, test environment database process;
[0044] Test environment interface process: define the test environment interface process corresponding to the test project in the management background of LWS. In the device of the present invention, the interface in the original production environment coexists with the test environment interface to be tested. In the test process information, different versions of the test project are defined, and different entries correspond to different interfaces and different addresses. A function may correspond to multiple interfaces, including obtaining different data in the test environment interface and the production environment interface. The logical relationship is the test environment interface process, which is configured in the test configuration management module and implemented in the test environment interface configuration module.
[0045] Test environment database process: define the test environment database process corresponding to the test project in the management background of LWS. In the device of the present invention, the test environment interface to be tested can access the test database environment or the production environment database. In the test process information, different versions of the test project are defined. Different interfaces correspond to different database addresses, and even different user identifiers correspond to different database environments in the same interface. For a functional interface, which includes reading and saving data in the test environment database and the production environment database, its logical relationship is the test environment database process, which is configured in the test configuration management module and implemented in the test environment database configuration module.
[0046] 3) Preset test results: Define the test results corresponding to the test items in the LWS management background, for example, the test results corresponding to the boundary status and specific situations:
[0047] For example, different user types (ordinary users, VIP users) specify different doctor types (expert doctors, ordinary outpatient doctors) to generate fees for testing, and the test results can be predicted in the test configuration management module.
[0048] 2. P120 test environment interface configuration module: receives configuration requests from the test configuration management module and generates test environment interface process control switches;
[0049] In a specific implementation, after the data of the test environment interface process is defined and configured successfully in the management background of the LWS mentioned in the embodiment of the present invention, the test environment interface configuration module generates a test environment interface process control switch according to the data of the test environment interface process. The test environment interface process control switch configures the address of the interface to be processed in different requests. The interface involved in the functional test may also be used in a production environment, a test environment, or a mixture of multiple environment interfaces. The matching rules of the interface of each functional test are configured in the test environment interface process control switch, and the data request is directed.
[0050] When a user clicks a test item through the test subsystem, a request is initiated to the test environment interface process control switch. The test environment interface process control switch directs the request to different interfaces according to the matching rules. The test environment interface process control switch supports configuring multiple interfaces for one function. The test environment interface process control switch provides a cache submodule to save the data returned by multiple interfaces and provide data for the next interface request.
[0051] In this method, an adaptation mechanism for the test environment is added to the production environment. That is, the processing of the test scenario is added to the interface of the production environment. For example, the request initiated by the test entry module carries a test annotation, and after accessing the production environment interface through the test environment interface process control switch, the next process is determined based on the test annotation to return to the interface process control switch, rather than the next process in the production environment.
[0052] For example, the test entrance is for the calculation and deduction of test consultation fees. The information of the expert doctor is the production environment information, and the charging standard is the test environment information. After entering the expert doctor's consultation test from the test entrance, the test environment interface process control switch controls the process to obtain the expert doctor's information from the production environment interface and return it. Then, it is generated in the test environment interface process control switch and requests the test environment interface to calculate the fee and obtain the fee return.
[0053] 3. P130 test environment database configuration module: receives configuration requests from the test configuration management module and generates test environment database process control switches;
[0054] In a specific implementation, after the data of the test environment database process is defined and configured successfully in the management background of the LWS mentioned in the embodiment of the present invention, the test environment database configuration module generates a test environment database process control switch according to the data of the test environment database process. The test environment database process control switch configures the information of the database to be processed in different requests, such as the library name, table name, and stored procedure name. The database involved in the functional test may also be a database actually used in the production environment, or it may be a simulation library (i.e., a test database) of the actual database used in the database deployed in the production environment. In the functional processing corresponding to an interface, it may be necessary to read and write the databases of the production environment and the test environment. The test environment database process control switch configures the interface configurable database configuration for each functional test.
[0055] For example, in the embodiment where the test entry is to test the calculation and deduction of consultation fees, the deduction test is performed in the test environment, the record table for recording the actual deduction operation of Alipay is the production environment database, and the log for recording this deduction operation is the test environment database. In the implementation of the test interface, different operations access databases at different addresses according to the configuration.
[0056] 4. P140 test result analysis module: receives preset test results from the test configuration management module, compares them with the actual test results, and generates analysis results.
[0057] For example, the fees that a VIP user needs to pay for a medical consultation with an expert doctor are consistent with the test results configured in the test configuration management module, and the test results are analyzed.
[0058] In an embodiment of the present invention, the display of the P110 test entry is managed in the P100 test configuration management module, the test environment interface process control switch and the test environment database process control switch for the test project are generated in the P120 test environment interface configuration module and the P130 test environment database configuration module, the control process of which interface or database is accessed at what time is determined in the control switch, and the test results are analyzed in the P140 test result analysis module. Through this device, when a new function is launched, the process and results of the test environment are tested and verified in combination with the real production environment, which improves the effectiveness of the test without affecting the normal operation of the production environment.
[0059] Figure 2 is a flow chart of a testing method based on an IPTV system according to an embodiment of the present invention. Figure 2 As shown, the test environment interface process of step S200 receives a test service request from a user test portal;
[0060] Next, in step S210, the test process control is performed on the test business request according to the test process information. In the present invention, due to business needs, the test function needs to be embedded in the production environment for testing, so the access to the test entrance includes the production environment interface and the test environment interface, and the selection and control of the interface are determined by the step S211 test environment interface process; its corresponding database also includes the production environment database and the test database, so the step S212 test environment database process is used to manage the operation of the database. In a test process, steps S211 and S212 will generate multiple loop executions, and the result data of each execution is stored and reused in the test process.
[0061] The logic of test process control is as follows Figure 3 As shown:
[0062] In step S300, after obtaining the data request from the test entry, the test environment interface process is judged to determine whether the next step is to enter the test interface or the production environment interface.
[0063] When it is necessary to test functions in the production environment, since its process is different from that of the normal production environment, it is necessary to exit the current interface after completing a certain process and return to the test environment interface process. Therefore, in the present invention, it is necessary to perform a unified processing on the production environment interface, that is, to increase the judgment of the test scenario. In the present invention, the test request initiated by the test entry module carries a test annotation, and the production environment interface can detect the test annotation to make a judgment to determine whether to return to the test environment interface flow after the processing is completed in the production environment, that is, step S310 test identification judgment, and judge that the request is a test in the production environment. After the processing is completed, it returns to the test environment interface process.
[0064] In the processing of the test interface, the database to be accessed may be a test environment database or a production environment database, and a judgment is made in the test environment database process in step S320.
[0065] The test environment interface process also provides storage and calculation of the data returned by the interface, generates data requests for the next step, supports multiple calls of the entire test process control, and finally obtains the test results in the test interface, compares the preset test results with the actual test results, and generates analysis results;
[0066] The test entry information, test process information and preset test results involved in the above steps are configured through test configuration management; the configured test entry information includes: test name and ID, effective period, and user ID participating in the test. Among them, at the terminal of the production environment, the test entry information is obtained, and the user test entry is generated in the production environment interface. It should be noted that the user test entry is embedded after the user entry of the production environment interface. When the test environment verification is successful, the user test entry is displayed in the production environment interface.
[0067] Through the testing method of the present invention, when a new function is launched, the interface and database required for implementing the function can be selected and configured, and the process and function to be tested can be gradually tested in combination with the real production environment, and the results can be verified and analyzed, thereby improving the effectiveness of the test. At the same time, although the production environment is combined, the relative separation of the production environment and the test environment does not affect the production environment, thereby ensuring the stability of the system.
[0068] The above disclosures are only several specific embodiments of the present invention; however, the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. A test device based on an IPTV system, characterized in that: Includes the following modules: Test configuration management module: used to define and manage test information, including a configuration entry module and a data management submodule, wherein the configuration entry module is deployed on the client and is used to interact with the data management submodule; The data management submodule is deployed on the server side and is used to manage test information; The test information includes: test entry information, test process information and preset test results; the test entry information includes: test name and ID, validity period, user ID participating in the test, entry type, entry subtype and weight. The test entry information is defined and managed in the data management submodule, and is used to control the display of the test entry in the production environment after the test environment is successfully verified; it is also used to create a new test subsystem in the production environment of the LWS application system after the test configuration is completed; when the client of the production environment loads data, the corresponding test data that has been successfully configured is obtained; after the test environment is successfully verified, different scenes in the production environment are displayed according to the configuration requirements; wherein, the verification of the test environment is not limited to the user with the user ID participating in the test logging in to the production environment, but also supports the user to access the LWS client homepage and / or the specified page, and enter the special instruction by pressing the number keys of the remote control, and the special instruction is compared with the preset password. If the two are equal, it means that the verification is successful, and at this time, a notification is sent to the LWS server through the LWS client to inform and enter the test entry; The test subsystem page is a layout composed of multiple Tables, each of which is the entrance to a specified function. After the page is loaded, the content in the Table is filled by requesting the configured test items from the management backend through an asynchronous method. According to the data returned by the management backend, different Tables are filled by category. The Table will dynamically generate cells according to the number of test items, and then set the cell attributes according to the specific test item information to fill in row by row. If there are too many test items of a certain type and one row cannot display them all, the second row will be switched, and so on. When the user clicks a cell in the test subsystem, the corresponding system will be started according to the attributes of the current Table and the cell to carry out the next test work. The test process information includes: test environment interface process, test environment database process; Test environment interface configuration module: receives configuration requests from the test configuration management module and generates test environment interface process control switches; Test environment database configuration module: receives configuration requests from the test configuration management module and generates test environment database process control switches; Test result analysis module: receives preset test results from the test configuration management module, compares them with the actual test results, and generates analysis results.
2. The test device based on the IPTV system according to claim 1, characterized in that: Also includes: The test entry module is used to receive the configuration request from the test configuration management module and generate the user test entry; The test entry module is embedded behind the user entrance of the production environment interface. After the test environment verification is successful, the test entry module is displayed on the production environment interface.
3. The test device based on the IPTV system according to claim 2, characterized in that: The test environment interface process control switch provides a cache submodule to save data returned by multiple interfaces and generate a service request for the next interface.
4. The test device based on the IPTV system according to claim 2, characterized in that: The interfaces accessed by the test entry module include a production environment interface and a test environment interface, and the process is determined by the test environment interface process control switch.
5. The test device based on the IPTV system according to claim 4, characterized in that: The request initiated by the test entry module carries a test annotation. After the test operation is completed in the production environment interface, the next step of the process is determined according to the test annotation to return to the interface process control switch.
6. A testing method based on an IPTV system, characterized in that: include: Accepting a test service request from a user test entry, performing test process control on the test service request according to the test process information, comparing the preset test result with the actual test result, and generating an analysis result; wherein, obtaining the test entry information, generating a user test entry on the production environment interface, the user test entry is embedded behind the user entry on the production environment interface, and when the test environment verification is successful, the user test entry is displayed on the production environment interface; The test entry information, test process information and preset test results are configured through test configuration management; wherein, the test configuration management includes configuration entry and data management, and the data management is interacted with through the configuration entry, and the data management is used to manage the test entry information, test process information and preset test results; the test entry information includes: test name and ID, effective period, user identification participating in the test, entry type, entry subtype and weight; the test process information includes: test environment interface process, test environment database process; wherein, after the test configuration is completed, a new test subsystem is created in the production environment of the LWS application system; when the client of the production environment loads data, the corresponding test data that has been successfully configured is obtained; after the test environment is successfully verified, different scenes in the production environment are displayed according to the configuration requirements; wherein, the verification of the test environment is not limited to the user with the user identification participating in the test logging in to the production environment, but also supports the user to access the LWS client homepage and / or the specified page, and enter the special instruction by pressing the remote control numeric key, and the special instruction is compared with the preset password. If the two are equal, it means that the verification is successful, and at this time, a notification is sent to the LWS server through the LWS client to inform and enter the test entry; The test subsystem page is a layout composed of multiple Tables, each of which is the entrance to a specified function. After the page is loaded, the content in the Table is filled in by requesting the configured test items from the management background through asynchronous methods. According to the data returned by the management background, different Tables are filled in by category. The Table will dynamically generate cells according to the number of test items, and then set the cell attributes according to the information of the specific test items to fill in row by row. If there are many test items of a certain type and one row cannot display them all, the second row will be switched, and so on. When the user clicks on a cell in the test subsystem, the corresponding system will be started according to the attributes of the current Table and the cell to carry out the next test.
7. The IPTV system-based testing method according to claim 6, characterized in that: The test environment interface process provides storage and calculation of data returned by the interface and generates data requests.
8. The IPTV system-based testing method according to claim 6, characterized in that: The interface accessed by the user test entrance includes a production environment interface and a test environment interface, and the process is determined by the test environment interface process control.
9. The IPTV system-based testing method according to claim 8, characterized in that: The test request initiated through the user test entry carries a test annotation, and the production environment interface makes a judgment based on the test annotation to determine whether to enter the test environment interface process after the processing is completed in the production environment.
Citation Information
Patent Citations
Interface testing method, system, device and storage medium based on database comparison
CN109101415A
Data processing system, method and device and readable storage medium
CN111881016A