CN114579445A - Graphic engine based automatic function testing method, device, medium and equipment - Google Patents

Graphic engine based automatic function testing method, device, medium and equipment Download PDF

Info

Publication number
CN114579445A
CN114579445A CN202210206301.4A CN202210206301A CN114579445A CN 114579445 A CN114579445 A CN 114579445A CN 202210206301 A CN202210206301 A CN 202210206301A CN 114579445 A CN114579445 A CN 114579445A
Authority
CN
China
Prior art keywords
function
interface information
target
model
target area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210206301.4A
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xumi Yuntu Space Technology Co Ltd
Original Assignee
Shenzhen Xumi Yuntu Space Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xumi Yuntu Space Technology Co Ltd filed Critical Shenzhen Xumi Yuntu Space Technology Co Ltd
Priority to CN202210206301.4A priority Critical patent/CN114579445A/en
Publication of CN114579445A publication Critical patent/CN114579445A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides an automatic function testing method based on a graphic engine, an automatic function testing device based on the graphic engine, a computer readable medium and electronic equipment, and relates to the technical field of computers, wherein the method comprises the following steps: determining a target area from a preset building model according to the detected area selection operation; acquiring a first model parameter related to a target area from a preset building model through a graphic engine; acquiring first interface information corresponding to a target function from an interface information set corresponding to a graphic engine based on target function trigger operation; and generating a target function test script according to the first interface information and the first model parameter, and executing the target function test script. Therefore, model parameters and interface information can be acquired based on the graphic engine, and then the test script can be automatically generated based on different requirements, so that the function test of the specified area in the building model is realized, and the function test efficiency is improved.

Description

Automatic function testing method, device, medium and equipment based on graphic engine
Technical Field
The present application relates to the field of computer technologies, and in particular, to an automated function testing method based on a graphics engine, an automated function testing apparatus based on a graphics engine, a computer readable medium, and an electronic device.
Background
The building model is important for the building design stage and the building discussion stage, and generally, related personnel can model in specific software according to requirements so as to obtain a visualized building model. However, after modeling is completed, related personnel are usually required to write test scripts for different functions and inject test software to realize functional testing on the building model, and the testing efficiency is low.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
An object of the embodiments of the present application is to provide an automated function testing method based on a graphic engine, an automated function testing apparatus based on a graphic engine, a computer readable medium, and an electronic device, which can achieve obtaining of model parameters and interface information based on a graphic engine, and further can automatically generate a test script based on different requirements, so as to achieve function testing of a specified area in a building model, and improve function testing efficiency.
In a first aspect of the embodiments of the present application, an automated functional testing method based on a graphics engine is provided, including:
determining a target area from a preset building model according to the detected area selection operation;
acquiring a first model parameter related to a target area from a preset building model through a graphic engine;
acquiring first interface information corresponding to a target function from an interface information set corresponding to a graphic engine based on target function trigger operation;
and 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 an exemplary embodiment of the present application, obtaining, by a graphics engine, a first model parameter associated with a target area from a preset building model includes:
obtaining a model parameter set corresponding to a preset building model through a graphic engine;
a first model parameter associated with the target area is selected from the model parameters.
In an exemplary embodiment of the present application, the target function includes a highlight function, and after the target function test script is executed, the method further includes:
acquiring a first test result corresponding to the target function test script; the first test result is used for representing the prominent display of a target area in a preset building model;
and visually displaying the first test result.
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:
when the sectioning function triggering operation aiming at the target area is detected, acquiring a second model parameter related to the target area from the model parameter set;
acquiring second interface information corresponding to the sectioning function from the interface information set;
generating a sectioning function test script according to the second interface information and the second model parameter, and executing the sectioning function test script to obtain a second test result; wherein the second test result comprises a section of the target region at a preset angle.
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:
when a display function triggering operation aiming at a specific room in the target area is detected, acquiring a third model parameter related to the specific room from the model parameter set;
acquiring third interface information corresponding to the room display function from the 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 comprises an image of the specific room and description information of the specific room.
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:
when the display function triggering operation of the related information of the specific room is detected, acquiring a fourth model parameter corresponding to the related information from the model parameter set;
acquiring 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 the relevant information.
In an exemplary embodiment of the present application, after the information exposure function test script is executed to obtain the fourth test result, the method further includes:
comparing the fourth test result with pre-stored information associated with the specific room to obtain a comparison result;
and if the comparison result is used for representing that the fourth test result is consistent with the pre-stored information, judging that the information display function test is successful.
In a second aspect of the embodiments of the present application, an automatic function testing apparatus based on a graphics engine is provided, including:
the area selection unit is used for determining a target area from a preset building model according to the detected area selection operation;
the system comprises a parameter acquisition unit, a parameter analysis unit and a parameter analysis unit, wherein the parameter acquisition unit is used for acquiring a first model parameter related to a target area from a preset building model through a graphic engine;
the script generating unit is used for acquiring first interface information corresponding to the target function from an interface information set corresponding to the graphic engine based on the target function triggering operation;
and the test unit is used for 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 an exemplary embodiment of the present application, the parameter obtaining unit obtains, by a graphic engine, a first model parameter related to a target area from a preset building model, and includes:
obtaining a model parameter set corresponding to a preset building model through a graphic engine;
a first model parameter associated with the target area is selected from the model parameters.
In an exemplary embodiment of the present application, the target function includes a highlight function, and the apparatus further includes:
the visual display unit is used for acquiring a first test result corresponding to the target function test script after the test unit executes the target function test script; the first test result is used for representing the prominent display of a target area in a preset building model; and visually displaying the first test result.
In an exemplary embodiment of the application, the parameter obtaining unit is further configured to, after the area selecting unit determines the target area from the preset building model according to the detected area selecting operation, obtain, when a sectioning function triggering operation for the target area is detected, a second model parameter related to the target area from the model parameter set;
the above-mentioned device still includes:
the interface acquisition unit is used for acquiring second interface information corresponding to the sectioning function from the interface information set;
the test unit is also used for generating a sectioning function test script according to the second interface information and the second model parameter, and executing the sectioning function test script to obtain a second test result; and the second test result comprises a section of the target area under a preset angle.
In an exemplary embodiment of the application, the parameter obtaining unit is further configured to, after the area selecting unit determines the target area from the preset building model according to the detected area selecting operation, obtain, 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 from the model parameter set;
the interface acquisition unit is further used for acquiring third interface information corresponding to the room display function from the interface information set;
the test unit is also used for 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 comprises an image of the specific room and description information of the specific room.
In an exemplary embodiment of the application, the parameter obtaining unit is further configured to, after the area selecting unit determines the target area from the preset building model according to the detected area selecting operation, obtain a fourth model parameter corresponding to the relevant information from the model parameter set when a display function triggering operation of the relevant information for the specific room is detected;
the interface acquisition unit is further used for acquiring fourth interface information corresponding to the information display function from the interface information set;
the test unit is further used for 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 the relevant information.
In an exemplary embodiment of the present application, the apparatus further includes:
the comparison unit is used for comparing the fourth test result with pre-stored information associated with a specific room after the test unit executes the information display function test script to obtain the fourth test result, so as to obtain a comparison result; and if the comparison result is used for representing that the fourth test result is consistent with the pre-stored information, judging that the information display function test is successful.
According to a third aspect of embodiments of the present application, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the graphics engine based automated functional testing method as described in the first aspect of the embodiments above.
According to a fourth aspect of embodiments of the present application, there is provided an electronic apparatus, including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the graphics engine based automated functional testing method as described in the first aspect of the embodiments above.
According to a fifth aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the technical solutions provided by some embodiments of the present application, a target area may be determined from a preset building model according to a detected area selection operation; acquiring a first model parameter related to a target area from a preset building model through a graphic engine; acquiring first interface information corresponding to a target function from an interface information set corresponding to a graphic engine based on target function trigger operation; and generating a target function test script according to the first interface information and the first model parameter, and executing the target function test script. Therefore, model parameters and interface information are acquired based on the graphic engine, and then the test script can be automatically generated based on different requirements, so that the function test of the specified area in the building model is realized, and the function test efficiency is improved. In addition, the coverage of a test scene can be improved and the accuracy of the function test can be improved based on the test scripts automatically generated aiming at different functions.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It should be apparent that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived by those of ordinary skill in the art without inventive effort.
FIG. 1 is a schematic diagram illustrating an exemplary system architecture of a graphics engine based automated functional testing method and apparatus to which embodiments of the present disclosure may be applied;
FIG. 2 schematically illustrates a structural schematic diagram of a computer system suitable for use with an electronic device that implements an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow diagram of a graphics engine-based automated functional testing method according to one embodiment of the present disclosure;
FIG. 4 schematically shows a first test result diagram according to one embodiment of the present disclosure;
FIG. 5 schematically shows a second test result diagram according to an embodiment of the present disclosure;
FIG. 6 schematically shows a third test result diagram according to one embodiment of the present disclosure;
FIG. 7 schematically shows a test results page schematic according to one embodiment of the present disclosure;
FIG. 8 schematically illustrates a flow diagram of a graphics engine based automated functional testing method according to another embodiment of the present disclosure;
FIG. 9 schematically shows a block diagram of a graphics engine based automated functional test apparatus in an embodiment in accordance with the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating an exemplary system architecture to which the graphics engine-based automated functional testing method and apparatus according to the embodiments of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is the medium used to provide communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like. For example, the server 105 may perform: determining a target area from a preset building model according to the detected area selection operation; acquiring a first model parameter related to a target area from a preset building model through a graphic engine; acquiring first interface information corresponding to a target function from an interface information set corresponding to a graphic engine based on target function trigger operation; and generating a target function test script according to the first interface information and the first model parameter, and executing the target function test script.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the application scope of the embodiment of the present disclosure.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the (RAM)203, various programs and data necessary for system operation are also stored. The (CPU)201, (ROM)202, and (RAM)203 are connected to each other by a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the (I/O) interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. The driver 210 is also connected to the (I/O) interface 205 as necessary. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 210 as necessary, so that a computer program read out therefrom is installed into the storage section 208 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and apparatus of the present application.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments below. For example, the electronic device may implement the various steps shown in fig. 3, and so on.
The example embodiment provides an automated functional testing method based on a graphic engine. Referring to fig. 3, the graphic engine-based automated functional testing method may include the following steps S310 to S340, specifically:
step S310: and determining a target area from a preset building model according to the detected area selection operation.
Step S320: and acquiring first model parameters related to the target area from a preset building model through a graphic engine.
Step S330: and acquiring first interface information corresponding to the target function from an interface information set corresponding to the graphic engine based on the target function trigger operation.
Step S340: and generating a target function test script according to the first interface information and the first model parameter, and executing the target function test script.
By implementing the automatic function testing method based on the graphic engine shown in fig. 3, the model parameters and the interface information are acquired based on the graphic engine, and then the test script can be automatically generated based on different requirements, so that the function test of the specified area in the building model is realized, and the function testing efficiency is improved. In addition, the coverage of a test scene can be improved and the accuracy of the function test can be improved based on the test scripts automatically generated aiming at different functions.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S310, a target area is determined from a preset building model according to the detected area selection operation.
Specifically, before determining the target area from the preset building model according to the detected area selection operation, the method may further include: acquiring a preset building model from a plurality of building models according to model selection operation, displaying the preset building model on a user interface, and further detecting region selection operation acted on the preset building model by a user; the user interface may be a browser interface or a client interface, and the embodiment of the present application is not limited.
In addition, the preset building model may be constructed based on a Revit model, and the preset building model may be represented as a Revit file; among them, Revit is constructed specifically for the building information model, and can help the architect to design, build and maintain a building with better quality and higher energy efficiency. In addition, the region selection operation may be a click operation, a touch screen operation, a voice control operation, a gesture control operation, and the like, which is not limited in the embodiment of the present application. Furthermore, the target area may be a part of a preset building model, for example, the target area may be a certain floor, a certain room or a certain house type in the preset building model.
In step S320, a first model parameter related to the target area is obtained from a preset building model through a graphic engine.
Specifically, the graphics engine may be an OGRE, OpenGVS, Vtree, OSG, and the like, and the embodiment of the present application is not limited. The first model parameters associated with the target region may be used to describe the target region.
As an alternative embodiment, obtaining, by a graphics engine, a first model parameter related to a target area from a preset building model includes: obtaining a model parameter set corresponding to a preset building model through a graphic engine; a first model parameter associated with the target area is selected from the model parameters.
Specifically, the model parameter set corresponding to the preset building model may include at least the first model parameter, and the following second model parameter, third model parameter, and fourth model parameter, and the first model parameter may include: the floor (levelld), the highlight color (color), the transparency (opacity), and the like, and each parameter in the first model parameter may be represented in any form of a character, a number, a character, a letter, and the like, which is not limited in the embodiment of the present application.
Therefore, by implementing the optional embodiment, the relevant parameters of the preset building model to be tested can be obtained through the graphic engine, and then the automatic function test aiming at the building model can be realized based on the interface information set corresponding to the graphic engine, so that the cost of manual test is reduced, and the function test efficiency is improved.
In step S330, first interface information corresponding to the target function is acquired from the interface information set corresponding to the graphics engine based on the target function trigger operation.
Specifically, the target function triggering operation may be a click operation, a touch screen operation, a voice control operation, a gesture control operation, and the like, which is not limited in the embodiment of the present application. The target function may be a highlighting function, a stroke function, a region color changing function, or the like, and the present embodiment is not limited thereto. Further, the first interface information corresponding to the target function may be expressed as ". highlightFloorById ()". The interface information set corresponding to the graphic engine can be understood as an interface information set corresponding to a functional data packet (SDK) in the graphic engine; the function data package (SDK) comprises a plurality of function modules, and each function module corresponds to one interface information.
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.
Specifically, the method for generating the target function test script according to the first interface information and the first model parameter may be; and packaging the first interface information and the first model parameter into a container to obtain a target function test script.
As an alternative embodiment, the target function includes a highlight function, and after the target function test script is executed, the method further includes: acquiring a first test result corresponding to the target function test script; the first test result is used for representing the prominent display of a target area in a preset building model; and visually displaying the first test result.
Specifically, the first test result may be represented in any form of text, entry, numerical value, character string, and the like, and the embodiment of the present application is not limited. In addition, the visual display mode of the first test result may be: and highlighting the target area in the preset building model displayed on the user interface according to the first test result, wherein the highlighting mode can be highlight display, edge-drawing display and the like. Referring specifically to fig. 4, the first test result may be displayed as a predetermined building model image highlighting the target area (e.g., XX floors).
Furthermore, the method may further include: and comparing the first test result with a preset building model image of a preset highlight display target area, and if the comparison result is used for indicating that the first test result is consistent with the preset building model image of the highlight display target area, judging that the highlight display function test is successful.
Therefore, the optional embodiment can be implemented to realize visual display of the test result and improve the intuitiveness of the test result.
As an alternative embodiment, after determining the target area from the preset building model according to the detected area selection operation, the method further includes: when the sectioning function triggering operation aiming at the target area is detected, acquiring a second model parameter related to the target area from the model parameter set; acquiring second interface information corresponding to the sectioning function from the interface information set; generating a sectioning function test script according to the second interface information and the second model parameter, and executing the sectioning function test script to obtain a second test result; and the second test result comprises a section of the target area under a preset angle.
Specifically, the cutting function triggering operation may be a click operation, a touch screen operation, a voice control operation, a gesture control operation, and the like, which is not limited in the embodiment of the present application. The second model parameters associated with the target region may include: floor (levelld), maximum height (maxhight), minimum height (minHeight), space color (spaceColor), highlight color (highlightColor), whether or not the highlight can be cancelled (isCancel), callback information (cb (linkdata)) { }. Further, the second interface information may be expressed as ". enterfoortopviewbyid ()". The second test result may be represented in any form of text, entry, numerical value, character string, and the like, and the embodiment of the present application is not limited.
The method for generating the sectioning function test script according to the second interface information and the second model parameter can be as follows; and packaging the second interface information and the second model parameters into a container to obtain a sectioning function test script. Further, after executing the sectioning function test script and obtaining the second test result, the method may further include: and visually displaying the second test result. Referring specifically to fig. 5, the second test result may be shown as a cross-section of the target area at a predetermined angle (e.g., top view).
Furthermore, the method may further include: and comparing the second test result with a preset sectioning plane of the target area at a preset angle, and if the comparison result is used for indicating that the second test result is consistent with the sectioning plane of the target area at the preset angle, judging that the sectioning function test is successful.
Therefore, the optional embodiment is implemented, the automatic test of the sectioning function can be realized, and the automatic test efficiency of the building model can be improved.
As an alternative embodiment, 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 aiming at a specific room in the target area is detected, acquiring a third model parameter related to the specific room from the model parameter set; acquiring third interface information corresponding to the room display function from the 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 comprises an image of the specific room and description information of the specific room.
Specifically, the display function triggering operation may be a click operation, a touch screen operation, a voice control operation, a gesture control operation, and the like, which is not limited in the embodiment of the present application. The third model parameters associated with the particular room may include: information of the floor on which the specific room is located, description information of each area in the specific room, coordinates of the specific room, and the like. The third test result may be represented in any form of text, entry, numerical value, character string, and the like, and the embodiment of the present application is not limited.
The method for generating the sectioning function test script according to the third interface information and the third model parameter can be as follows; and packaging the third interface information and the third model parameters into a container to obtain a sectioning function test script. Further, after the room shows the functional test script and obtains a third test result, the method may further include: and visually displaying the third test result. Referring specifically to fig. 6, the third test result may be displayed as a specific room image containing description information, where the description information may include: study room, indoor pavement, open balcony, indoor stair door, sky, balcony, canopy, time crouch, bay window, time defend etc. do not do the restriction in this application embodiment. In addition, the numbers 2 and 3 in fig. 6 are used to distinguish different rooms on the same floor.
Furthermore, the method may further include: and comparing the third test result with a preset specific room image containing the description information, and if the comparison result is used for indicating that the third test result is consistent with the specific room image containing the description information, judging that the room display function test is successful.
Therefore, the optional embodiment can be implemented to realize the automatic test of the room display function, and is beneficial to improving the automatic test efficiency of the building model.
As an alternative embodiment, after determining the target area from the preset building model according to the detected area selection operation, the method further includes: when the display function triggering operation of the related information of the specific room is detected, acquiring a fourth model parameter corresponding to the related information from the model parameter set; acquiring 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 the relevant information.
In particular, the fourth model parameters related to the target region may include: adjacent room coordinates for a particular room, adjacent room type, etc. Further, the fourth interface information may be expressed as ". space. The fourth test result may be represented in any form of text, entry, numerical value, character string, and the like, and the embodiment of the present application is not limited.
The mode of generating the information display function test script according to the fourth interface information and the fourth model parameter can be; and packaging the fourth interface information and the fourth model parameter into a container to obtain an information display function test script. Further, after the information display function test script is executed and the fourth test result is obtained, the method may further include: and visually displaying the fourth test result.
Therefore, the implementation of the optional embodiment can realize the automatic test of the information display function, and is beneficial to improving the automatic test efficiency of the building model.
As an alternative embodiment, after executing the information display function test script and obtaining the fourth test result, the method further includes: comparing the fourth test result with pre-stored information associated with the specific room to obtain a comparison result; and if the comparison result is used for representing that the fourth test result is consistent with the pre-stored information, judging that the information display function test is successful.
The pre-stored information may be information of other rooms associated with a specific room, which is preset.
Specifically, the method may further include: obtaining test results aiming at multiple functions to obtain a test result set; generating a test result page for representing the test result set, and referring to fig. 7 for a schematic diagram of the test result page; the test result set may include at least the first test result, the second test result, the third test result, and the fourth test result.
Specifically, in the test result page shown in fig. 7, each row represents one function to be tested. Each row of the functions to be tested shown in fig. 7 is marked with a "hook pair", and the "hook pair" may indicate that the function to be tested is tested successfully, that is, the test result corresponding to the function to be tested is characterized successfully.
For example, the functions to be tested may be: logging in, successfully loading a model, highlighting a single layer, clicking a blank to cancel highlighting, highlighting a single layer, canceling highlighting by using an ID method, double-clicking to enter slicing, returning a panoramic picture from a slicing mode, slicing, directly switching from a three-layer slicing picture into a two-layer slicing picture, highlighting characters of a room, highlighting the house type, displaying all house numbers of a current layer, cb clicking to call back, acquiring a house center point, deleting all house names, clicking a window picking mode when a house is clicked, acquiring a selected type, switching into a house picking mode, deleting all rooms and house names, returning the panoramic picture from the slicing mode, and acquiring associated data of all rooms.
Therefore, by implementing the optional embodiment, the result judgment of the function test can be realized, and the result judgment can represent whether the function test is successful or not, so that the automatic test efficiency for the building model is further improved.
Referring to fig. 8, fig. 8 is a flow chart schematically illustrating an automated testing method for functions based on a graphics engine according to another embodiment. As shown in fig. 8, the method for testing the automatic function based on the graphic engine comprises the following steps: step S810 to step S890.
Step S810: the method comprises the steps of determining a target area from a preset building model according to detected area selection operation, obtaining a model parameter set corresponding to the preset building model through a graphic engine, selecting a first model parameter related to the target area from the model parameter, obtaining first interface information corresponding to a target function from an interface information set corresponding to the graphic engine based on highlight function triggering operation, generating a highlight function test script according to the first interface information and the first model parameter, and executing the highlight function test script to obtain a first test result.
Step S820: and visually displaying the first test result.
Step S830: when the cutting function triggering operation aiming at the target area is detected, second model parameters related to the target area are obtained from the model parameter set, second interface information corresponding to the cutting function is obtained from the interface information set, a cutting function test script 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; and the second test result comprises a section of the target area under a preset angle.
Step S840: and visually displaying the second test result.
Step S850: when the display function triggering operation aiming at a specific room in the target area is detected, acquiring a third model parameter related to the specific room from the model parameter set, acquiring third interface information corresponding to the room display function from the interface information set, further 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 comprises an image of the specific room and description information of the specific room.
Step S860: and visually displaying the third test result.
Step S870: when the display function triggering operation of the related information of the specific room is detected, acquiring a fourth model parameter corresponding to the related information from the model parameter set, acquiring 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 the relevant information.
Step S880: comparing the fourth test result with pre-stored information associated with the specific room to obtain a comparison result; and if the comparison result is used for representing that the fourth test result is consistent with the pre-stored information, judging that the information display function test is successful.
Step S890: and visually displaying the fourth test result.
It should be noted that steps S810 to S890 correspond to the steps and embodiments shown in fig. 3, and for specific embodiments of steps S810 to S890, please refer to the steps and embodiments shown in fig. 3, which are not described herein again.
Therefore, by implementing the method shown in fig. 8, model parameters and interface information are acquired based on the graphic engine, and then the test script can be automatically generated based on different requirements, so that the function test of the specified area in the building model is realized, and the function test efficiency is improved. In addition, the coverage of a test scene can be improved and the accuracy of the function test can be improved based on the test scripts automatically generated aiming at different functions.
Further, in the present exemplary embodiment, an automatic function testing apparatus based on a graphics engine is also provided. Referring to fig. 9, the graphic engine-based automated functional test apparatus 900 may include:
an area selection unit 901, configured to determine a target area from a preset building model according to a detected area selection operation;
a parameter obtaining unit 902, configured to obtain, by a graphics engine, a first model parameter related to a target area from a preset building model;
a script generating unit 903, configured to obtain first interface information corresponding to a target function from an interface information set corresponding to a graphics engine based on a target function trigger operation;
and the test unit 904 is 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.
Therefore, by implementing the device shown in fig. 9, the model parameters and the interface information are acquired based on the graphic engine, and then the test script can be automatically generated based on different requirements, so that the function test of the specified area in the building model is realized, and the function test efficiency is improved. In addition, the coverage of a test scene can be improved and the accuracy of the function test can be improved based on the test scripts automatically generated aiming at different functions.
In an exemplary embodiment of the present application, the parameter obtaining unit 902 obtains, by a graphics engine, a first model parameter related to a target area from a preset building model, including:
obtaining a model parameter set corresponding to a preset building model through a graphic engine;
a first model parameter associated with the target area is selected from the model parameters.
Therefore, by implementing the optional embodiment, the relevant parameters of the preset building model to be tested can be obtained through the graphic engine, and then the automatic function test aiming at the building model can be realized based on the interface information set corresponding to the graphic engine, so that the cost of manual test is reduced, and the function test efficiency is improved.
In an exemplary embodiment of the present application, the target function includes a highlight function, and the apparatus further includes:
the visual display unit is used for acquiring a first test result corresponding to the target function test script after the test unit 904 executes the target function test script; the first test result is used for representing the prominent display of a target area in a preset building model; and visually displaying the first test result.
Therefore, the optional embodiment can be implemented to realize visual display of the test result and improve the intuitiveness of the test result.
In an exemplary embodiment of the present application, the parameter obtaining unit 902 is further configured to, after the area selecting unit 901 determines the target area from the preset building model according to the detected area selecting operation, obtain, when a cutting function triggering operation for the target area is detected, a second model parameter related to the target area from the model parameter set;
the above-mentioned device still includes:
the interface acquisition unit is used for acquiring second interface information corresponding to the sectioning function from the interface information set;
the test unit 904 is further configured to generate a sectioning function test script according to the second interface information and the second model parameter, and execute the sectioning function test script to obtain a second test result; wherein the second test result comprises a section of the target region at a preset angle.
Therefore, the optional embodiment is implemented, the automatic test of the sectioning function can be realized, and the automatic test efficiency of the building model is improved.
In an exemplary embodiment of the application, the parameter obtaining unit 902 is further configured to, after the area selecting unit 901 determines the target area from the preset building model according to the detected area selecting operation, obtain, 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 from the model parameter set;
the interface acquisition unit is further used for acquiring third interface information corresponding to the room display function from the interface information set;
the test unit 904 is further configured to generate a room display function test script 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 comprises an image of the specific room and description information of the specific room.
Therefore, the optional embodiment can be implemented to realize the automatic test of the room display function, and is beneficial to improving the automatic test efficiency of the building model.
In an exemplary embodiment of the present application, the parameter obtaining unit 902 is further configured to, after the area selecting unit 901 determines the target area from the preset building model according to the detected area selecting operation, obtain a fourth model parameter corresponding to the relevant information from the model parameter set when a display function triggering operation of the relevant information for the specific room is detected;
the interface acquisition unit is further used for acquiring fourth interface information corresponding to the information display function from the interface information set;
the test unit 904 is further configured 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 the relevant information.
Therefore, the implementation of the optional embodiment can realize the automatic test of the information display function, and is beneficial to improving the automatic test efficiency of the building model.
In an exemplary embodiment of the present application, the apparatus further includes:
a comparison unit, configured to compare the fourth test result with pre-stored information associated with the specific room after the test unit 904 executes the information display function test script to obtain the fourth test result, so as to obtain a comparison result; and if the comparison result is used for representing that the fourth test result is consistent with the pre-stored information, judging that the information display function test is successful.
Therefore, by implementing the optional embodiment, the result judgment of the function test can be realized, and the result judgment can represent whether the function test is successful or not, so that the automatic test efficiency of the building model is further improved.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
For details not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the method for testing an automatic function based on a graphics engine of the present disclosure for the details not disclosed in the embodiments of the apparatus of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements 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 (10)

1. An automatic function testing method based on a graphic engine is characterized by comprising the following steps:
determining a target area from the preset building model according to the detected area selection operation;
acquiring first model parameters related to the target area from the preset building model through the graphic engine;
acquiring first interface information corresponding to a target function from an interface information set corresponding to the graphic engine based on target function trigger operation;
and generating a target function test script aiming at the target area according to the first interface information and the first model parameter, and executing the target function test script.
2. The method of claim 1, wherein obtaining, by the graphics engine, first model parameters associated with the target area from the pre-set building model comprises:
obtaining a model parameter set corresponding to a preset building model through the graphic engine;
and selecting a first model parameter related to the target area from the model parameters.
3. The method of claim 1, wherein the target function comprises a highlight function, and wherein after executing the target function test script, the method further comprises:
acquiring a first test result corresponding to the target function test script; the first test result is used for representing the prominent display of the target area in the preset building model;
and visually displaying the first test result.
4. The method of claim 2, wherein after determining a target area from the pre-set building model based on the detected area selection operation, the method further comprises:
when the sectioning function triggering operation aiming at the target area is detected, acquiring a second model parameter related to the target area from the model parameter set;
acquiring second interface information corresponding to a sectioning function from the interface information set;
generating a sectioning function test script aiming at the target area according to the second interface information and the second model parameter, and executing the sectioning function test script to obtain a second test result; wherein the second test result comprises a section of the target region at a preset angle.
5. The method of claim 2, wherein after determining a target area from the pre-set building model based on the detected area selection operation, the method further comprises:
when a display function triggering operation aiming at a specific room in the target area is detected, acquiring a third model parameter related to the specific room from the model parameter set;
acquiring third interface information corresponding to a room display function from the interface information set;
generating a room display function test script for the specific room 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 comprises an image of the particular room and descriptive information of the particular room.
6. The method of claim 5, wherein after determining a target area from the pre-set building model based on the detected area selection operation, the method further comprises:
when a display function triggering operation of the related information of the specific room is detected, acquiring a fourth model parameter corresponding to the related information from the model parameter set;
acquiring fourth interface information corresponding to an information display function from the interface information set;
generating an information display function test script aiming at the related 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 related information.
7. The method of claim 6, wherein after executing the information exposure function test script to obtain a fourth test result, the method further comprises:
comparing the fourth test result with the pre-stored information associated with the specific room to obtain a comparison result;
and if the comparison result is used for representing that the fourth test result is consistent with the pre-stored information, judging that the information display function test is successful.
8. An automated functional testing apparatus based on a graphics engine, comprising:
the area selection unit is used for determining a target area from the preset building model according to the detected area selection operation;
the parameter acquisition unit is used for acquiring first model parameters related to the target area from the preset building model through the graphic engine;
the script generating unit is used for acquiring first interface information corresponding to a target function from an interface information set corresponding to the graphic engine based on target function triggering operation;
and the test unit is used for generating a target function test script according to the first interface information and the first model parameter and executing the target function test script.
9. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out a graphics engine based automated functional testing method according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the graphics engine-based automated functional testing method of any of claims 1-7.
CN202210206301.4A 2022-03-01 2022-03-01 Graphic engine based automatic function testing method, device, medium and equipment Pending CN114579445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210206301.4A CN114579445A (en) 2022-03-01 2022-03-01 Graphic engine based automatic function testing method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210206301.4A CN114579445A (en) 2022-03-01 2022-03-01 Graphic engine based automatic function testing method, device, medium and equipment

Publications (1)

Publication Number Publication Date
CN114579445A true CN114579445A (en) 2022-06-03

Family

ID=81771278

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210206301.4A Pending CN114579445A (en) 2022-03-01 2022-03-01 Graphic engine based automatic function testing method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN114579445A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446945A (en) * 2018-10-15 2019-03-08 Oppo广东移动通信有限公司 Threedimensional model treating method and apparatus, electronic equipment, computer readable storage medium
CN110674047A (en) * 2019-09-26 2020-01-10 北京字节跳动网络技术有限公司 Software testing method and device and electronic equipment
CN111258900A (en) * 2020-01-17 2020-06-09 深圳壹账通智能科技有限公司 Interface test script generation method, system, equipment and storage medium
CN113448822A (en) * 2020-03-25 2021-09-28 北京同邦卓益科技有限公司 Test method, test device, computer readable medium and electronic equipment
CN113688358A (en) * 2020-05-18 2021-11-23 网神信息技术(北京)股份有限公司 System security detection method, device, electronic equipment, medium and product

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109446945A (en) * 2018-10-15 2019-03-08 Oppo广东移动通信有限公司 Threedimensional model treating method and apparatus, electronic equipment, computer readable storage medium
CN110674047A (en) * 2019-09-26 2020-01-10 北京字节跳动网络技术有限公司 Software testing method and device and electronic equipment
CN111258900A (en) * 2020-01-17 2020-06-09 深圳壹账通智能科技有限公司 Interface test script generation method, system, equipment and storage medium
CN113448822A (en) * 2020-03-25 2021-09-28 北京同邦卓益科技有限公司 Test method, test device, computer readable medium and electronic equipment
CN113688358A (en) * 2020-05-18 2021-11-23 网神信息技术(北京)股份有限公司 System security detection method, device, electronic equipment, medium and product

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
跟着小8学CAD: "《经验分享|CAD查询三维模型的体积和质量》", pages 1 - 4, Retrieved from the Internet <URL:《https://www.sohu.com/a/410654122_697154》> *

Similar Documents

Publication Publication Date Title
US10805464B2 (en) System and method for monitoring and visualizing emotions in call center dialogs at call centers
US10986228B2 (en) System and method for monitoring and visualizing emotions in call center dialogs by call center supervisors
CN108229485B (en) Method and apparatus for testing user interface
CN110457277A (en) Service process performance analysis method, device, equipment and storage medium
CN107451062B (en) User interface traversal test method, device, server and storage medium
CN111124371A (en) Game-based data processing method, device, equipment and storage medium
CN113656877B (en) Multi-layer house type model generation method, device, medium and electronic equipment
CN106790171A (en) The method of session control, device and computer-readable recording medium
CN114547252A (en) Text recognition method and device, electronic equipment and medium
CN114579445A (en) Graphic engine based automatic function testing method, device, medium and equipment
CN114241544B (en) Image recognition method, device, electronic equipment and storage medium
CN115454818A (en) White box interface testing method and device, electronic equipment and storage medium
CN115640372A (en) Method, device, system, equipment and medium for guiding area of indoor plane
CN112965910B (en) Automatic regression testing method and device, electronic equipment and storage medium
CN114297758A (en) House type figure generating method, house type figure generating device, medium and equipment
CN114898387A (en) Table image processing method and device
CN115062571A (en) Dynamic selection method, system, equipment and computer readable storage medium for data area of integrated circuit device
CN112632309A (en) Image display method and device, electronic equipment and storage medium
CN108958720B (en) System synthesis method, device, equipment and storage medium
CN116050529B (en) Quantum circuit diagram error correction method, device, apparatus, storage medium and program product
CN112000573A (en) Code quality monitoring method and device, computer equipment and medium
CN114820882B (en) Image acquisition method, device, equipment and storage medium
EP4089592A1 (en) Method for determining annotation capability information, related apparatus and computer program product
CN117392414A (en) Interface control matching method, device, storage medium and program product
CN118200468A (en) Teaching information sharing method and device, recording and playing host and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination