Universal test system and test method
By introducing a general testing system in the field of automated testing, unified management of test sequences and business algorithms, the problems of management difficulties, data silos and low development efficiency in traditional technologies are solved, and the general and unified management of test methods is realized, and development efficiency is improved.
Patent Information
- Application Number
- CN202311642100.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2025-06-06
AI Technical Summary
In the field of automated testing of traditional industrial control software, each test function module is independently developed and the development standards are not uniform, resulting in management difficulties, data silos and low development efficiency.
It provides a general testing system that manages multiple test sequences and business algorithms through the collaborative work of clients and servers to ensure unified storage and effective utilization of data.
It realizes general and unified management of test methods, improves development efficiency, avoids data silos, and simplifies system docking and maintenance.
Smart Images

Figure CN120104468A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic product testing, and in particular to a universal testing system and testing method. Background Art
[0002] In the field of automated testing, traditional industrial control software usually develops application programs for separate functional modules, that is, test developers develop different test functional modules for different operating platforms.
[0003] In the specific implementation, since different test function modules are developed independently and the development standards are not unified, it is difficult to manage the various test function modules in a unified manner, which causes great difficulties in the management and subsequent maintenance of each module; and the business data of different modules are stored in a scattered manner, resulting in the inability to fully utilize the data and easily causing data islands. Summary of the invention
[0004] The purpose of this application is to provide a universal testing system and testing method, so as to provide a universal testing solution that meets multiple requirements and has unified data management.
[0005] In a first aspect, the present application provides a universal testing system, the system comprising:
[0006] The client stores a plurality of test sequences, and is used to respond to the operation of testing the device to be tested, determine the target test sequence from the plurality of test sequences, and obtain the target algorithm set corresponding to the target test sequence, wherein the target algorithm set includes the execution order of the plurality of business algorithms used to execute the test process of the target test sequence, and the algorithm identifiers of the plurality of business algorithms and the library identifiers of the dynamic link library DLL to which they belong; at least one of the plurality of business algorithms is executed in sequence according to the execution order, and the corresponding test result is obtained and sent to the server; wherein, when executing each business algorithm, the target DLL corresponding to the library identifier to which each business algorithm belongs is determined, and the business algorithm is obtained from the target DLL based on the algorithm identifier and executed;
[0007] The server is used to receive and store the test results sent by the client.
[0008] In a possible implementation, after the client determines the target DLL corresponding to the library identifier to which each of the business algorithms belongs, it is further used to:
[0009] Determine the calling interface corresponding to the above target DLL;
[0010] The above client is specifically used for:
[0011] Obtain the input configuration item corresponding to the above business algorithm, and obtain the input parameters corresponding to the above input configuration item through the above calling interface;
[0012] The obtained input parameters are used as input for executing the above business algorithm to execute the above business algorithm.
[0013] In a possible implementation, the client stores parameter structures of call interfaces corresponding to the DLLs to which the multiple business algorithms belong respectively;
[0014] The client is also used to modify the format of the acquired input parameter according to the parameter structure of the calling interface before using the acquired input parameter as the input.
[0015] In a possible implementation, the client stores callback interfaces corresponding to the DLLs to which the multiple business algorithms belong;
[0016] When the client executes at least one service algorithm in sequence according to the execution order, it is also used to:
[0017] When each business algorithm is executed, the intermediate business data in the execution process of each business algorithm is output through the callback function corresponding to the above target DLL.
[0018] In a possible implementation, the server is specifically used to:
[0019] Receiving the test result sent by the client through the application interface called by the client;
[0020] Based on the test sequence corresponding to the test result, a storage area corresponding to the test result is determined, and the test result is stored in the storage area.
[0021] In a possible implementation, the target algorithm set further includes the enabling states corresponding to the plurality of service algorithms; the enabling states include enabled and disabled;
[0022] The client is further used to: before executing at least one business algorithm in sequence according to the execution order, based on the enabling states corresponding to the multiple business algorithms, select at least one business algorithm with an enabling state of enabled from the multiple business algorithms.
[0023] In a second aspect, the present application provides a general testing system, comprising:
[0024] The user interface UI interaction layer stores a plurality of test sequences, and is used to respond to the operation of testing the device to be tested, determine the target test sequence from the plurality of test sequences, and obtain the target algorithm set corresponding to the target test sequence, wherein the target algorithm set includes the execution order of a plurality of business algorithms for executing the test process of the target test sequence, and the algorithm identifiers of the plurality of business algorithms and the library identifiers of the dynamic link libraries DLL to which they belong; execute at least one of the plurality of business algorithms in sequence according to the execution order, obtain the corresponding test results, and send them to the back-end service interface layer; when executing each business algorithm, determine the target DLL corresponding to the library identifier to which each business algorithm belongs, and obtain the business algorithm from the target DLL based on the algorithm identifier;
[0025] The business logic algorithm layer stores multiple DLLs and is used to send the business algorithms to the UI interaction layer so that the UI interaction layer executes the business algorithms.
[0026] The above-mentioned backend service interface layer is used to receive and store the test results sent by the above-mentioned UI interaction layer.
[0027] In a third aspect, the present application provides a testing method, which is applied to the above-mentioned general testing system, including:
[0028] In response to an operation of testing the device to be tested, a target test sequence is determined from the multiple test sequences, and a target algorithm set corresponding to the target test sequence is obtained; the target algorithm set includes an execution order of multiple business algorithms for executing the test process of the target test sequence, and an algorithm identifier of each of the multiple business algorithms and a library identifier of a dynamic link library DLL to which they belong;
[0029] Execute at least one of the multiple business algorithms in the above-mentioned execution order in sequence, obtain corresponding test results and store them;
[0030] When executing each business algorithm, the target DLL corresponding to the library identifier to which each business algorithm belongs is determined, and the business algorithm is obtained from the target DLL based on the algorithm identifier and executed.
[0031] In a possible implementation, after determining the target DLL corresponding to the library identifier to which each of the business algorithms belongs, the method further includes: determining a calling interface corresponding to the target DLL;
[0032] Execute the above business algorithm, specifically including:
[0033] Obtain the input configuration item corresponding to the above business algorithm, and obtain the input parameters corresponding to the above input configuration item through the above calling interface;
[0034] The obtained input parameters are used as input for executing the above business algorithm to execute the above business algorithm.
[0035] In a possible implementation, a parameter structure of a calling interface corresponding to each of the DLLs to which the above-mentioned multiple business algorithms belong is pre-stored;
[0036] Before using the obtained input parameters as input for executing the above business algorithm, it also includes:
[0037] According to the parameter structure of the above calling interface, the format of the obtained input parameters is modified.
[0038] In a possible implementation manner, when executing at least one business algorithm in sequence according to the above execution order, it also includes:
[0039] When each business algorithm is executed, the intermediate business data in the execution process of each business algorithm is output through the pre-stored callback function corresponding to the target DLL.
[0040] In a possible implementation, storing the test results includes:
[0041] Based on the test sequence corresponding to the test result, a storage area corresponding to the test result is determined, and the test result is stored in the storage area.
[0042] In a possible implementation, the target algorithm set further includes the enabling states corresponding to the plurality of service algorithms; the enabling states include enabled and disabled;
[0043] Before executing at least one business algorithm in the above execution order, the method further includes:
[0044] Based on the enabling states corresponding to the multiple business algorithms, at least one business algorithm whose enabling state is enabled is screened from the multiple business algorithms.
[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium. When instructions in the storage medium are executed by a processor, the processor is enabled to execute any method as described in the third aspect.
[0046] In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes any of the methods described in the third aspect.
[0047] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0048] In the embodiment of the present application, the universal test system includes a client and a server. The client stores multiple test sequences and DLLs for testing the device to be tested. The server is used to uniformly store the test results. Compared with the decentralized storage method of business data of different modules in the related art, it is convenient for full utilization and unified management of data. In the process of testing each device to be tested, for the target test sequence tested by the device to be tested, the target algorithm set corresponding to the target test sequence is determined, and at least one business algorithm is executed in sequence according to the execution order stored in the business algorithm set, that is, the algorithm set of each test sequence is set on the client, and the business algorithms and their execution order are set in the algorithm set. According to this process, the corresponding test functions can be realized for different test requirements. Since they are all executed according to the same test process, the development standards and test processes corresponding to different test functions are the same, which realizes the universal and unified management of the test method. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced 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 creative work.
[0050] Figure 1 This is an application scenario of an optional testing method of an embodiment of the present application;
[0051] Figure 2 This is an application scenario of an optional testing method of an embodiment of the present application;
[0052] Figure 3 A schematic diagram of the system architecture of a universal testing system according to an embodiment of the present application;
[0053] Figure 4 A schematic diagram of a UI interaction layer according to an embodiment of the present application;
[0054] Figure 5 A schematic diagram of a test sequence attribute according to an embodiment of the present application;
[0055] Figure 6 A schematic diagram of DLL interface information according to an embodiment of the present application;
[0056] Figure 7 A schematic diagram of a system information structure according to an embodiment of the present application;
[0057] Figure 8 This is a schematic diagram of an input parameter structure according to an embodiment of the present application;
[0058] Fig. 9 This is a schematic diagram of an output parameter structure according to an embodiment of the present application;
[0059] Fig.10 A schematic diagram of a test sequence management architecture according to an embodiment of the present application;
[0060] Fig.11 A schematic diagram of a test method provided for this application;
[0061] Fig.12 A schematic diagram of an operation interface provided for this application;
[0062] Fig.13 A schematic diagram of a general test system provided for this application. DETAILED DESCRIPTION
[0063] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0064] Furthermore, in the description of the embodiments of the present application, unless otherwise specified, “ / ” means or. For example, A / B can mean A or B. The “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0065] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more.
[0066] In the field of automated testing, traditional industrial control software usually develops applications for separate functional modules, that is, test developers develop different test functional modules for different operating platforms, which has the following problems:
[0067] 1. System docking: Since the test function modules are scattered, when docking with other systems, such as the MES system (Manufacturing Execution System), each test function module needs to be docked with the MES system one by one, resulting in a large workload for docking, and once the MES system is changed, all the modules need to be re-modified;
[0068] 2. Development standards: The development standards for test function modules are not unified, which makes development time-consuming and labor-intensive. The management and maintenance of subsequent modules are difficult and inefficient.
[0069] 3. Data management: Business data of different modules are stored locally, forming data islands. Business data is scattered and difficult to manage, resulting in the inability to fully utilize the data;
[0070] 4. Abnormal identification: Since the data of each test module is stored in a decentralized manner, there is insufficient data support for abnormal problem analysis, the efficiency of problem point identification is low, and it is not easy to bring it into mass production.
[0071] Based on the above problems, the embodiments of the present application provide a UTS (Universal Test System, also known as a universal test platform) and its corresponding testing method, which have efficient demand development, flexible and diverse functions, safe and traceable data, and unified and friendly operation. The business algorithms corresponding to various needs are developed into a unified algorithm library, and other common modules are developed on a platform, namely, a UI (User Interface) interface, which realizes the separate development of business logic requirements, standard interfaces and user interfaces, thereby improving development efficiency.
[0072] The universal test system can achieve the following functions: by designing a standard algorithm library interface, it is compatible with the input and output parameters required by all algorithm libraries; it can adapt to multiple varieties, small batches, agile response, and fast delivery, and different configurations can be flexibly adjusted through test sequences; key information is fully traceable, and data statistical analysis can be performed on the key characteristics of each process.
[0073] The following describes an application scenario of an optional testing method provided by an embodiment of the present application in conjunction with the accompanying drawings. Figure 1 The general test system shown includes at least one client 10 and a server 11, wherein:
[0074] The client 10 stores a plurality of test sequences, and is used to determine a target test sequence from the plurality of test sequences in response to an operation of testing the device to be tested, and obtain a target algorithm set corresponding to the target test sequence, wherein the target algorithm set includes an execution order of a plurality of business algorithms for executing the test process of the target test sequence, and an algorithm identifier of each of the plurality of business algorithms and a library identifier of a dynamic link library DLL to which they belong; at least one of the plurality of business algorithms is executed in sequence according to the execution order, and a corresponding test result is obtained, and sent to the server 11; wherein, when executing each business algorithm, a target DLL corresponding to the library identifier to which each business algorithm belongs is determined, and the business algorithm is obtained from the target DLL based on the algorithm identifier and executed;
[0075] The server 11 is used to receive and store the test results sent by the client 10.
[0076] Optionally, the client 10 includes a display interface, through which the client 10 receives instructions from the user to test the device to be tested, triggers the operation of testing the device to be tested, and executes the test process; the client 10 also stores multiple DLLs, and during the test process, obtains the corresponding business algorithm from the storage area.
[0077] In addition, the present application embodiment also provides an optional application scenario of the test processing method, such as Figure 2 As shown, it includes at least one client 20, a storage 21 and a server 22;
[0078] Among them, the client 20 is specifically used to respond to the operation of testing the device to be tested, determine the target test sequence from multiple test sequences, and obtain the target algorithm set corresponding to the target test sequence, the target algorithm set includes the execution order of multiple business algorithms for executing the test process of the target test sequence, and the algorithm identifiers of each of the multiple business algorithms and the library identifier of the DLL (Dynamic Link Library) to which they belong; obtain the above-mentioned multiple business algorithms from the memory 21, execute at least one of the multiple business algorithms in turn according to the execution order, obtain the corresponding test results, and send them to the server 22; wherein, when executing each business algorithm, determine the target DLL corresponding to the library identifier to which each business algorithm belongs from the memory 21, and obtain and execute the business algorithm from the target DLL in the memory 21 based on the algorithm identifier.
[0079] Optionally, the client 20 includes a display interface, and the client 20 receives an instruction sent by a user to test the device to be tested through the display interface, triggers an operation to test the device to be tested, and executes the test process;
[0080] The memory 21 stores a plurality of DLLs, and the client 20 obtains corresponding business algorithms from the memory 21 during the test process.
[0081] In a specific implementation, the embodiment of the present application does not limit the configuration device of the memory 20. The memory 21 can be configured in the same device as the client 20, or in a different device.
[0082] The server 22 is used to receive and store the test results sent by the client 20.
[0083] Of course, the method provided in the embodiment of the present application is not limited to Figure 1 or Figure 2 The application scenario shown can also be used in other possible application scenarios, which are not limited in the embodiments of the present application.
[0084] In some possible implementations, the above-mentioned multiple test sequences may also be stored separately in corresponding memories, and when the client performs a test operation, relevant information of the test sequence is obtained from the memory.
[0085] Figure 3 This is a schematic diagram of the system architecture of a universal test system according to an embodiment of the present application. Figure 3 As shown, the embodiment of the present application provides a universal testing system to implement the above-mentioned testing method. The testing system is divided into three layers as a whole: backend service interface layer, UI interaction layer, and business algorithm layer. Among them:
[0086] UI interaction layer: used to provide users with friendly interaction interfaces for each module and store each test sequence (i.e. Figure 3 SEQ in), the calling interface and callback function corresponding to each DLL.
[0087] Business logic algorithm layer: stores DLLs corresponding to different function types (i.e. Figure 3 DLL), control algorithms for different instrumentation devices (i.e. Figure 3 The instrument equipment communication class library DLL shown in the figure), and the control algorithm of the device to be tested (such as a mobile phone) (i.e. Figure 3 DUT Platform Communication Class Library DLL shown in ).
[0088] Among them, each DLL in the business logic DLL can be based on the function type (such as Figure 3The control algorithms corresponding to different instruments and equipment are stored in the device communication class library DLL. When the corresponding instrument and equipment needs to be used during the test, the control algorithm corresponding to the instrument and equipment in the device communication class library DLL is used to control the instrument and equipment. The DUT platform communication class library DLL stores control algorithms corresponding to different devices to be tested (such as mobile phones). When the device to be tested is tested, a connection is established with the device to be tested through the control algorithm corresponding to the device to be tested stored in the platform communication class library DLL to control the device to be tested.
[0089] Backend service interface layer: used to uniformly save data and connect to external MES systems, providing Web API (Application Programming Interface) interfaces for MES systems and clients to call.
[0090] like Figure 3 As shown, the back-end service interface layer includes an interface MES Web API provided to external MES systems (such as MES1, MES2, MES3, etc. in the figure). In specific implementation, the MES system can connect with the general test system through the MES Web API and obtain uniformly saved data from the back-end service interface layer.
[0091] The backend service interface layer also includes the UTS Web API interface provided to the client. When a test is completed, the UI interaction layer can organize the test results and test process data (i.e., intermediate business data) generated by the test process into a unified format and send them to the backend service interface layer through the UTS Web API. When the backend service interface layer receives the test data, it verifies the test data through the backend business logic BLL to determine the legitimacy of the test data and whether it meets the verification requirements of the pre-device. After the verification is passed, it is stored in the corresponding database SQL through the backend data interface DAL.
[0092] Among them, the backend business logic BLL stores multiple pre-set verification requirements. In specific implementation, the verification requirements can set different or the same requirements for different devices to be tested, different DLLs or different test sequences, which is not limited in the embodiments of the present application.
[0093] The back-end data interface DAL stores the interfaces corresponding to each database SQL. In a specific implementation, when the test data passes the verification, the interface corresponding to its test sequence is determined from the back-end data interface DAL, and it is stored in the corresponding data block through the interface. Optionally, the back-end data interface DAL can set different or the same interfaces for different devices to be tested, different DLLs or different test sequences, which is not limited in the embodiments of the present application.
[0094] It should be noted that the above UI interaction layer is set on the client, the back-end service interface layer is independently set on the server, such as a cloud server, etc., and the business logic algorithm layer and the UI interaction layer are set on the same client (such as Figure 1 As shown), it can also be set separately in the memory (as Figure 2 shown).
[0095] The following is combined with Figures 4 to 10 , the above UI interaction layer storage is elaborated in detail, such as Figure 4 As shown, in the embodiment of the present application, the UI interaction layer includes a DLL interface, system settings, and related configurations of the test sequence, and the related configurations of the test sequence include test sequence management and test sequence properties.
[0096] like Figure 5 As shown, in the embodiment of the present application, the test sequence attributes are divided into two parts: total attributes and Action (i.e., business algorithm) set. The total attributes include the model name of the device currently tested, the process name, the DLL path, the scan type, the regular expression for matching and filtering the scan information, the minimum version number of the software used, and other attribute values; the Action set includes all possible business algorithm Actions, such as Action1, Action2, ... as described in the figure, wherein each Action includes: the name of the DLL library used, the Action identifier, the Action description, the Action type, the Action enable (i.e., the enable status, including enabled and disabled), the input parameter set, the output parameter set, and the instrument library identifier used, etc. The Action type can be used to distinguish the execution conditions or other judgment conditions of the Action. For example, it can be set so that when there is an Action that fails to execute or outputs an abnormal result before the Action, the Action will no longer be executed. Among them, the input parameter set includes the input parameter name, input parameter value and input parameter description; the output parameter set includes the output parameter name, output parameter unit, upper limit and lower limit of the output parameter. After executing each business algorithm to obtain the output parameter, it can be determined whether it is an abnormal value based on the upper limit and lower limit of the output parameter. In some embodiments, if it is an abnormal value, the output parameter is set to a preset value such as 0, or it is marked as an abnormal value.
[0097] like Figure 6 As shown, the DLL interface in the embodiment of the present application includes: a log interface (i.e. the above-mentioned callback interface), a system information structure, an input parameter structure, an output parameter structure and a return value; wherein the log interface is generally a callback function calling method, which includes a log level enumeration, log content, window number, return information and return value, and is used to return intermediate business data in the execution process of the business algorithm through the log interface when executing the business function, and to add a log identifier.
[0098] like Figure 7 As shown, the system information structure is used to pass the information of the UI interactive interface (i.e., part of the input information of the DLL) to the DLL, which includes: the window number (i.e., the identifier of the currently included page window), the device identifier of the device to be tested, the language used by the software (used to select the log identifier), the name of the instrument library used, the instrument configuration string, the serial port configuration string, the line loss configuration string, the model parameter string, the total attributes of the test sequence, and the system configuration string, where the configuration information of the string can be in Json or other key-value pair formats to facilitate DLL acquisition. The system configuration string includes the log path, user role, MES configuration, and test sequence identifier.
[0099] like Figure 8 As shown, the input parameter structure is used to pass the information of the UI interaction interface (i.e., part of the input information of the DLL) to the DLL, which includes: the Action input parameter pointer array and other parameter pointer arrays converted from the input parameter set in the test sequence; usually, a larger Action input parameter pointer array length is set according to the size of the input parameter set; other parameter pointer arrays contain information such as the product substrate number, product software version, product serial number, handle, etc. that may be used by the Action. The array size is set according to the parameter values that may be used, and some can be reserved.
[0100] like Fig. 9 As shown, the output parameter structure is used to pass the DLL information (i.e., output information) to the UI interaction layer, which includes: the device identification of the device to be tested, the Action output parameter pointer array converted from the output parameter set in the test sequence, and other parameter pointer arrays; usually, a larger Action output parameter pointer array length is set according to the size of the output parameter set; other parameter pointer arrays include product substrate number, product software version, product serial number, handle, device information, tooling information, etc. The array size is set according to the parameter values that may be used, and some can be reserved.
[0101] like Fig.10As shown, in the embodiment of the present application, the test sequence management is managed according to the three levels of "machine model-process-test sequence". Before testing, the corresponding test sequence can be selected based on the model of the device to be tested and the process to be tested, and the subsequent test process can be executed.
[0102] It should be noted that the information included in the test sequence attributes, DLL interface and test sequence management in the embodiment of the present application may be part or all of the above information, and new information may be added thereto, and may be modified and configured based on business needs.
[0103] By combing through various business scenarios, the UI interaction layer in the embodiment of the present application currently provides 22 functional sub-modules as shown in the following table, which can be selected and used based on needs:
[0104] Table 1 Description of functional submodules
[0105]
[0106]
[0107]
[0108]
[0109] Fig.11 A test method provided in an embodiment of the present application is applied to a test system and specifically includes the following steps:
[0110] Step S1101, in response to an operation of testing the device to be tested, a target test sequence is determined from multiple test sequences, and a target algorithm set corresponding to the target test sequence is obtained; the target algorithm set includes an execution order of multiple business algorithms for executing a test process of the target test sequence, and algorithm identifiers of the multiple business algorithms and library identifiers of the dynamic link libraries DLL to which they belong;
[0111] In some embodiments, the UI interaction layer in the embodiments of the present application provides an operation interface, and the user can select a corresponding test sequence on the operation interface and trigger an instruction to test the device to be tested.
[0112] The UI interaction layer stores multiple test sequences, such as Fig.12 As shown, in the embodiment of the present application, the user can configure the information of the test sequence on the operation interface. For example, for any test sequence, configure its corresponding business algorithm Action, such as adding, editing or removing an Action, and for each Action, configure its corresponding input parameter set and output parameter set.
[0113] When responding to the user's operation instruction, the UI interaction layer locates the target test sequence based on the instruction, and determines the target total attribute corresponding to the target test sequence based on the pre-configured test sequence attributes corresponding to each test sequence, such as Figure 5 As shown, based on the configuration of the scanning type, it is determined whether the user is required to scan the device barcode to achieve device traceability. If necessary, the user is prompted to scan the code to obtain the corresponding scanning result, and the scanning result is checked and filtered based on the pre-configured matching and filtering regular expression. If it passes, the target algorithm set is determined from the test sequence attributes, and if it fails, an exception prompt is output; if the user is not required to perform a scanning operation, the user is prompted to enter the device identification of the device to be tested (or other information that can uniquely locate the device to be tested, which can be set based on needs), and the information entered by the user is checked and filtered based on the pre-configured matching and filtering regular expression. If it passes, the target algorithm set is determined from the test sequence attributes, and if it fails, an exception prompt is output.
[0114] In some embodiments, before determining whether the user needs to scan the device barcode based on the configuration of the scan type, the embodiment of the present application also includes: based on the DLL path in the target general attribute, obtaining the corresponding DLL from the area specified by the DLL path, and loading each DLL. In specific implementation, the DLL loading can be performed according to the DLL path and identifier. It should be noted that the DLL path included in the target general attribute records the paths of all DLLs corresponding to the target test sequence.
[0115] After loading each DLL, the embodiment of the present application further includes, based on the pre-stored DLL interface, determining the log interface corresponding to each loaded DLL path, that is, the address of the callback function. This is to facilitate the subsequent execution of at least one business algorithm in the execution order, when executing each business algorithm, the intermediate business data in the execution process of each business algorithm is output through the callback function corresponding to the target DLL.
[0116] After performing the above operations, perform a preliminary test sequence compliance check and platform version check, and prompt when non-conforming items are detected.
[0117] The target algorithm set includes the execution order of multiple business algorithms for executing the test process of the target test sequence, as well as the algorithm identifiers of the multiple business algorithms and the library identifiers of the dynamic link libraries DLL to which they belong, such as Figure 5 As shown, the above execution order is the arrangement order of the Actions in the Action set, that is, Action1, Action2, ... are executed in sequence.
[0118] Step S1102, execute at least one of the multiple business algorithms in sequence according to the execution order, obtain and store the corresponding test results; wherein, when executing each business algorithm, determine the target DLL corresponding to the library identifier to which each business algorithm belongs, obtain the business algorithm from the target DLL based on the algorithm identifier and execute it.
[0119] In a possible implementation, after determining the target DLL corresponding to the library identifier to which each of the business algorithms belongs, the method further includes: determining a calling interface corresponding to the target DLL, that is, Figure 6 The DLL interface is shown.
[0120] At this time, when executing the business algorithm, the input configuration items corresponding to the above business algorithm are obtained (i.e. Figure 5 The input parameter set in the above configuration item is obtained through the above calling interface; the obtained input parameters are used as input for executing the above business algorithm to execute the above business algorithm.
[0121] In a possible implementation, parameter structures of call interfaces corresponding to the DLLs to which the above-mentioned multiple business algorithms belong are pre-stored, such as Figure 6 The system information structure, input parameter structure and output parameter structure shown; before using the obtained input parameters as the above-mentioned input parameters, it also includes: modifying the format of the obtained input parameters according to the parameter structure of the above-mentioned calling interface (ie, the system information structure and the input parameter structure).
[0122] Specifically, Figure 6 As shown, the UI interaction layer predefines the system information structure and input parameter structure of each DLL interface, which defines the parameter structure of all input data that can be obtained through the DLL interface. When the input parameter set corresponding to the currently executed business algorithm is obtained through the calling interface corresponding to the target DLL, the parameter structure of each input parameter in the input parameter set is determined based on the predefined system information structure and input parameter structure, and the input parameters are adjusted based on the corresponding parameter structure, and then used as the input of the business algorithm after adjustment.
[0123] In some embodiments, the above input parameters include device information obtained from the device to be detected, information pre-stored in the UI interaction layer, and an instrument library identifier based on a business algorithm (such as Figure 5 At least one of the information obtained by the corresponding instrument equipment (as shown), and the output results of the business algorithm previously executed.
[0124] In a specific implementation, if the input parameters include device information obtained from the device to be detected, then based on Figure 3The DUT platform communication library DLL shown establishes a connection with the device to be tested and obtains information from the device to be tested; if the input parameters include information obtained based on the instrument device, then Figure 3 The instrument device communication class library DLL shown establishes a connection with the corresponding instrument device (the instrument device that matches the instrument library identifier of the business algorithm) and obtains it from the instrument device.
[0125] In one possible implementation, Figure 6 As shown, the UI interaction layer predefines the output parameter structure of each DLL interface, which defines the parameter structure of all output data that can be output through the DLL interface. After executing at least one business algorithm in sequence, when the corresponding test result is output through the DLL interface, the format of the test result is adjusted according to the output parameter structure corresponding to the DLL interface before output.
[0126] In some embodiments, the present application can also set whether to execute the target algorithm set in a loop, and the number of loop executions. If it is set not to be executed in a loop, the test will be terminated after at least one of the multiple business algorithms is executed in sequence, and the corresponding test results will be output; if it is executed in a loop, the process of executing at least one of the multiple business algorithms will be executed in sequence, and the test will be terminated after the corresponding number of loop executions, and the corresponding test results will be output.
[0127] In a possible implementation, the target algorithm set further includes the enabling states corresponding to the multiple service algorithms, and the enabling states include enabling and disabling. Figure 5 The Action shown is enabled. In the embodiment of the present application, before triggering the instruction to perform the test, the user can pre-set the enabling state of each Action in the Action set of the target test sequence, and select the Action to be executed based on the demand.
[0128] In a specific implementation, before executing at least one business algorithm in sequence according to the execution order, based on the enablement status corresponding to each of the multiple business algorithms, at least one of the above business algorithms with an enabled status is screened from the multiple business algorithms, and business algorithms with a disabled status do not need to be executed.
[0129] In a possible implementation, the target algorithm set also includes the algorithm types corresponding to the above multiple business algorithms. The execution conditions of the corresponding business algorithms can be configured in the above algorithm types. For example, if the previously executed business algorithm does not output an abnormal result, it is executed. Figure 5In the embodiment of the present application, before triggering the test instruction, the user can pre-set the Action type of each Action in the Action set of the target test sequence, and select whether to enable the Action type in the subsequent business algorithm execution process and the specific execution conditions based on the needs.
[0130] In the specific implementation, before executing each business algorithm, it is first determined whether to execute the business algorithm based on the execution conditions configured in the algorithm type. If the execution conditions are met, it is executed; if the execution conditions are not met, the execution test is stopped, or the business algorithm is skipped and the next business algorithm is executed.
[0131] In some embodiments, after the test results are sent to the UI interaction layer, the test results can be displayed on the operation interface, and a threshold judgment can be performed on the test results (i.e., compared with a preset threshold upper limit, lower limit or range) to determine whether the test results include abnormal data or whether the test results are abnormal.
[0132] In one possible implementation, Figure 3 The backend service interface layer shown includes multiple databases. When storing test results, first, based on the test sequence corresponding to the test results, a storage area corresponding to the test results is determined, and the test results are stored in the storage area.
[0133] It should be noted that since the test result saving operation is performed by the general test system, the storage format is unified, which is convenient for subsequent data analysis and statistics.
[0134] In some embodiments, after each test is completed, when storing the test results, the UI interaction layer can organize the test data and other business intermediate data, as well as the input data into a data packet, and then send it to the backend service interface layer for storage.
[0135] The embodiment of the present application provides a universal test system based on DLL, which realizes the separate development of business logic requirements, standard interfaces and UI interfaces, and improves development efficiency. The UI interface is responsible for executing the business algorithm in the DLL according to the test sequence in the standard format. The business algorithm in the DLL is a specific business logic algorithm. The two realize data interaction through a universal interface. After the execution is completed, the results and process information are returned to the UI interface for display and preservation. When there are new business requirements, only the business algorithm and test sequence of the DLL need to be updated or added to realize the development of the requirements, which greatly improves the development efficiency and software versatility.
[0136] like Fig.13As shown, the embodiment of the present application provides a universal testing system, including a UI interaction layer 1301, a business logic algorithm layer 1302, and a backend service interface layer 1303, wherein:
[0137] The UI interaction layer 1301 stores a plurality of test sequences, and is used to respond to the operation of testing the device to be tested, determine a target test sequence from the plurality of test sequences, and obtain a target algorithm set corresponding to the target test sequence, wherein the target algorithm set includes an execution order of a plurality of business algorithms for executing the test process of the target test sequence, and an algorithm identifier of each of the plurality of business algorithms and a library identifier of the dynamic link library DLL to which they belong; execute at least one of the plurality of business algorithms in sequence according to the execution order, obtain a corresponding test result, and send it to the backend service interface layer 1303; when executing each business algorithm, determine a target DLL corresponding to the library identifier to which each business algorithm belongs, and obtain the business algorithm from the target DLL of the business logic algorithm layer 1302 based on the algorithm identifier,
[0138] The business logic algorithm layer 1302 stores multiple DLLs and is used to send the business algorithm to the UI interaction layer so that the UI interaction layer executes the business algorithm;
[0139] The backend service interface layer 1303 is used to receive and store the test results sent by the UI interaction layer 1301.
[0140] In a possible implementation, after determining the target DLL corresponding to the library identifier to which each of the business algorithms belongs, the UI interaction layer 1301 is further configured to:
[0141] Determine the calling interface corresponding to the target DLL, and input the device information into the business logic algorithm layer 1302 through the calling interface;
[0142] The business logic algorithm layer 1302 is specifically used for:
[0143] Obtain the input configuration item corresponding to the above business algorithm, and obtain the input parameters corresponding to the above input configuration item through the above calling interface;
[0144] The obtained input parameters are used as input for executing the above business algorithm to execute the above business algorithm.
[0145] In a possible implementation, the UI interaction layer 1301 stores parameter structures of call interfaces corresponding to the DLLs to which the multiple business algorithms belong respectively;
[0146] The UI interaction layer 1301 is also used to modify the format of the acquired input parameters according to the parameter structure of the calling interface before inputting the input parameters into the business logic algorithm layer 1302 through the calling interface.
[0147] In a possible implementation, the UI interaction layer 1301 stores callback interfaces corresponding to the DLLs to which the multiple business algorithms belong;
[0148] When the UI interaction layer 1301 executes at least one business algorithm in sequence according to the execution order, it is also used to:
[0149] When each business algorithm is executed, the intermediate business data in the execution process of each business algorithm is output through the callback function corresponding to the above target DLL.
[0150] In a possible implementation, the backend service interface layer 1303 is specifically used to:
[0151] Receiving the test result sent by the UI interaction layer 1301 through the application interface called by the UI interaction layer 1301;
[0152] Based on the test sequence corresponding to the test result, a storage area corresponding to the test result is determined, and the test result is stored in the storage area.
[0153] In a possible implementation, the target algorithm set further includes the enabling states corresponding to the plurality of service algorithms; the enabling states include enabled and disabled;
[0154] The UI interaction layer 1301 is also used to: before executing at least one business algorithm in sequence according to the execution order, based on the enable states corresponding to the multiple business algorithms, select at least one business algorithm with an enabled state from the multiple business algorithms.
[0155] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0157] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A general test system, It is characterized in that include: A client storing a plurality of test sequences, for responding to an operation of testing a device to be tested, determining a target test sequence from the plurality of test sequences, and acquiring a target algorithm set corresponding to the target test sequence, wherein the target algorithm set includes an execution order of a plurality of business algorithms for executing a test process of the target test sequence, and an algorithm identifier of each of the plurality of business algorithms and a library identifier of a dynamic link library DLL to which they belong; Execute at least one of the multiple business algorithms in sequence according to the execution order, obtain corresponding test results, and send them to the server; wherein, when executing each business algorithm, determine the target DLL corresponding to the library identifier to which each business algorithm belongs, obtain the business algorithm from the target DLL based on the algorithm identifier, and execute it; The server is used to receive and store the test results sent by the client.
2. The universal test system according to claim 1, It is characterized in that After the client determines the target DLL corresponding to the library identifier to which each business algorithm belongs, the client is further used to: Determine a calling interface corresponding to the target DLL; The client is specifically used for: Obtaining an input configuration item corresponding to the business algorithm, and obtaining an input parameter corresponding to the input configuration item through the calling interface; The acquired input parameters are used as input for executing the business algorithm to execute the business algorithm.
3. The universal test system as claimed in claim 2, It is characterized in that The client stores parameter structures of call interfaces corresponding to the DLLs to which the multiple business algorithms belong respectively; The client is also used to modify the format of the acquired input parameters according to the parameter structure of the calling interface before using the acquired input parameters as input for executing the business algorithm.
4. The universal test system according to claim 1, It is characterized in that The client stores callback interfaces corresponding to the DLLs to which the multiple business algorithms belong; When the client sequentially executes at least one service algorithm according to the execution order, it is also used to: When each business algorithm is executed, the intermediate business data in the execution process of each business algorithm is output through the callback function corresponding to the target DLL.
5. The universal test system according to claim 1, It is characterized in that The server is specifically used for: Receiving the test result sent by the client through the application interface called by the client; Based on the test sequence corresponding to the test result, a storage area corresponding to the test result is determined, and the test result is stored in the storage area.
6. The universal test system according to any one of claims 1 to 5, It is characterized in that The target algorithm set also includes the enablement status corresponding to each of the multiple business algorithms; the enablement status includes enabled and disabled; The client is further used to: before sequentially executing at least one business algorithm in the execution order, based on the enablement states corresponding to each of the multiple business algorithms, select the at least one business algorithm whose enablement state is enabled from the multiple business algorithms.
7. A universal test system, It is characterized in that The system comprises: A user interface UI interaction layer stores a plurality of test sequences, and is used to respond to an operation of testing the device to be tested, determine a target test sequence from the plurality of test sequences, and obtain a target algorithm set corresponding to the target test sequence, wherein the target algorithm set includes an execution order of a plurality of business algorithms for executing the test process of the target test sequence, and an algorithm identifier of each of the plurality of business algorithms and a library identifier of a dynamic link library DLL to which they belong; at least one of the plurality of business algorithms is executed in sequence according to the execution order, a corresponding test result is obtained, and the result is sent to a back-end service interface layer; when executing each business algorithm, a target DLL corresponding to the library identifier to which each business algorithm belongs is determined, and the business algorithm is obtained from a target DLL of a business logic algorithm layer based on the algorithm identifier; The business logic algorithm layer stores multiple DLLs and is used to send the business algorithm to the UI interaction layer so that the UI interaction layer executes the business algorithm; The backend service interface layer is used to receive and store the test results sent by the UI interaction layer.
8. A testing method, It is characterized in that The method comprises: In response to an operation of testing the device to be tested, a target test sequence is determined from the multiple test sequences, and a target algorithm set corresponding to the target test sequence is obtained; the target algorithm set includes an execution order of multiple business algorithms for executing a test process of the target test sequence, and an algorithm identifier of each of the multiple business algorithms and a library identifier of a dynamic link library DLL to which they belong; Execute at least one of the multiple business algorithms in sequence according to the execution order, obtain and store corresponding test results; When executing each business algorithm, the target DLL corresponding to the library identifier to which each business algorithm belongs is determined, and the business algorithm is obtained from the target DLL based on the algorithm identifier and executed.
9. The method according to claim 8, It is characterized in that When the at least one business algorithm is executed in sequence according to the execution order, it also includes: When each business algorithm is executed, the intermediate business data in the execution process of each business algorithm is output through the pre-stored callback function corresponding to the target DLL.
10. The method according to claim 8 or 9, It is characterized in that The target algorithm set also includes the enablement status corresponding to each of the multiple business algorithms; the enablement status includes enabled and disabled; Before executing at least one business algorithm in sequence according to the execution order, the method further includes: Based on the enablement states corresponding to the multiple business algorithms, at least one business algorithm whose enablement state is enabled is screened from the multiple business algorithms.