CN112241373A - Automatic test method, test device, processor and test system - Google Patents

Automatic test method, test device, processor and test system Download PDF

Info

Publication number
CN112241373A
CN112241373A CN202011194007.3A CN202011194007A CN112241373A CN 112241373 A CN112241373 A CN 112241373A CN 202011194007 A CN202011194007 A CN 202011194007A CN 112241373 A CN112241373 A CN 112241373A
Authority
CN
China
Prior art keywords
test
framework
testing
parameters
case
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
CN202011194007.3A
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.)
Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Original Assignee
Jiuling Jiangsu Digital Intelligent 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 Jiuling Jiangsu Digital Intelligent Technology Co Ltd filed Critical Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Priority to CN202011194007.3A priority Critical patent/CN112241373A/en
Publication of CN112241373A publication Critical patent/CN112241373A/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides an automatic test method, a test device, a processor and a test system, wherein the automatic test method comprises the following steps: packaging the functions of the test software to obtain a test framework; obtaining test parameters, wherein the test parameters are obtained by parameterizing a test case; calling a test frame and transmitting test parameters; and testing the test case by adopting the test framework. According to the test method, the functions of the test software are packaged to obtain the test framework, so that automatic test of the implementation case can be realized by calling the test framework and transmitting the corresponding test parameters of the test case, and for different test cases, the test parameters corresponding to the test cases can be transferred.

Description

Automatic test method, test device, processor and test system
Technical Field
The application relates to the technical field of building aided design, in particular to an automatic testing method, a testing device, a computer readable storage medium, a processor and a testing system.
Background
The BIECO is independently researched and developed quick modeling software based on Revit API secondary development, a pilot function module test and a structure deepening test in the BIECO are self-research algorithms, and the test process is to verify the function module of the BIECO through different scenes.
Since BIECO is a PC program, the existing common tools support the internet products, and few ready-made tools are available. Most of automatic testing tools based on a PC in the prior art adopt recording manual operation steps, the tools automatically generate testing codes, the mode of the recorded operation steps is automatically simulated during playback, the flexibility is not enough, and the maintenance cost of an automatic case is higher.
The above information disclosed in this background section is only for enhancement of understanding of the background of the technology described herein and, therefore, certain information may be included in the background that does not form the prior art that is already known in this country to a person of ordinary skill in the art.
Disclosure of Invention
The present application mainly aims to provide an automated testing method, a testing apparatus, a computer-readable storage medium, a processor and a testing system, so as to solve the problem that the automated testing method in the prior art is inflexible.
According to an aspect of an embodiment of the present invention, there is provided an automated testing method, including: packaging the functions of the test software to obtain a test framework; obtaining test parameters, wherein the test parameters are obtained by parameterizing a test case; calling the test framework and transmitting the test parameters; and testing the test case by adopting the test framework.
Optionally, before encapsulating the function of the test software to obtain the test framework, the method further includes: and secondarily encapsulating the UI Automation and Windows API functions by adopting a C # language.
Optionally, the testing the test case by using the testing framework includes: calling an actual result through a third-party library interface; and checking the test result according to the actual result.
Optionally, checking the test result according to the actual result, including: and asserting the test result by adopting the self-carried Assert of the C # language.
Optionally, after the test case is tested by using the test framework, the method further includes: and processing the exception of the test framework.
Optionally, the method further comprises: and under the condition that the test framework is updated, adopting Jenkins to automatically execute the test case.
According to another aspect of the embodiments of the present invention, there is also provided an automated testing apparatus, including: the first processing unit is used for packaging the functions of the test software to obtain a test framework; the device comprises an acquisition unit, a test case parameterization unit and a test execution unit, wherein the acquisition unit is used for acquiring test parameters which are obtained by parameterizing a test case; the second processing unit is used for calling the test frame and transmitting the test parameters; and the test unit is used for testing the test case by adopting the test framework.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium including a stored program, wherein the program executes any one of the test methods.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to run a program, where the program executes any one of the test methods when running.
According to another aspect of the embodiments of the present invention, there is also provided a test system, including an automatic test apparatus, where the automatic test apparatus is configured to execute any one of the test methods.
In the embodiment of the invention, in the automatic test method, firstly, the function of the test software is packaged to obtain the test frame, then, the test parameters are obtained by parameterizing the test case, then, the test frame is called and the test parameters are transmitted, and finally, the test case is tested by adopting the test frame. According to the test method, the functions of the test software are packaged to obtain the test framework, so that automatic test of the implementation case can be realized by calling the test framework and transmitting the corresponding test parameters of the test case, and for different test cases, the test parameters corresponding to the test cases can be transferred.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 shows a flow diagram of an automated testing method according to an embodiment of the present application;
FIG. 2 shows a schematic diagram of a test framework according to an embodiment of the present application;
FIG. 3 shows a schematic diagram of an automated testing apparatus according to an embodiment of the present application;
FIG. 4 shows a flow diagram of test case execution according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" another element, it can be directly on the other element or intervening elements may also be present. Also, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element or "connected" to the other element through a third element.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
UI Automation: a technique for automated testing provided under the microsoft. net 3.0 framework;
windows API function: corresponding to the service of the Windows service center, the application program can realize corresponding purposes by calling the service;
jenkins: an open source software project is a continuous integration tool developed based on Java and used for monitoring continuous and repeated work.
As mentioned in the background, the automated testing methods of the prior art are not flexible, and in order to solve the above problems, in an exemplary embodiment of the present application, an automated testing method, a testing apparatus, a computer-readable storage medium, a processor, and a testing system are provided.
According to an embodiment of the present application, an automated testing method is provided.
Fig. 1 is a flow chart of an automated testing method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, packaging the function of the test software to obtain a test framework;
step S102, obtaining test parameters, wherein the test parameters are obtained by parameterizing a test case;
step S103, calling the test frame and transmitting the test parameters;
and step S104, testing the test case by adopting the test framework.
In the automatic test method, firstly, the function of test software is packaged to obtain a test frame, then test parameters are obtained, the test parameters are obtained by parameterizing a test case, then the test frame is called and the test parameters are transmitted, and finally the test frame is adopted to test the test case. According to the test method, the functions of the test software are packaged to obtain the test framework, so that automatic test of the implementation case can be realized by calling the test framework and transmitting the corresponding test parameters of the test case, and for different test cases, the test parameters corresponding to the test cases can be transferred.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
In a specific embodiment of the present application, fig. 2 is a schematic diagram of a BIECO UI automation test framework according to an embodiment of the present invention. As shown in fig. 2, the BIECO UI automated testing framework uses the PO design mode of web page testing for reference, packages the bottom-layer operation, uses the common operation method for packaging, and designs a test class for each function separately, thereby facilitating maintenance and ensuring independence and reusability of the test case. The BIECO UI automation test framework comprises four class packages, wherein a Common package: mainly, there are some basic underlying methods, such as keyboard and mouse operations, screen capture, view operations, etc., common tools. The method mainly comprises the following steps of designing some preparation works before and after testing, including opening corresponding files, switching views, viewing initial data, closing engineering files, checking results and the like, and carrying out KeyboardOpertion.cs classes: the method mainly comprises the operations of shortcut keys, carriage return and the like of a keyboard, and is classified in MouseOperation. Packaging windows api user32.dll, carrying out secondary development on the basic operation of the mouse, upgrading the original mouse operation, adding operations such as left key click, right key click, left key double click, right key double click, middle key double click and the like, Positionset.cs: and (2) packaging the position where the cursor appears, expanding more methods in the later period, wherein the method comprises the following steps: and (2) carrying out screenshot related operation on the screen, expanding more methods in the later period, wherein the method comprises the following steps: mainly resetting the view and switching the operations of up, down, left, right, front and back directions; menu package: mainly some menu operations, such as the menu of the pilot design, the right-side item navigation map, the melulist. The method mainly encapsulates menu entry methods such as pilot design, structural design and the like, and is convenient to call uniformly, and the ProjectRight Tree. Because the tool does not support the identification of the right tree control of the review, the operation of the right tree control is clicked in a screen position mode, if the position changes, the unified maintenance is carried out in the mode, and the calling code does not need to be adjusted; PilotDesign packet: the method mainly comprises the steps of designing a function test code of a pilot design, designing a test class file for a specific function, summarizing different test methods in a class, and testing the test class files in a test Class1.cs class: the specific test flow for placing the function of the shaft network for pilot design is as follows, namely a testMethod1() method is provided, which is mainly a test case 1 designed for placing the function of the shaft network, and a testMethod2() method is a test case 2 set for placing the function of the shaft network, and a testClass2.cs class: the specific test process for designing the function of the awning is a pilot test, the specific method is similar to the method for placing the axle network, and the description of testClass1.cs can be referred to; structure package: mainly, the functional test code of the tested software structure design, the functional design idea is similar to the pilot design.
Compared with the automatic test tool in the prior art, the test framework has the advantages that the element identification application range is wide, the test codes can be reused, the test scene can be flexibly adjusted, the script file management of the scene is convenient, the waiting time for test result verification is short, the requirement on the automatic test environment is not high, the maintenance cost is low, the C # and python programming languages are supported, and the integration of an external tool and a library is supported.
In practical application, the tool in the market can not identify the pull-down menu of the pilot design basically, and can only adopt the position of the recorded screen coordinate for identification. Once the location of the pilot design menu changes slightly, the script will not run successfully. The coordinate position needs to be adjusted again, the BIECO UI automatic test framework almost supports the identification of all controls, and based on the identification of object attributes, even if the position, the size and the like of a pilot design menu are changed, the script does not need to be adjusted, and the successful playback can be continued.
In practical application, the shaft network placing function of the pilot design uses a tool to perform an independent test case design, record once and play back once, for example, the shaft network selecting function is selected by a frame, the tool can write a frame selection script for many times, a repeated script can be generated, and the frame selection range is not well and flexibly controlled. The BIECO UI automatic test framework encapsulates the frame selection function, the method is used for the pilot design frame selection by a user, the method is also used for the structural design function, the frame selection range is set, and the user transmits corresponding parameters, so that the frame selection ranges with different sizes can be realized, and the method is flexible and light.
In practical application, if a tool on the market is used, the sequence for placing the shaft network function is adjusted from 1-2-3 to 1-3-2, re-recording or most scripts are required to be adjusted, and the scripts in the sequence of 1-3-2 can be ensured to normally run by debugging for many times, if a BIECO UI automatic test framework is used and the sequence 1-3-2 is adjusted, the code block position is only required to be adjusted and run again, and the scripts can basically run normally.
In actual application, the tool in the market carries out automatic test to the scene 1 of placing the shaft network function and can generate 1 file, carry out automatic test to the scene 2 of placing the shaft network function and can generate 1 new file, analogize 1 function and can generate a plurality of script files, and every script file can occupy very big space, cause extravagant and management maintenance, the huge difficulty in the aspect of version control, BIECO UI automatic test framework, the scene 1 of placing the shaft network function, scene 2, scene 3 is at 1 file, and the file is very little, it is very convenient to manage the maintenance
In practical applications, when a tool on the market verifies the number of the axle networks after being placed, the tool uses a self-contained method to verify the result, and the waiting time is long about 7 seconds or more, so that the efficiency is low. And the later verification using the project name needs another verification method, 1 result verification is delayed for 1-2s, so that after a plurality of accumulated results, the wasted time is still much, and a BIECO UI automatic test framework is adopted.
In practical application, tools need too many running dependence files during scene playback, occupy a large amount of internal memory, cause a computer to generate a pause phenomenon during running, have high requirements on system environment, and have a BIECO UI automatic test framework.
In practical application, most tools in the market are charged, the purchase cost is high, although the recording and playback operation is simple when people look at the market, the problems existing in the use are not easy to solve, the popularization and the use are difficult, the later-stage software is applied to other software for testing, a new scene needs to be manually operated once again, the efficiency is not high, the cost is high, the BIECO UI automatic testing framework uses an open-source tool at present, the self coding is realized, the cost is low, the labor cost is mainly high, and the framework is basically coded for 1 time and used everywhere after being built. The training device can be used by the hands of the relevant personnel by simply training the relevant personnel in half a day. The framework is adopted, so that even if the framework is applied to other software tests in the later period, the software test method does not need to be developed once again, and only needs to maintain and adjust the shared core part of the software to be tested. No adjustments are made where each is used to the corresponding element.
In practical application, a market tool can support basic use of an older development language such as VB, microsoft has maintained no update at present, wants to maintain an automation scheme, and is difficult to find corresponding technicians for maintenance, the bottom layer of a BIECO UI automation test framework supports C # in python programming language, official documents are complete, and in continuous maintenance and update, the market tool is mainly used at present, and the maintenance technology learning cost is low.
In practical applications, the market tools do not support the integration of external tools and libraries because they are fee-based, such as lead design, structural design, etc. modules that are automatically implemented, and later involve daily regression testing, the market tools can only be manually operated daily. The BIECO UI automatic test framework supports integration of external tools and libraries, such as Jenkins, automatic codes are deployed to a server through Jenkins, automatic tests are executed at regular time every day, and unattended operation is achieved.
In an embodiment of the present application, before the function of the test software is packaged to obtain the test framework, the method further includes: and secondarily encapsulating the UI Automation and Windows API functions by adopting a C # language. Specifically, UI Automation is secondarily packaged so as to implement automated testing on the test case through the test framework, and Windows API functions are secondarily packaged so as to provide corresponding services for test software through the test framework and facilitate execution of a test flow.
In an embodiment of the application, the testing of the test case by using the testing framework includes: calling an actual result through a third-party library interface; and checking the test result according to the actual result. Specifically, the actual result is called through the third-party library interface, and the test result is compared with the actual result, so that whether the test case passes the test or not is determined.
In an embodiment of the application, checking the test result according to the actual result includes: and (4) asserting the test result by using the self-carried Assert of the C # language. Specifically, assertions are carried out on the test results by using the self-contained Assert of the C # language, namely whether the test case passes the test is determined through the Assert checking test results and actual results, the self-contained Assert of the C # language supports different types of result checking, waiting time is shortened, and test efficiency is improved.
In an embodiment of the application, after the test case is tested by using the test framework, the method further includes: and processing the exception of the test framework. Specifically, after the test case is tested by the test framework, the reason of the failure of the test case is detected, and the abnormity of the test framework is processed, so that the generation of test abnormity is reduced, and the normal operation of the test framework is ensured.
In an embodiment of the present application, the method further includes: and under the condition that the version of the test framework is updated, the test case is automatically executed by adopting Jenkins. Specifically, the test framework is mounted on the server, so that the Jenkins can automatically execute the test case under the condition that the version of the test framework is updated, manual debugging is not needed, and the test efficiency is further improved.
The embodiment of the present application further provides an automatic testing apparatus, and it should be noted that the automatic testing apparatus according to the embodiment of the present application may be used to execute the method for automatic testing provided by the embodiment of the present application. The following describes an automated testing device provided in an embodiment of the present application.
FIG. 3 is a schematic diagram of an automated testing apparatus according to an embodiment of the present application. As shown in fig. 3, the apparatus includes:
the first processing unit 10 is used for packaging the functions of the test software to obtain a test framework;
an obtaining unit 20, configured to obtain test parameters, where the test parameters are obtained by parameterizing a test case;
a second processing unit 30, configured to invoke the test framework and transmit the test parameters;
and the test unit 40 is used for testing the test case by adopting the test framework.
In the automatic testing device, the first processing unit packages the functions of the testing software to obtain a testing frame, the acquisition unit acquires testing parameters, the testing parameters are obtained by parameterizing the test cases, the second processing unit calls the testing frame and transmits the testing parameters, and the testing unit adopts the testing frame to test the test cases. The test device packages the functions of the test software to obtain the test frame, so that the automatic test of the implementation case can be realized by calling the test frame and transmitting the corresponding test parameters of the test case, and for different test cases, the test parameters corresponding to the test cases can be transferred.
In an embodiment of the application, the apparatus further includes a third processing unit, where the third processing unit is configured to perform secondary packaging on the UI Automation and the Windows API function by using a C # language before the function of the test software is packaged to obtain the test framework. Specifically, UI Automation is secondarily packaged so as to implement automated testing on the test case through the test framework, and Windows API functions are secondarily packaged so as to provide corresponding services for test software through the test framework and facilitate execution of a test flow.
In an embodiment of the application, the test unit includes a calling module and a checking module, wherein the calling module is configured to call an actual result through a third-party library interface; the checking module is used for checking the test result according to the actual result. Specifically, the actual result is called through the third-party library interface, and the test result is compared with the actual result, so that whether the test case passes the test or not is determined.
In an embodiment of the application, the verification module is further configured to Assert the test result by using an Assert in the C # language. Specifically, assertions are carried out on the test results by using the self-contained Assert of the C # language, namely whether the test case passes the test is determined through the Assert checking test results and actual results, the self-contained Assert of the C # language supports different types of result checking, waiting time is shortened, and test efficiency is improved.
In an embodiment of the application, the apparatus further includes a fourth processing unit, where the fourth processing unit is configured to process an exception of the test frame after the test case is tested by using the test frame. Specifically, after the test case is tested by the test framework, the reason of the failure of the test case is detected, and the abnormity of the test framework is processed, so that the generation of test abnormity is reduced, and the normal operation of the test framework is ensured.
In an embodiment of the application, the apparatus further includes a fifth processing unit, and the fifth processing unit is configured to automatically execute the test case by Jenkins when the test framework is updated. Specifically, the test framework is mounted on the server, so that the Jenkins can automatically execute the test case under the condition that the version of the test framework is updated, manual debugging is not needed, and the test efficiency is further improved.
The embodiment of the application also provides a test system which comprises an automatic test device, wherein the automatic test device is used for executing any one of the test methods.
The test system comprises an automatic test device, a first processing unit packages functions of test software to obtain a test frame, an acquisition unit acquires test parameters, the test parameters are obtained by parameterizing a test case, a second processing unit calls the test frame and transmits the test parameters, and the test unit adopts the test frame to test the test case. The test device packages the functions of the test software to obtain the test frame, so that the automatic test of the implementation case can be realized by calling the test frame and transmitting the corresponding test parameters of the test case, and for different test cases, the test parameters corresponding to the test cases can be transferred.
In order to make the technical solutions of the present application more intuitively known to those skilled in the art, the following description is provided by specific examples.
Example 1
As shown in fig. 4, the execution flow of the test case in embodiment 1 includes:
opening tested software Revit;
revit loads the plugin BIECO;
opening a testing engineering file RVT prepared in advance by using Recit;
entering a function to be tested through a menu;
starting to place the shaft net;
selecting the shaft network data generated by the interface by using a self-packaged frame selection tool;
selecting a filter function of Revit to obtain data selected by a data interface frame;
comparing the overdue result of the test with the actual result by using an assertion method in the class library assertion of Microsoft, and verifying and judging whether the test is passed;
after the operation is finished, intercepting and storing the final state by using a screen capture method compiled by the user;
saving the engineering file RVT to the local directory to quit the tested software Revit
And executing the next test case.
In addition, during actual use, the whole exception handling of the codes is added in the later stage of the testing framework, the testing framework is enabled to be more robust, the framework is built on the server, and a continuous integration tool Jenkins is used for automatically executing the testing case after each version is updated.
The test framework of embodiment 1 uses microsoft's third party storehouse when carrying out the verification of axle network quantity, and the length of waiting is about 5s, and later stage preparation coding realizes the result verification, will support the result verification of different grade type, reduces latency, promotes efficiency of software testing.
The testing device comprises a processor and a memory, wherein the first processing unit, the acquisition unit, the second processing unit, the testing unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. One or more than one kernel can be set, and the problem that an automatic test method in the prior art is inflexible is solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium, on which a program is stored, which, when executed by a processor, implements the above-described testing method.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes the test method when running.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein when the processor executes the program, at least the following steps are realized:
step S101, packaging the function of the test software to obtain a test framework;
step S102, obtaining test parameters, wherein the test parameters are obtained by parameterizing a test case;
step S103, calling the test frame and transmitting the test parameters;
and step S104, testing the test case by adopting the test framework.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program of initializing at least the following method steps when executed on a data processing device:
step S101, packaging the function of the test software to obtain a test framework;
step S102, obtaining test parameters, wherein the test parameters are obtained by parameterizing a test case;
step S103, calling the test frame and transmitting the test parameters;
and step S104, testing the test case by adopting the test framework.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
From the above description, it can be seen that the above-described embodiments of the present application achieve the following technical effects:
1) according to the automatic testing method, firstly, functions of testing software are packaged to obtain a testing framework, then testing parameters are obtained, the testing parameters are obtained by parameterizing the test cases, then the testing framework is called and the testing parameters are transmitted, and finally the testing framework is adopted to test the test cases. According to the test method, the functions of the test software are packaged to obtain the test framework, so that automatic test of the implementation case can be realized by calling the test framework and transmitting the corresponding test parameters of the test case, and for different test cases, the test parameters corresponding to the test cases can be transferred.
2) In the automatic testing device, the first processing unit packages the functions of the testing software to obtain the testing frame, the obtaining unit obtains the testing parameters, the testing parameters are obtained by parameterizing the testing case, the second processing unit calls the testing frame and transmits the testing parameters into the testing frame, and the testing unit adopts the testing frame to test the testing case. The test device packages the functions of the test software to obtain the test frame, so that the automatic test of the implementation case can be realized by calling the test frame and transmitting the corresponding test parameters of the test case, and for different test cases, the test parameters corresponding to the test cases can be transferred.
3) The test system comprises an automatic test device, a first processing unit packages the functions of test software to obtain a test frame, an acquisition unit acquires test parameters, the test parameters are obtained by parameterizing test cases, a second processing unit calls the test frame and transmits the test parameters, and the test unit adopts the test frame to test the test cases. The test device packages the functions of the test software to obtain the test frame, so that the automatic test of the implementation case can be realized by calling the test frame and transmitting the corresponding test parameters of the test case, and for different test cases, the test parameters corresponding to the test cases can be transferred.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. An automated testing method, comprising:
packaging the functions of the test software to obtain a test framework;
obtaining test parameters, wherein the test parameters are obtained by parameterizing a test case;
calling the test framework and transmitting the test parameters;
and testing the test case by adopting the test framework.
2. The method of claim 1, wherein prior to encapsulating the functionality of the test software to obtain the test framework, the method further comprises:
and secondarily encapsulating the UI Automation and Windows API functions by adopting a C # language.
3. The method of claim 1, wherein testing the test case using the test framework comprises:
calling an actual result through a third-party library interface;
and checking the test result according to the actual result.
4. The method of claim 3, wherein verifying test results based on the actual results comprises:
and asserting the test result by adopting the self-carried Assert of the C # language.
5. The method of claim 1, wherein after testing the test case using the test framework, the method further comprises:
and processing the exception of the test framework.
6. The method of claim 1, further comprising:
and under the condition that the test framework is updated, adopting Jenkins to automatically execute the test case.
7. An automated testing apparatus, comprising:
the first processing unit is used for packaging the functions of the test software to obtain a test framework;
the device comprises an acquisition unit, a test case parameterization unit and a test execution unit, wherein the acquisition unit is used for acquiring test parameters which are obtained by parameterizing a test case;
the second processing unit is used for calling the test frame and transmitting the test parameters;
and the test unit is used for testing the test case by adopting the test framework.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program performs the test method of any one of claims 1 to 6.
9. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the testing method according to any one of claims 1 to 6 when running.
10. A test system comprising an automated test apparatus, characterized in that the automated test apparatus is adapted to perform the test method of any one of claims 1 to 6.
CN202011194007.3A 2020-10-30 2020-10-30 Automatic test method, test device, processor and test system Pending CN112241373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011194007.3A CN112241373A (en) 2020-10-30 2020-10-30 Automatic test method, test device, processor and test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011194007.3A CN112241373A (en) 2020-10-30 2020-10-30 Automatic test method, test device, processor and test system

Publications (1)

Publication Number Publication Date
CN112241373A true CN112241373A (en) 2021-01-19

Family

ID=74170338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011194007.3A Pending CN112241373A (en) 2020-10-30 2020-10-30 Automatic test method, test device, processor and test system

Country Status (1)

Country Link
CN (1) CN112241373A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656304A (en) * 2021-08-16 2021-11-16 上海浦东发展银行股份有限公司 Method and device for testing front-end application program and storage medium
CN115426300A (en) * 2022-08-15 2022-12-02 成都北中网芯科技有限公司 Method for automatically testing NP chip API (application program interface) based on data packet

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656304A (en) * 2021-08-16 2021-11-16 上海浦东发展银行股份有限公司 Method and device for testing front-end application program and storage medium
CN113656304B (en) * 2021-08-16 2024-04-30 上海浦东发展银行股份有限公司 Testing method, device and storage medium of front-end application program
CN115426300A (en) * 2022-08-15 2022-12-02 成都北中网芯科技有限公司 Method for automatically testing NP chip API (application program interface) based on data packet
CN115426300B (en) * 2022-08-15 2023-12-01 成都北中网芯科技有限公司 Method for automatically testing API (application program interface) of NP (network Programming) chip based on data packet

Similar Documents

Publication Publication Date Title
US10705942B1 (en) Simulated testing of API
US9697108B2 (en) System, method, and apparatus for automatic recording and replaying of application executions
CN112270149B (en) Verification platform automatic integration method and system, electronic equipment and storage medium
CN107733985B (en) Method and device for deploying functional components of cloud computing system
CN110013672B (en) Method, device, apparatus and computer-readable storage medium for automated testing of machine-run games
CN107526676B (en) Cross-system test method and device
CN107832207A (en) Interface performance test method, apparatus, storage medium and computer equipment
JP2006018827A (en) Smart user interface record and reproduction framework
CN110362490B (en) Automatic testing method and system for integrating iOS and Android mobile applications
CN111580926A (en) Model publishing method, model deploying method, model publishing device, model deploying device, model publishing equipment and storage medium
CN110716853A (en) Test script recording method, application program testing method and related device
CN108809755B (en) Automatic testing method and system for home gateway compatible with command line and WEB interface
CN104899016A (en) Call stack relationship obtaining method and call stack relationship obtaining device
CN111176629A (en) Application development method and device
CN105740144A (en) Automated testing method and system for Android mobile Terminal
CN106126424A (en) A kind of visual automated testing method of script, device and mobile terminal
CN103853658A (en) Automated testing method for production and playback in Android equipment and Android equipment
CN112241373A (en) Automatic test method, test device, processor and test system
CN113296653B (en) Simulation interaction model construction method, interaction method and related equipment
CN109739704A (en) A kind of interface test method, server-side and computer readable storage medium
CN115658529A (en) Automatic testing method for user page and related equipment
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN112506492A (en) Visual point burying method supporting dynamic scene configuration
CN116257438A (en) Updating method of interface test case and related equipment
CN108595656B (en) Data processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information

Address after: Room 701, East Building, innovation and Research Center, 8 Yanzheng West Avenue, Wujin District, Changzhou City, Jiangsu Province, 213100

Applicant after: Jiuling (Jiangsu) Digital Intelligent Technology Co., Ltd

Address before: Room d1-9999, 58 Fumin Branch Road, Hengsha Township, Chongming District, Shanghai, 201914 (Shanghai Hengtai Economic Development Zone)

Applicant before: Jiuling (Jiangsu) Digital Intelligent Technology Co., Ltd

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination