Summary of the invention
In view of this, the embodiment of the present application provides a kind of automatization test system, method, calculates equipment and storage is situated between
Matter.
On the one hand, the embodiment of the present application discloses a kind of automatization test system, comprising:
Test and management module: it is configured as load target detection use-case and runs the target use-case;
It executes acquisition module: being configured as requiring by acquisition interface to the incoming acquisition of the test case;
Processing module: being configured as being required to acquire target data from the test case of the operation according to the acquisition,
And the target data is stored to shared memory;
Performance management module: it is configured as obtaining target data from the shared memory, integrates to obtain with performance data
Test result.
Optionally, the automatization test system further include:
Custom logic module is configured as the shared business function of editor or the corresponding object of basic function and is added to
In test case.
Optionally, the target detection use-case includes the lua test case by lua scripting language.
Optionally, the execution acquisition module is configured to: by opening performance data acquisition interface and end
Performance data collection interface is required to the incoming acquisition of lua test case.
Optionally, the processing module, is configured to:
Calling and institute are required according to opening performance data acquisition interface and terminating the incoming acquisition of performance data acquisition interface
Stating acquisition requires corresponding acquisition function to carry out data acquisition,
By the target data acquired from lua test case storage to shared memory.
Optionally, the performance management module is configured to: target data is obtained from the shared memory, it will
Target data performance data relevant to monitoring process and operating system is integrated, and is uploaded according to the preset time interval
Data after integration.
On the other hand, the embodiment of the present application discloses a kind of automated testing method, comprising:
Load target detection use-case simultaneously runs the target use-case;
It is required by acquisition interface to the incoming acquisition of the test case;
It is required to acquire target data from the test case of the operation according to the acquisition, and the target data is deposited
Store up shared memory;
Target data is obtained from the shared memory, integrates to obtain test result with performance data.
Optionally, the automated testing method further include:
The shared business function of editor or the corresponding object of basic function are simultaneously added in test case.
Optionally, the target detection use-case includes the lua test case by lua scripting language.
Optionally, described to be required to include by acquisition interface to the incoming acquisition of the test case:
It is required by opening performance data acquisition interface and terminating performance acquisition interface to the incoming acquisition of lua test case.
Optionally, described to be required to acquire target data from the test case of the operation according to the acquisition, and by institute
Target data storage, which is stated, to shared memory includes:
It is adopted according to opening performance data acquisition interface and terminating the incoming parameter request of performance acquisition interface to call with described
Collection requires corresponding acquisition function to carry out data acquisition, and the target data acquired from lua test case storage is deposited to shared
Storage area.
Optionally, described to obtain target data from the shared memory, it integrates to obtain test result packet with performance data
It includes:
The shared memory obtains target data, by target data property relevant to monitoring process and operating system
Energy data are integrated, and upload the data after integration according to the preset time interval.
A kind of automatization test system, method, calculating equipment and the storage medium that this specification provides, wherein automation
Test macro includes test and management module: being configured as load target detection use-case and runs the target use-case;Execute acquisition
Module: it is configured as requiring by acquisition interface to the incoming acquisition of the test case;Processing module: it is configured as according to
Acquisition requires to acquire target data from the test case of the operation, and the target data is stored to shared memory;
Performance management module: it is configured as obtaining target data from the shared memory, integrates to obtain test result with performance data.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with
Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
The term used at least one embodiment of this specification be only merely for for the purpose of describing particular embodiments, and
It is not intended to be limiting at least one embodiment of this specification.The institute at least one embodiment of this specification and the appended claims
The "an" of the singular used, " described " and "the" are also intended to including most forms, unless context clearly shows that it
His meaning.It is also understood that term "and/or" used at least one embodiment of this specification refers to and includes at least one
Associated any or all of project listed may combine.
It will be appreciated that though may be described using term first, second etc. at least one embodiment of this specification
Various information, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.
For example, first can also be referred to as second in the case where not departing from least one scope of embodiments of this specification, similarly,
Second can also be referred to as first.Depending on context, word as used in this " if " can be construed to " ...
When " or " when ... " or " in response to determination ".
Firstly, the vocabulary of terms being related to one or more embodiments of the invention explains.
Lua:lua scripting language is a kind of small and exquisite scripting language, and lua script can be easily by C/C++ code tune
With the function of C/C++ can also be called in turn.In the embeddable application program of lua, for application program provide flexible extension and
Customize function.Lua is write by standard C, and code is succinct, and fortune can be almost compiled in all operating systems and platform
Row.The target of lua is to become one to be easy to language used in insertion other Languages.
Test case: test case refers to the description that test assignment is carried out to a specific software product, embodies test
Scheme, method, technology and strategy.Content includes test target, tests environment, input data, testing procedure, it is contemplated that as a result, surveying
Training sheet.
In at least one embodiment of this specification, a kind of automatization test system, method are provided, equipment is calculated and deposits
Storage media is described in detail one by one in the following embodiments.
Referring to Fig. 1, this specification one embodiment provides a kind of structural schematic diagram of automatization test system.This is automatic
Changing test macro includes but is not limited to client 150, network 160, bus 130, processor 120, access device 140 and memory
110。
The client 150 includes but is not limited to run the client of test case.
The network 160, is configured as receiving the data that the incoming test case of client 150 generates, and by the number
It is to be called according to being stored to memory 110 etc. by the access device 140.
Access device 140 described in the processor 120 and memory 110 pass through bus 130 and complete mutual communication.
Access device 140, which enables, calculates equipment 100 via one or more network communications.The example packet of these networks
Include the combination of the communication network of local area network (LAN), wide area network (WAN), personal area network (PAN) or such as internet.Network interface can
To include one or more of wired or wireless any kind of network interface (for example, network interface card (NIC)), such as
IEEE802.11 WLAN (WLAN) wireless interface, Ethernet interface, leads to worldwide interoperability for microwave accesses (Wi-MAX) interface
With universal serial bus (USB) interface, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
Processor 120, be configured as obtain be stored in the data of memory 110 after, data are acquired and are handled.
Calculating equipment 100 can be any kind of static or mobile computing device, including mobile computer or mobile meter
Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement
Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting
Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.
Referring to fig. 2, one embodiment of this specification provides a kind of structural schematic diagram of automatization test system, comprising:
Test and management module 202: it is configured as load target detection use-case and runs the target use-case;
It executes acquisition module 204: being configured as requiring by acquisition interface to the incoming acquisition of the test case;
Processing module 206: it is configured as being required to acquire number of targets from the test case of the operation according to the acquisition
According to, and the target data is stored to shared memory;
Performance management module 208: it is configured as obtaining target data from the shared memory, be integrated with performance data
To test result.
In a specific application scenarios, test case may include testing the test case of map.Acquisition is wanted
Ask may include the place first for starting acquisition and the place second, the duration of acquisition, task label that terminate acquisition etc..Target data can
To include the current equipment etc. of the coordinate of player, the angle of camera, player.Performance data may include picture average transmission per second
Frame number and picture minimum transfer frame number per second.
When being tested, the test case of load test map simultaneously runs the test case, passes through acquisition interface
To the incoming place first for starting acquisition of the test case and the place second, the duration of acquisition, task label that terminate acquisition etc., root
According to it is described start acquisition place first and terminate acquisition place second acquired from the test case of the operation player coordinate,
The current equipment etc. of the angle of camera, player, and the storages such as the current equipment of the coordinate of player, the angle of camera, player are arrived
Shared memory, the equipment etc. current from the shared memory acquisition coordinate of player, the angle of camera, player, with picture
Average transmission frame number and picture minimum transfer frame number per second per second is integrated to obtain test result.
In this specification one or more embodiment, the system can quickly and conveniently acquire data, be adopted by change
Collection requires to adjust the acquisition of the data in test process, and carrying out storage integration to collected data can be more acurrate, more fully
Obtain test result.
Referring to Fig. 3, the structural schematic diagram for another automatization test system that one embodiment of this specification provides, with figure
2 compare, the automatization test system further include:
Custom logic module 302: the shared business function of editor or the corresponding object of basic function are configured as and is added
It is added in test case.
The custom logic module 302 can be realized by C Plus Plus editor.
The basic function may include for example, reading the function of configuration item when program starts.The shared business function
The function of reset in program operation process can for example be can be, as reset stuck state function in collection process.
The custom logic module write in the system that this specification embodiment provides by using C Plus Plus improves altogether
The processing speed of business function or basic function has further speeded up the bulk velocity of automatic test.
Referring to fig. 4, one embodiment of this specification provides a kind of structural schematic diagram of automatization test system, comprising:
Test and management module 402: load is configured as by the lua test case of lua scripting language and runs institute
State lua test case;
It executes acquisition module 404: being configured as requiring by acquisition interface to the incoming acquisition of the lua test case;
Processing module 406: it is configured as being required to acquire target from the lua test case of the operation according to the acquisition
Data, and the target data is stored to shared memory;
Performance management module 408: it is configured as obtaining target data from the shared memory, be integrated with performance data
To test result.
In a specific application scenarios, test case may include the lua test trip by lua scripting language
The test case of play map.Acquisition require may include start acquisition place first and terminate acquisition place second, acquisition when
Length, task label etc..Target data may include the current equipment etc. of the coordinate of player, the angle of camera, player.Performance data
It may include picture average transmission frame number per second and picture minimum transfer frame number per second.
When being tested, the lua test case is loaded and run, is passed by acquisition interface to the lua test case
The place second, the duration of acquisition, task label etc. that enter the place first for starting acquisition and terminate acquisition starts acquisition according to described
Place first and the place second for terminating acquisition acquire the coordinate of player, the angle of camera, player from the test case of the operation
Current equipment etc., and by the storages such as the current equipment of the coordinate of player, the angle of camera, player to shared memory, from institute
It states shared memory and obtains the current equipment etc. of the coordinate of player, the angle of camera, player, with picture average transmission frame number per second
It integrates to obtain test result with picture minimum transfer frame number per second.
In this specification one or more embodiment, the system is convenient using the test case of lua scripting language
It is edited and is used in C language environment and game engine, lua test case has good versatility, scalability and can
Reusability.The different manufacturers of identical function, the test equipment of different model can be designed using identical lua interface, be expanded
The big use scope of lua test case.
Referring to Fig. 5, one embodiment of this specification provides a kind of structural schematic diagram of automatization test system, comprising:
Test and management module 402: load is configured as by the lua test case of lua scripting language and runs institute
State lua test case;
It executes acquisition module 504: being configured as connecing by opening performance data acquisition interface and terminating performance data collection
Mouth is required to the incoming acquisition of the lua test case;
Processing module 406: it is configured as being required to acquire target from the lua test case of the operation according to the acquisition
Data, and the target data is stored to shared memory;
Performance management module 408: it is configured as obtaining target data from the shared memory, be integrated with performance data
To test result.
In a specific application scenarios, test case may include the lua test trip by lua scripting language
The test case of play map.Acquisition require may include start acquisition place first and terminate acquisition place second, acquisition when
Length, task label etc..Target data may include the current equipment etc. of the coordinate of player, the angle of camera, player.Performance data
It may include picture average transmission frame number per second and picture minimum transfer frame number per second.
When being tested, the test case of load test map simultaneously runs the lua test case, passes through openability
Energy data acquisition interface and end performance data acquisition interface are passed to the place first and knot for starting acquisition to the lua test case
Place second, the duration of acquisition, task label that beam acquires etc. according to the place first for starting acquisition and terminate the place acquired
Second acquires the current equipment etc. of the coordinate of player, the angle of camera, player from the test case of the operation, and by player's
The storages such as the current equipment of coordinate, the angle of camera, player obtain the seat of player from the shared memory to shared memory
The current equipment etc. of mark, the angle of camera, player, it is whole with picture average transmission frame number per second and picture minimum transfer frame number per second
Conjunction obtains test result.
In this specification one or more embodiment, the system is using unlatching performance data acquisition interface and terminates performance
Data acquisition interface is required to the incoming acquisition of test case, is facilitated system code to safeguard, is provided safety and the portable of system
Property.
Referring to Fig. 6, one embodiment of this specification provides a kind of structural schematic diagram of automatization test system, comprising:
Test and management module 402: load is configured as by the lua test case of lua scripting language and runs institute
State lua test case;
It executes acquisition module 504: being configured as connecing by opening performance data acquisition interface and terminating performance data collection
Mouth is required to the incoming acquisition of the lua test case;
Processing module 606: it is configured as being required to acquire target from the lua test case of the operation according to the acquisition
Data, and by target data storage to shared memory, according to unlatching performance data acquisition interface and terminate performance data
The incoming acquisition of acquisition interface requires to call requires corresponding acquisition function to carry out data acquisition with the acquisition, will survey from lua
The target data acquired in example on probation is stored to shared memory;
Performance management module 408: it is configured as obtaining target data from the shared memory, be integrated with performance data
To test result.
Calling and institute are required according to opening performance data acquisition interface and terminating the incoming acquisition of performance data acquisition interface
Stating acquisition requires corresponding acquisition function to carry out data acquisition, by the target data acquired from lua test case storage to altogether
Enjoy memory block.
In a specific application scenarios, test case may include the lua test trip by lua scripting language
The test case of play map.Acquisition require may include start acquisition place first and terminate acquisition place second, acquisition when
Length, task label etc..Target data may include the current equipment etc. of the coordinate of player, the angle of camera, player.Performance data
It may include picture average transmission frame number per second and picture minimum transfer frame number per second.Acquisition function can be acquisition function S.
When being tested, the test case of load test map simultaneously runs the lua test case, passes through openability
Energy data acquisition interface and end performance data acquisition interface are passed to the place first and knot for starting acquisition to the lua test case
Place second, the duration of acquisition, task label that beam acquires etc. according to the place first for starting acquisition and terminate the place acquired
Second calls acquisition function S to carry out data acquisition, acquisition from the test case of the operation from the lua test case of the operation
The current equipment etc. of the coordinate of player, the angle of camera, player, and the dress that the coordinate of player, the angle of camera, player is current
It is standby to wait storages to shared memory, the equipment current from the shared memory acquisition coordinate of player, the angle of camera, player
Deng integrating to obtain test result with picture average transmission frame number per second and picture minimum transfer frame number per second.
In this specification one or more embodiment, the system call with it is described acquire require corresponding acquisition function into
The acquisition of row data, can be improved system stability, reduce the coupling of capturing service and other parts.
Referring to Fig. 7, one embodiment of this specification provides a kind of structural schematic diagram of automatization test system, comprising:
Test and management module 202: it is configured as load target detection use-case and runs the target use-case;
It executes acquisition module 204: being configured as requiring by acquisition interface to the incoming acquisition of the test case;
Processing module 206: it is configured as being required to acquire number of targets from the test case of the operation according to the acquisition
According to, and the target data is stored to shared memory;
Performance management module 708: it is configured as obtaining target data from the shared memory, be integrated with performance data
To test result, the data after integration are uploaded according to the preset time interval, the performance data includes monitoring process and operation
The relevant data of system.
In a specific application scenarios, test case may include testing the test case of map.Acquisition is wanted
Ask may include the place first for starting acquisition and the place second, the duration of acquisition, task label that terminate acquisition etc..Target data can
To include the current equipment etc. of the coordinate of player, the angle of camera, player.Performance data may include monitoring process and operation system
It unites relevant data, the monitoring process may include the operation process of map;The operating system may include
Windows operating system.
When being tested, the test case of load test map simultaneously runs the test case, passes through acquisition interface
To the incoming place first for starting acquisition of the test case and the place second, the duration of acquisition, task label that terminate acquisition etc., root
According to it is described start acquisition place first and terminate acquisition place second acquired from the test case of the operation player coordinate,
The current equipment etc. of the angle of camera, player, and the storages such as the current equipment of the coordinate of player, the angle of camera, player are arrived
Shared memory, the equipment etc. current from the shared memory acquisition coordinate of player, the angle of camera, player, with map
Operation process and the relevant performance data of windows operating system integrated, test result is obtained, according to the preset time
Interval uploads the data after integration.
In this specification one or more embodiment, the system can be acquired operation process, operating system and test
Target data carry out Data Integration, the test result obtained is related to monitoring process and the relevant performance data of operating system, more
Comprehensively, specifically reaction test result.
Referring to Fig. 8, one embodiment of this specification provides a kind of flow chart of automated testing method, including step 802
To step 808.
Step 802: load target detection use-case simultaneously runs the target use-case.
Step 804: being required by acquisition interface to the incoming acquisition of the test case.
Step 806: being required to acquire target data from the test case of the operation according to the acquisition, and by the mesh
Data storage is marked to shared memory.
Step 808: obtaining target data from the shared memory, integrate to obtain test result with performance data.
In this specification one or more embodiment, the method can quickly and conveniently acquire data, be adopted by change
Collection requires to adjust the acquisition of the data in test process, and carrying out storage integration to collected data can be more acurrate, more fully
Obtain test result.
In this specification one or more embodiment, the automated testing method further include:
The shared business function of editor or the corresponding object of basic function are simultaneously added in test case.
It can be by the corresponding object of business function or basic function that C Plus Plus editor shares.
The basic function may include for example, reading the function of configuration item when program starts.The shared business function
The function of reset in program operation process can for example be can be, as reset stuck state function in collection process.
The business function or basic function shared in the method that this specification embodiment provides by using C Plus Plus editor
Corresponding object is simultaneously added in test case, improves the processing speed of shared business function or basic function, further
Accelerate the bulk velocity of automatic test.
In this specification one or more embodiment, the target detection use-case includes by lua scripting language
Lua test case.
In this specification one or more embodiment, the method is convenient using the test case of lua scripting language
It is edited and is used in C language environment and game engine, lua test case has good versatility, scalability and can
Reusability.The different manufacturers of identical function, the test equipment of different model can be designed using identical lua interface, be expanded
The big use scope of lua test case.
It is described to be required by acquisition interface to the incoming acquisition of the test case in this specification one or more embodiment
Include:
It is required by opening performance data acquisition interface and terminating performance acquisition interface to the incoming acquisition of lua test case.
In this specification one or more embodiment, the method is using unlatching performance data acquisition interface and terminates performance
Data acquisition interface is required to the incoming acquisition of test case, is facilitated system code to safeguard, is provided safety and the portable of system
Property.
In this specification one or more embodiment, require to acquire from the test case of the operation according to the acquisition
Target data, and the target data is stored to shared memory and includes:
It is adopted according to opening performance data acquisition interface and terminating the incoming parameter request of performance acquisition interface to call with described
Collection requires corresponding acquisition function to carry out data acquisition, and the target data acquired from lua test case storage is deposited to shared
Storage area.
In this specification one or more embodiment, the method call with it is described acquire require corresponding acquisition function into
The acquisition of row data, can be improved system stability, reduce the coupling of capturing service and other parts.
It is described to obtain target data from the shared memory in this specification one or more embodiment, with performance number
Obtaining test result according to integration includes:
The shared memory obtains target data, by target data property relevant to monitoring process and operating system
Energy data are integrated, and upload the data after integration according to the preset time interval.
In this specification one or more embodiment, the method can be acquired operation process and operating system and test
Target data carry out Data Integration, the test result obtained is related to monitoring process and the relevant performance data of operating system, more
Comprehensively, specifically reaction test result.
Referring to Fig. 9, one embodiment of this specification provides a kind of flow chart of automated testing method, this real number example with
Lua be test case for be described, wherein acquisition require be collecting location A to place B data.Specific steps include
Step 902 is to 910.
Step 902: load target detection use-case simultaneously runs the target use-case.
Step 904: being required by acquisition interface to the incoming acquisition of the test case.
Step 906: being required to acquire target data from the test case of the operation according to the acquisition, and by the mesh
Data storage is marked to shared memory.
Step 908: obtaining target data from the shared memory, integrate to obtain test result with performance data.
Step 910: performance data is determined according to the test result.
In this specification one or more embodiment, the system is using unlatching performance data acquisition interface and terminates performance
Data acquisition interface is required to the incoming acquisition of test case, is facilitated system code to safeguard, is provided safety and the portable of system
Property.
One embodiment of this specification also provides a kind of computer readable storage medium, is stored with computer instruction, this refers to
The step of automated testing method as previously described is realized when order is executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited
The technical solution of storage media and the technical solution of above-mentioned automated testing method belong to same design, the technical side of storage medium
The detail content that case is not described in detail may refer to the description of the technical solution of the information transmission of above-mentioned instant messaging group.
The computer instruction includes computer program code, the computer program code can for source code form,
Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute
State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code
Device, read-only memory (ROM, ReAd-OnlyMemory), random access memory (RAM, RAndomAccessMemory), electricity
Carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the content that the computer-readable medium includes
Can according to making laws in jurisdiction and the requirement of patent practice carries out increase and decrease appropriate, such as in certain jurisdictions,
It does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because
According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen
It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
The application preferred embodiment disclosed above is only to aid in elaboration the application.There is no detailed descriptionthes for alternative embodiment
All details, do not limit the invention to the specific embodiments described.Obviously, according to the content of this specification, can make
Many modifications and variations.These embodiments are chosen and specifically described to this specification, is the original in order to preferably explain the application
Reason and practical application, so that skilled artisan be enable to better understand and utilize the application.The application is only authorized
The limitation of sharp claim and its full scope and equivalent.