Automated functional testing method, device, medium and equipment based on graphics engine

The graphics engine obtains building model parameters and interface information, and automatically generates test scripts, solving the problem of low functional testing efficiency in the existing technology and achieving efficient functional testing.

CN114579445BActive Publication Date: 2025-02-11SHENZHEN XUMI YUNTU SPACE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210206301.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-01
Publication Date
2025-02-11
Estimated Expiration
2042-03-01

AI Technical Summary

Technical Problem

In the prior art, the functional testing efficiency of building models is low, and it requires handwritten testing scripts and injected into testing software, which is time-consuming and inefficient.

Method used

The graphics engine obtains model parameters and interface information, and automatically generates test scripts to realize functional testing of specified areas in the building model.

Benefits of technology

It improves the efficiency of functional testing, can automatically generate test scripts based on different needs, and improves the coverage of test scenarios and the accuracy of tests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579445B_ABST
    Figure CN114579445B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide an automated functional testing method based on a graphics engine, an automated functional testing device based on a graphics engine, a computer-readable medium, and an electronic device, which relate to the field of computer technology. The above method includes: determining a target area from a preset building model according to a detected area selection operation; obtaining a first model parameter related to the target area from the preset building model through a graphics engine; obtaining first interface information corresponding to the target function from an interface information set corresponding to the graphics engine based on a target function trigger operation; generating a target function test script according to the first interface information and the first model parameter, and executing the target function test script. In this way, the acquisition of model parameters and interface information can be realized based on the graphics engine, and then a test script can be automatically generated based on different requirements to realize functional testing of a specified area in the building model, thereby improving the efficiency of functional testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an automated functional testing method based on a graphics engine, an automated functional testing device based on a graphics engine, a computer-readable medium, and an electronic device. Background Art

[0002] Architectural models are crucial for the architectural design and discussion stages. Generally speaking, relevant personnel can model in specific software according to their needs to obtain a visual architectural model. However, after completing the modeling, relevant personnel are usually required to write test scripts for different functions and inject them into the test software to achieve functional testing of the architectural model. This test efficiency is relatively low.

[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an automated functional testing method based on a graphics engine, an automated functional testing device based on a graphics engine, a computer-readable medium and an electronic device, which can realize the acquisition of model parameters and interface information based on the graphics engine, and then automatically generate test scripts based on different requirements to realize functional testing of specified areas in the building model, thereby improving the efficiency of functional testing.

[0005] A first aspect of an embodiment of the present application provides an automated functional testing method based on a graphics engine, comprising:

[0006] Determine a target area from a preset building model according to a detected area selection operation;

[0007] Acquire a first model parameter related to the target area from a preset building model through a graphics engine;

[0008] Acquire first interface information corresponding to the target function from an interface information set corresponding to the graphics engine based on a target function trigger operation;

[0009] A target function test script is generated according to the first interface information and the first model parameter, and the target function test script is executed.

[0010] In an exemplary embodiment of the present application, obtaining a first model parameter related to a target area from a preset building model by a graphics engine includes:

[0011] Obtain a set of model parameters corresponding to a preset building model through a graphics engine;

[0012] A first model parameter related to the target area is selected from the model parameters.

[0013] In an exemplary embodiment of the present application, the target function includes a highlighting function. After executing the target function test script, the method further includes:

[0014] Obtaining a first test result corresponding to the target function test script; wherein the first test result is used to characterize the prominent display of the target area in the preset building model;

[0015] The first test result is visualized.

[0016] In an exemplary embodiment of the present application, after determining the target area from the preset building model according to the detected area selection operation, the method further includes:

[0017] When a sectioning function triggering operation for the target area is detected, a second model parameter related to the target area is acquired from the model parameter set;

[0018] Acquire second interface information corresponding to the sectioning function from the interface information set;

[0019] A cutting function test script is generated according to the second interface information and the second model parameter, and the cutting function test script is executed to obtain a second test result; wherein the second test result includes a cutting plane of the target area at a preset angle.

[0020] In an exemplary embodiment of the present application, after determining the target area from the preset building model according to the detected area selection operation, the method further includes:

[0021] When a display function triggering operation for a specific room in the target area is detected, a third model parameter related to the specific room is obtained from the model parameter set;

[0022] Acquire third interface information corresponding to the room display function from the interface information set;

[0023] A room display function test script is generated according to the third interface information and the third model parameter, and the room display function test script is executed to obtain a third test result; wherein the third test result includes an image of the specific room and description information of the specific room.

[0024] In an exemplary embodiment of the present application, after determining the target area from the preset building model according to the detected area selection operation, the method further includes:

[0025] When a display function triggering operation for the relevant information of a specific room is detected, obtaining a fourth model parameter corresponding to the relevant information from the model parameter set;

[0026] Acquire fourth interface information corresponding to the information display function from the interface information set;

[0027] An information display function test script is generated according to the fourth interface information and the fourth model parameter, and the information display function test script is executed to obtain a fourth test result; wherein the fourth test result includes relevant information.

[0028] In an exemplary embodiment of the present application, after executing the information display function test script and obtaining the fourth test result, the method further includes:

[0029] Comparing the fourth test result with the pre-stored information associated with the specific room to obtain a comparison result;

[0030] If the comparison result is used to indicate that the fourth test result is consistent with the pre-stored information, it is determined that the information display function test is successful.

[0031] A second aspect of the embodiment of the present application provides an automated functional testing device based on a graphics engine, comprising:

[0032] An area selection unit, used for determining a target area from a preset building model according to a detected area selection operation;

[0033] A parameter acquisition unit, used for acquiring a first model parameter related to a target area from a preset building model through a graphic engine;

[0034] A script generating unit, configured to obtain first interface information corresponding to the target function from an interface information set corresponding to the graphics engine based on a target function triggering operation;

[0035] The testing unit is used to generate a target function testing script according to the first interface information and the first model parameter, and execute the target function testing script.

[0036] In an exemplary embodiment of the present application, the parameter acquisition unit acquires a first model parameter related to the target area from a preset building model through a graphic engine, including:

[0037] Obtain a set of model parameters corresponding to a preset building model through a graphics engine;

[0038] A first model parameter related to the target area is selected from the model parameters.

[0039] In an exemplary embodiment of the present application, the target function includes a highlighting function, and the above-mentioned device further includes:

[0040] A visualization display unit is used to obtain a first test result corresponding to a target function test script after the test unit executes the target function test script; wherein the first test result is used to characterize a prominent display of a target area in a preset building model; and to visualize the first test result.

[0041] In an exemplary embodiment of the present application, the parameter acquisition unit is further configured to acquire a second model parameter related to the target area from the model parameter set when a sectioning function triggering operation for the target area is detected after the area selection unit determines the target area from the preset building model according to the detected area selection operation;

[0042] The above device also includes:

[0043] An interface acquisition unit, used for acquiring second interface information corresponding to the sectioning function from the interface information set;

[0044] The testing unit is also used to generate a cutting function test script according to the second interface information and the second model parameters, and execute the cutting function test script to obtain a second test result; wherein the second test result includes a cutting plane of the target area at a preset angle.

[0045] In an exemplary embodiment of the present application, the parameter acquisition unit is further configured to, after the area selection unit determines the target area from the preset building model according to the detected area selection operation, when a display function triggering operation for a specific room in the target area is detected, acquire a third model parameter related to the specific room from the model parameter set;

[0046] The interface acquisition unit is further used to acquire third interface information corresponding to the room display function from the interface information set;

[0047] The testing unit is also used to generate a room display function test script according to the third interface information and the third model parameters, and execute the room display function test script to obtain a third test result; wherein the third test result includes an image of the specific room and description information of the specific room.

[0048] In an exemplary embodiment of the present application, the parameter acquisition unit is further configured to acquire a fourth model parameter corresponding to the relevant information from the model parameter set when a display function triggering operation for the relevant information of a specific room is detected after the area selection unit determines the target area from the preset building model according to the detected area selection operation;

[0049] The interface acquisition unit is further used to acquire fourth interface information corresponding to the information display function from the interface information set;

[0050] The testing unit is further used to generate an information display function test script according to the fourth interface information and the fourth model parameter, and execute the information display function test script to obtain a fourth test result; wherein the fourth test result includes relevant information.

[0051] In an exemplary embodiment of the present application, the above-mentioned device further includes:

[0052] The comparison unit is used to execute the information display function test script in the test unit, and after obtaining the fourth test result, compare the fourth test result with the pre-stored information associated with the specific room to obtain a comparison result; if the comparison result is used to characterize that the fourth test result is consistent with the pre-stored information, it is determined that the information display function test is successful.

[0053] According to a third aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the automated functional testing method based on a graphics engine as described in the first aspect of the above embodiment is implemented.

[0054] According to the fourth aspect of the embodiments of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the automated functional testing method based on the graphics engine as described in the first aspect of the above embodiments.

[0055] According to a fifth aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.

[0056] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0057] In the technical solutions provided in some embodiments of the present application, the target area can be determined from the preset building model according to the detected area selection operation; the first model parameter related to the target area can be obtained from the preset building model through the graphics engine; the first interface information corresponding to the target function can be obtained from the interface information set corresponding to the graphics engine based on the target function trigger operation; the target function test script can be generated according to the first interface information and the first model parameter, and the target function test script can be executed. In this way, the acquisition of model parameters and interface information can be realized based on the graphics engine, and then the test script can be automatically generated based on different requirements to realize functional testing of the specified area in the building model, thereby improving the efficiency of functional testing. In addition, based on the test scripts automatically generated for different functions, the coverage of test scenarios can be improved and the accuracy of functional testing can be improved.

[0058] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0060] Figure 1 A schematic diagram schematically shows an exemplary system architecture of an automated functional testing method and device based on a graphics engine to which an embodiment of the present disclosure can be applied;

[0061] Figure 2 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown;

[0062] Figure 3 A flowchart of an automated functional testing method based on a graphics engine according to an embodiment of the present disclosure is schematically shown;

[0063] Figure 4 A schematic diagram of a first test result according to an embodiment of the present disclosure is schematically shown;

[0064] Figure 5 A schematic diagram of a second test result according to an embodiment of the present disclosure is schematically shown;

[0065] Figure 6 A third test result diagram according to an embodiment of the present disclosure is schematically shown;

[0066] Figure 7 A schematic diagram of a test result page according to an embodiment of the present disclosure is schematically shown;

[0067] Figure 8 A flowchart of an automated functional testing method based on a graphics engine according to another embodiment of the present disclosure is schematically shown;

[0068] Fig. 9 The structure block diagram of an automatic functional testing device based on a graphics engine according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0069] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0070] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0071] Figure 1 The following is a schematic diagram schematically showing an exemplary system architecture of an automated functional testing method and apparatus based on a graphics engine to which the embodiments of the present disclosure can be applied.

[0072] like Figure 1As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with display screens, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1 The number of terminal devices, networks and servers in the example are only illustrative. Any number of terminal devices, networks and servers may be provided as required. For example, the server 105 may be a server cluster composed of multiple servers. For example, the server 105 may execute: determining a target area from a preset building model according to a detected area selection operation; obtaining a first model parameter related to the target area from the preset building model through a graphics engine; obtaining first interface information corresponding to a target function from an interface information set corresponding to the graphics engine based on a target function trigger operation; generating a target function test script according to the first interface information and the first model parameter, and executing the target function test script.

[0073] Figure 2 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown.

[0074] It should be noted that Figure 2 The computer system 200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0075] like Figure 2 As shown, the computer system 200 includes a central processing unit (CPU) 201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 202 or the program loaded from the storage part 208 to the random access memory (RAM) 203. In the (RAM) 203, various programs and data required for system operation are also stored. The (CPU) 201, the (ROM) 202 and the (RAM) 203 are connected to each other through a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.

[0076] The following components are connected to the (I / O) interface 205: an input section 206 including a keyboard, a mouse, etc.; an output section 207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 208 including a hard disk, etc.; and a communication section 209 including a network interface card such as a LAN card, a modem, etc. The communication section 209 performs communication processing via a network such as the Internet. A drive 210 is also connected to the (I / O) interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 210 as needed, so that a computer program read therefrom is installed into the storage section 208 as needed.

[0077] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 209, and / or installed from a removable medium 211. When the computer program is executed by the central processing unit (CPU) 201, various functions defined in the method and apparatus of the present application are executed.

[0078] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0079] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0080] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0081] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being installed in the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiment. For example, the electronic device may implement the following method. Figure 3 The various steps shown, etc.

[0082] This example embodiment provides an automated functional testing method based on a graphics engine. Figure 3 As shown, the automated functional testing method based on the graphics engine may include the following steps S310 to S340, specifically:

[0083] Step S310: determining a target area from a preset building model according to the detected area selection operation.

[0084] Step S320: obtaining first model parameters related to the target area from a preset building model through a graphics engine.

[0085] Step S330: acquiring first interface information corresponding to the target function from the interface information set corresponding to the graphics engine based on the target function trigger operation.

[0086] Step S340: Generate a target function test script according to the first interface information and the first model parameter, and execute the target function test script.

[0087] Implementation Figure 3 The automated functional testing method based on the graphics engine shown in the figure can obtain model parameters and interface information based on the graphics engine, and then can automatically generate test scripts based on different requirements to implement functional testing of designated areas in the building model, thereby improving the efficiency of functional testing. In addition, based on the test scripts automatically generated for different functions, the coverage of test scenarios can be improved, thereby improving the accuracy of functional testing.

[0088] Next, the above steps of this exemplary embodiment are described in more detail.

[0089] In step S310, a target area is determined from a preset building model according to the detected area selection operation.

[0090] Specifically, before determining the target area from the preset building model according to the detected area selection operation, the above method may also include: obtaining a preset building model from multiple building models according to the model selection operation, and displaying the preset building model on a user interface, and then detecting the area selection operation of the user on the preset building model; wherein the user interface may be a browser interface or a client interface, which is not limited in the embodiments of the present application.

[0091] In addition, the preset building model can be built based on the Revit model, and the preset building model can be represented as a Revit file; wherein Revit is specially built for building information modeling, which can help architectural designers design, build and maintain buildings with better quality and higher energy efficiency. In addition, the area selection operation can be a click operation, a touch screen operation, a voice control operation, a gesture control operation, etc., which is not limited in the embodiments of the present application. In addition, the target area can be a part of the preset building model, for example, the target area can be a floor, a room or a unit type in the preset building model.

[0092] In step S320, a first model parameter related to the target area is obtained from a preset building model through a graphic engine.

[0093] Specifically, the graphics engine may be OGRE, OpenGVS, Vtree, OSG, etc., which is not limited in the embodiments of the present application. The first model parameter related to the target area may be used to describe the target area.

[0094] As an optional embodiment, obtaining a first model parameter related to the target area from a preset building model through a graphics engine includes: obtaining a model parameter set corresponding to the preset building model through a graphics engine; and selecting a first model parameter related to the target area from the model parameters.

[0095] Specifically, the model parameter set corresponding to the preset building model may include at least the above-mentioned first model parameter and the following second model parameter, third model parameter and fourth model parameter. The first model parameter may include: floor (levelId), highlight color (color), transparency (opacity), etc. Each parameter in the first model parameter can be expressed in any form such as characters, numbers, characters, text, etc., and the embodiments of the present application are not limited thereto.

[0096] It can be seen that by implementing this optional embodiment, the relevant parameters of the preset building model to be tested can be obtained through the graphics engine, and then based on the interface information set corresponding to the graphics engine, automated functional testing of the building model can be achieved, thereby reducing the cost of manual testing and improving the efficiency of functional testing.

[0097] In step S330, first interface information corresponding to the target function is obtained from an interface information set corresponding to the graphics engine based on the target function trigger operation.

[0098] Specifically, the target function trigger operation can be a click operation, a touch screen operation, a voice control operation, a gesture control operation, etc., which is not limited in the embodiments of the present application. In addition to being a highlight display function, the target function can also be a stroke function, an area color change function, etc., which is not limited in the embodiments of the present application. In addition, the first interface information corresponding to the target function can be expressed as ".highlightFloorById()". The interface information set corresponding to the graphics engine can be understood as the interface information set corresponding to the function data package (SDK) in the graphics engine; wherein the function data package (SDK) contains a variety of function modules, and each function module corresponds to an interface information.

[0099] In step S340, a target function test script is generated according to the first interface information and the first model parameter, and the target function test script is executed.

[0100] Specifically, a method of generating a target function test script according to the first interface information and the first model parameter may be: encapsulating the first interface information and the first model parameter into a container to obtain the target function test script.

[0101] As an optional embodiment, the target function includes a highlighting function. After executing the target function test script, the above method also includes: obtaining a first test result corresponding to the target function test script; wherein the first test result is used to characterize the highlighting of the target area in the preset building model; and visually displaying the first test result.

[0102] Specifically, the first test result can be expressed in any form such as text, terms, numerical values, character strings, etc., which is not limited in the embodiments of the present application. In addition, the first test result can be visualized in a manner of highlighting the target area in the preset building model displayed on the user interface according to the first test result, wherein the highlighting method can be highlighting, stroking, etc. For details, please refer to Figure 4 The first test result can be displayed as a preset building model image that highlights the target area (eg, XX floor).

[0103] In addition, the above method may also include: comparing the first test result with a preset building model image of a preset highlighted target area; if the comparison result indicates that the first test result is consistent with the preset building model image of the highlighted target area, then determining that the highlight function test is successful.

[0104] It can be seen that the implementation of this optional embodiment can achieve a visual display of the test results and improve the intuitiveness of the test results.

[0105] As an optional embodiment, after determining the target area from the preset building model according to the detected area selection operation, the above method also includes: when a cutting function trigger operation for the target area is detected, obtaining a second model parameter related to the target area from the model parameter set; obtaining second interface information corresponding to the cutting function from the interface information set; generating a cutting function test script according to the second interface information and the second model parameter, and executing the cutting function test script to obtain a second test result; wherein the second test result includes a cutting plane of the target area at a preset angle.

[0106] Specifically, the sectioning function trigger operation can be a click operation, a touch screen operation, a voice control operation, a gesture control operation, etc., which is not limited in the embodiments of the present application. The second model parameters related to the target area may include: floor (levelId), maximum height (maxHeight), minimum height (minHeight), space color (spaceColor), highlight color (highlightColor), whether the highlight can be canceled (isCancel), callback information (cb(linkData){}). In addition, the second interface information can be expressed as ".enterFloorTopViewById()". The second test result can be expressed in any form such as text, entry, numerical value, string, etc., which is not limited in the embodiments of the present application.

[0107] The method of generating the sectioning function test script according to the second interface information and the second model parameter can be: encapsulating the second interface information and the second model parameter into a container to obtain the sectioning function test script. Furthermore, after executing the sectioning function test script and obtaining the second test result, the method can also include: visually displaying the second test result. For details, please refer to Figure 5 The second test result can be displayed as a cross-section of the target area at a preset angle (eg, a top view).

[0108] In addition, the above method may further include: comparing the second test result with the cross-sectional plane of the preset target area at a preset angle; if the comparison result indicates that the second test result is consistent with the cross-sectional plane of the target area at the preset angle, the cross-sectional function test is determined to be successful.

[0109] It can be seen that the implementation of this optional embodiment can realize the automated testing of the sectioning function, which is beneficial to improving the efficiency of automated testing for building models.

[0110] As an optional embodiment, after determining the target area from a preset building model according to the detected area selection operation, the above method also includes: when a display function triggering operation for a specific room in the target area is detected, obtaining a third model parameter related to the specific room from a model parameter set; obtaining third interface information corresponding to the room display function from an interface information set; generating a room display function test script according to the third interface information and the third model parameter, and executing the room display function test script to obtain a third test result; wherein the third test result includes an image of the specific room and description information of the specific room.

[0111] Specifically, the display function triggering operation may be a click operation, a touch screen operation, a voice control operation, a gesture control operation, etc., which is not limited in the embodiments of the present application. The third model parameters related to the specific room may include: information about the floor where the specific room is located, description information of each area in the specific room, coordinates of the specific room, etc. The third test result may be expressed in any form such as text, entry, value, character string, etc., which is not limited in the embodiments of the present application.

[0112] Among them, the method of generating the sectioning function test script according to the third interface information and the third model parameter can be: encapsulating the third interface information and the third model parameter into a container to obtain the sectioning function test script. Further, after obtaining the third test result, the room display function test script can also include: visually displaying the third test result. For details, please refer to Figure 6 The third test result can be displayed as a specific room image containing description information, wherein the description information may include: study, indoor corridor, open balcony, indoor stair door, sky, terrace, awning, second bedroom, bay window, second bathroom, etc., which is not limited in the embodiment of the present application. In addition, Figure 6 The numbers 2 and 3 are used to distinguish different rooms on the same floor.

[0113] In addition, the above method may further include: comparing the third test result with a preset specific room image containing descriptive information; if the comparison result indicates that the third test result is consistent with the specific room image containing descriptive information, the room display function test is determined to be successful.

[0114] It can be seen that the implementation of this optional embodiment can realize the automated testing of the room display function, which is conducive to improving the efficiency of automated testing for the building model.

[0115] As an optional embodiment, after determining the target area from the preset building model according to the detected area selection operation, the above method also includes: when a display function triggering operation for relevant information of a specific room is detected, obtaining a fourth model parameter corresponding to the relevant information from the model parameter set; obtaining fourth interface information corresponding to the information display function from the interface information set; generating an information display function test script according to the fourth interface information and the fourth model parameter, and executing the information display function test script to obtain a fourth test result; wherein the fourth test result includes relevant information.

[0116] Specifically, the fourth model parameters related to the target area may include: the coordinates of the adjacent rooms of the specific room, the adjacent room types, etc. In addition, the fourth interface information may be represented as ".Space.getSpaceLinkData()". The fourth test result may be represented in any form such as text, terms, values, strings, etc., which is not limited in the embodiments of the present application.

[0117] The method of generating the information display function test script according to the fourth interface information and the fourth model parameter can be: encapsulating the fourth interface information and the fourth model parameter into a container to obtain the information display function test script. Furthermore, after executing the information display function test script and obtaining the fourth test result, the method can also include: visually displaying the fourth test result.

[0118] It can be seen that the implementation of this optional embodiment can realize the automated testing of the information display function, which is beneficial to improving the efficiency of automated testing for building models.

[0119] As an optional embodiment, after executing the information display function test script and obtaining the fourth test result, the above method also includes: comparing the fourth test result with the pre-stored information associated with the specific room to obtain a comparison result; if the comparison result is used to characterize that the fourth test result and the pre-stored information are consistent, then it is determined that the information display function test is successful.

[0120] The pre-stored information may be information of other rooms that are pre-set and associated with the specific room.

[0121] Specifically, the above method may also include: obtaining test results for multiple functions to obtain a test result set; generating a test result page for representing the test result set, and the schematic diagram of the test result page can be referred to in Figure 7 ; Wherein, the test result set may include at least the aforementioned first test result, second test result, third test result and fourth test result.

[0122] Specifically, in Figure 7 In the test result page shown, each row represents a function to be tested. Figure 7 A “check mark” is marked in front of each row of the to-be-tested function shown in the figure. The “check mark” may indicate that the to-be-tested function has been successfully tested, that is, the test result corresponding to the to-be-tested function represents success.

[0123] For example, the functions to be tested may be: login, model loading successfully, highlight single layer, click blank to cancel highlight, highlight single layer, cancel highlight using ID method, double-click to enter slice, return to panorama from slice mode, slice, switch directly from three-layer slice to two-layer slice, highlight all room text, highlight apartment type, display all apartment numbers on the current floor, cb click callback, get apartment center point, delete all room names, click on apartment window picking mode, get selected type, switch to apartment picking mode, delete all rooms and apartment names, return to panorama from slice mode, get all room associated data.

[0124] It can be seen that the implementation of this optional embodiment can realize the result determination of the function test, and the result determination can indicate whether the function is tested successfully, thereby further improving the efficiency of the automated test for the building model.

[0125] See also Figure 8 , Figure 8 The flowchart of another embodiment of the automatic functional testing method based on the graphics engine is schematically shown. Figure 8 As shown, the automated functional testing method based on the graphics engine includes: steps S810 to S890.

[0126] Step S810: Determine the target area from the preset building model according to the detected area selection operation, and obtain the model parameter set corresponding to the preset building model through the graphics engine, select the first model parameter related to the target area from the model parameters, and then obtain the first interface information corresponding to the target function from the interface information set corresponding to the graphics engine based on the highlight function trigger operation, and then generate a highlight function test script according to the first interface information and the first model parameter, and execute the highlight function test script to obtain a first test result.

[0127] Step S820: Visually display the first test result.

[0128] Step S830: When a cutting function trigger operation for the target area is detected, a second model parameter related to the target area is obtained from the model parameter set, and second interface information corresponding to the cutting function is obtained from the interface information set, and then a cutting function test script is generated according to the second interface information and the second model parameter, and the cutting function test script is executed to obtain a second test result; wherein the second test result includes a cutting plane of the target area at a preset angle.

[0129] Step S840: Visually display the second test result.

[0130] Step S850: When a display function trigger operation for a specific room in the target area is detected, a third model parameter related to the specific room is obtained from the model parameter set, and third interface information corresponding to the room display function is obtained from the interface information set, and then a room display function test script is generated according to the third interface information and the third model parameter, and the room display function test script is executed to obtain a third test result; wherein the third test result includes an image of the specific room and description information of the specific room.

[0131] Step S860: Visually display the third test result.

[0132] Step S870: When a display function trigger operation for relevant information of a specific room is detected, a fourth model parameter corresponding to the relevant information is obtained from the model parameter set, and fourth interface information corresponding to the information display function is obtained from the interface information set, and then an information display function test script is generated according to the fourth interface information and the fourth model parameter, and the information display function test script is executed to obtain a fourth test result; wherein the fourth test result includes relevant information.

[0133] Step S880: Compare the fourth test result with the pre-stored information associated with the specific room to obtain a comparison result; if the comparison result is used to indicate that the fourth test result is consistent with the pre-stored information, it is determined that the information display function test is successful.

[0134] Step S890: Visually display the fourth test result.

[0135] It should be noted that steps S810 to S890 are Figure 3 The steps and their embodiments shown correspond to each other. For the specific implementation of steps S810 to S890, please refer to Figure 3 The steps and embodiments shown are not described in detail here.

[0136] It can be seen that implementation Figure 8 The method shown in the figure can obtain model parameters and interface information based on the graphics engine, and then can automatically generate test scripts based on different requirements to implement functional testing of specified areas in the building model, thereby improving the efficiency of functional testing. In addition, based on the test scripts automatically generated for different functions, the coverage of test scenarios can be improved, thereby improving the accuracy of functional testing.

[0137] Furthermore, in this example implementation, an automated functional testing device based on a graphics engine is also provided. Fig. 9As shown, the graphic engine-based automated functional testing device 900 may include:

[0138] The area selection unit 901 is used to determine the target area from the preset building model according to the detected area selection operation;

[0139] A parameter acquisition unit 902, configured to acquire a first model parameter related to a target area from a preset building model through a graphic engine;

[0140] The script generating unit 903 is used to obtain the first interface information corresponding to the target function from the interface information set corresponding to the graphics engine based on the target function trigger operation;

[0141] The testing unit 904 is used to generate a target function test script according to the first interface information and the first model parameter, and execute the target function test script.

[0142] It can be seen that implementation Fig. 9 The device shown can obtain model parameters and interface information based on a graphics engine, and can then automatically generate test scripts based on different requirements to perform functional tests on designated areas in a building model, thereby improving the efficiency of functional testing. In addition, based on the test scripts automatically generated for different functions, the coverage of test scenarios can be improved, thereby improving the accuracy of functional testing.

[0143] In an exemplary embodiment of the present application, the parameter acquisition unit 902 acquires the first model parameter related to the target area from the preset building model through the graphic engine, including:

[0144] Obtain a set of model parameters corresponding to a preset building model through a graphics engine;

[0145] A first model parameter related to the target area is selected from the model parameters.

[0146] It can be seen that by implementing this optional embodiment, the relevant parameters of the preset building model to be tested can be obtained through the graphics engine, and then based on the interface information set corresponding to the graphics engine, automated functional testing of the building model can be achieved, thereby reducing the cost of manual testing and improving the efficiency of functional testing.

[0147] In an exemplary embodiment of the present application, the target function includes a highlighting function, and the above-mentioned device further includes:

[0148] A visualization display unit is used to obtain a first test result corresponding to a target function test script after the test unit 904 executes the target function test script; wherein the first test result is used to characterize a prominent display of a target area in a preset building model; and to visualize the first test result.

[0149] It can be seen that the implementation of this optional embodiment can achieve a visual display of the test results and improve the intuitiveness of the test results.

[0150] In an exemplary embodiment of the present application, the parameter acquisition unit 902 is further configured to acquire a second model parameter related to the target area from the model parameter set when a sectioning function triggering operation for the target area is detected after the area selection unit 901 determines the target area from the preset building model according to the detected area selection operation;

[0151] The above device also includes:

[0152] An interface acquisition unit, used for acquiring second interface information corresponding to the sectioning function from the interface information set;

[0153] The testing unit 904 is further used to generate a cutting function test script according to the second interface information and the second model parameters, and execute the cutting function test script to obtain a second test result; wherein the second test result includes a cutting plane of the target area at a preset angle.

[0154] It can be seen that the implementation of this optional embodiment can realize the automated testing of the sectioning function, which is beneficial to improving the efficiency of automated testing for building models.

[0155] In an exemplary embodiment of the present application, the parameter acquisition unit 902 is further configured to, after the region selection unit 901 determines the target region from the preset building model according to the detected region selection operation, acquire a third model parameter related to the specific room from the model parameter set when a display function triggering operation for a specific room in the target region is detected;

[0156] The interface acquisition unit is further used to acquire third interface information corresponding to the room display function from the interface information set;

[0157] The testing unit 904 is also used to generate a room display function test script according to the third interface information and the third model parameters, and execute the room display function test script to obtain a third test result; wherein the third test result includes an image of the specific room and description information of the specific room.

[0158] It can be seen that the implementation of this optional embodiment can realize the automated testing of the room display function, which is conducive to improving the efficiency of automated testing for the building model.

[0159] In an exemplary embodiment of the present application, the parameter acquisition unit 902 is further configured to acquire a fourth model parameter corresponding to the relevant information from the model parameter set when a display function triggering operation for the relevant information of a specific room is detected after the area selection unit 901 determines the target area from the preset building model according to the detected area selection operation;

[0160] The interface acquisition unit is further used to acquire fourth interface information corresponding to the information display function from the interface information set;

[0161] The testing unit 904 is further used to generate an information display function test script according to the fourth interface information and the fourth model parameter, and execute the information display function test script to obtain a fourth test result; wherein the fourth test result includes relevant information.

[0162] It can be seen that the implementation of this optional embodiment can realize the automated testing of the information display function, which is beneficial to improving the efficiency of automated testing for building models.

[0163] In an exemplary embodiment of the present application, the above-mentioned device further includes:

[0164] The comparison unit is used to execute the information display function test script in the test unit 904, and after obtaining the fourth test result, compare the fourth test result with the pre-stored information associated with the specific room to obtain a comparison result; if the comparison result is used to characterize that the fourth test result and the pre-stored information are consistent, it is determined that the information display function test is successful.

[0165] It can be seen that the implementation of this optional embodiment can realize the result determination of the function test, and the result determination can indicate whether the function is tested successfully, thereby further improving the efficiency of the automated test for the building model.

[0166] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0167] Since the various functional modules of the automated functional testing device based on a graphics engine in the example embodiment of the present disclosure correspond to the steps of the example embodiment of the automated functional testing method based on a graphics engine described above, for details not disclosed in the embodiment of the device of the present disclosure, please refer to the embodiment of the automated functional testing method based on a graphics engine described above in the present disclosure.

[0168] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0169] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. An automated functional testing method based on a graphics engine, characterized in that: include: Determine a target area from a preset building model according to a detected area selection operation; Acquire a first model parameter related to the target area from the preset building model through the graphic engine; wherein the first model parameter includes a floor; Acquire first interface information corresponding to the target function from the interface information set corresponding to the graphics engine based on the target function trigger operation; Generate a target function test script for the target area according to the first interface information and the first model parameter, and execute the target function test script; The step of generating a target function test script for the target area according to the first interface information and the first model parameter includes: Encapsulating the first interface information and the first model parameter into a container to obtain a target function test script for the target area; After determining the target area from the preset building model according to the detected area selection operation, the method further includes: When a display function triggering operation for a specific room in the target area is detected, obtaining a third model parameter related to the specific room from the model parameter set corresponding to the preset building model; Acquire third interface information corresponding to the room display function from the interface information set; Generate a room display function test script for the specific room according to the third interface information and the third model parameter, and execute the room display function test script to obtain a third test result; wherein the third test result includes an image of the specific room and description information of the specific room; When a display function triggering operation for the relevant information of the specific room is detected, acquiring a fourth model parameter corresponding to the relevant information from the model parameter set; Acquire fourth interface information corresponding to the information display function from the interface information set; generating an information display function test script for the relevant information according to the fourth interface information and the fourth model parameter, and executing the information display function test script to obtain a fourth test result; wherein the fourth test result includes the relevant information; Comparing the fourth test result with the pre-stored information associated with the specific room to obtain a comparison result; If the comparison result is used to indicate that the fourth test result is consistent with the pre-stored information, it is determined that the information display function test is successful.

2. The method according to claim 1, characterized in that Acquiring a first model parameter related to the target area from the preset building model by the graphic engine includes: Acquire a set of model parameters corresponding to a preset building model through the graphics engine; A first model parameter related to the target area is selected from the model parameters.

3. The method according to claim 1, characterized in that The target function includes a highlighting function. After executing the target function test script, the method further includes: Obtaining a first test result corresponding to the target function test script; wherein the first test result is used to characterize the prominent display of the target area in the preset building model; The first test result is visually displayed.

4. The method according to claim 2, characterized in that: After determining the target area from the preset building model according to the detected area selection operation, the method further includes: When a sectioning function triggering operation for the target area is detected, obtaining a second model parameter related to the target area from the model parameter set; Acquire second interface information corresponding to the sectioning function from the interface information set; A cutting function test script for the target area is generated according to the second interface information and the second model parameters, and the cutting function test script is executed to obtain a second test result; wherein the second test result includes a cutting plane of the target area at a preset angle.

5. An automated functional testing device based on a graphics engine, characterized in that: include: An area selection unit, used for determining a target area from a preset building model according to a detected area selection operation; A parameter acquisition unit, configured to acquire a first model parameter related to the target area from the preset building model through the graphic engine; wherein the first model parameter includes a floor; A script generating unit, configured to obtain first interface information corresponding to a target function from an interface information set corresponding to the graphics engine based on a target function triggering operation; A testing unit, configured to generate a target function test script according to the first interface information and the first model parameter, and execute the target function test script; The test unit generates a target function test script for the target area according to the first interface information and the first model parameter, including: Encapsulating the first interface information and the first model parameter into a container to obtain a target function test script for the target area; Wherein, the device further comprises: The parameter acquisition unit is further configured to, after the region selection unit determines the target region from the preset building model according to the detected region selection operation, acquire, when a display function triggering operation for a specific room in the target region is detected, a third model parameter related to the specific room from the model parameter set corresponding to the preset building model; The interface acquisition unit is further used to acquire third interface information corresponding to the room display function from the interface information set; The testing unit is further configured to generate a room display function test script for the specific room according to the third interface information and the third model parameter, and execute the room display function test script to obtain a third test result; wherein the third test result includes an image of the specific room and description information of the specific room; The parameter acquisition unit is further configured to acquire, when a display function triggering operation for the relevant information of the specific room is detected, a fourth model parameter corresponding to the relevant information from the model parameter set; The interface acquisition unit is further used to acquire fourth interface information corresponding to the information display function from the interface information set; The testing unit is further configured to generate an information display function test script for the relevant information according to the fourth interface information and the fourth model parameter, and execute the information display function test script to obtain a fourth test result; wherein the fourth test result includes the relevant information; A comparing unit is used to compare the fourth test result with the pre-stored information associated with the specific room to obtain a comparison result; if the comparison result is used to indicate that the fourth test result is consistent with the pre-stored information, it is determined that the information display function test is successful.

6. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the automated functional testing method based on a graphics engine as described in any one of claims 1 to 4 is implemented.

7. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the automated functional testing method based on a graphics engine as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • System security detection method and device, electronic equipment, medium and product

    CN113688358A