CN111221725B - Automatic testing method and system, readable storage medium and computer equipment - Google Patents

Automatic testing method and system, readable storage medium and computer equipment Download PDF

Info

Publication number
CN111221725B
CN111221725B CN201911182553.2A CN201911182553A CN111221725B CN 111221725 B CN111221725 B CN 111221725B CN 201911182553 A CN201911182553 A CN 201911182553A CN 111221725 B CN111221725 B CN 111221725B
Authority
CN
China
Prior art keywords
building block
data
building
action
model
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.)
Active
Application number
CN201911182553.2A
Other languages
Chinese (zh)
Other versions
CN111221725A (en
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.)
Hangzhou Tuya Information Technology Co Ltd
Original Assignee
Hangzhou Tuya Information 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 Hangzhou Tuya Information Technology Co Ltd filed Critical Hangzhou Tuya Information Technology Co Ltd
Priority to CN201911182553.2A priority Critical patent/CN111221725B/en
Publication of CN111221725A publication Critical patent/CN111221725A/en
Application granted granted Critical
Publication of CN111221725B publication Critical patent/CN111221725B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

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 invention relates to an automatic testing method, which comprises the following steps: configuring a data building block corresponding to variable data, an action building block corresponding to a function module and an incidence relation between the action building block and the data building block; building a building block model of the test case according to the data building block, the action building block and the incidence relation; and executing the building block model to finish the automatic test of the test case. According to the technical scheme, the test case is decomposed into various types of building blocks, incidence relations among the building blocks are specified, then the test model of the test case is built in a building block building mode, a user only needs to learn the building principle of the building blocks to combine keyword building blocks to complete the test case model, and then the case codes are generated through the model, so that the user can complete the automatic case without paying attention to details of specific building block implementation.

Description

Automatic testing method and system, readable storage medium and computer equipment
Technical Field
The invention relates to the field of automatic testing, in particular to an automatic testing method and system, a readable storage medium and computer equipment.
Background
In the field of automatic testing, a test case model is established by description of pseudo codes or natural language based on a keyword-driven testing method, and then test codes are generated. The application field of the method is professional, the difficulty of system implementation and use is high, and after the system is implemented, professional knowledge is needed to write a test case model of pseudo code or natural language.
Disclosure of Invention
The present invention has been made to solve at least one of the problems occurring in the prior art or the related art.
Therefore, an object of the present invention is to provide an automated testing method and system, a readable storage medium, and a computer device, which enable a user to complete an automated use case without paying attention to details of a specific block implementation.
In order to achieve the above object, the technical solution of the first aspect of the present invention provides an automated testing method, including the following steps: configuring a data block corresponding to variable data, an action block corresponding to a function module and an association relation between the action block and the data block; building a building block model of the test case according to the data building block, the action building block and the incidence relation; and executing the building block model to finish the automatic test of the test case.
According to the technical scheme, the test case is decomposed into various types of building blocks, incidence relations among the building blocks are specified, then the test model of the test case is built in a building block building mode, a user only needs to learn the building principle of the building blocks, key word building blocks can be combined to complete the test case model, and then case codes are generated through the model, so that the user can complete the automatic case without paying attention to details of specific building block implementation.
The technical solution of the second aspect of the present invention provides an automated testing system, including: the building block configuration module is set to be used for configuring a data building block corresponding to variable data, an action building block corresponding to a function module and an association relation between the action building block and the data building block; the model building module is set to be used for building a building block model of the test case according to the data building block, the action building block and the incidence relation; and the execution module is set to be used for executing the building block model and completing the automatic test of the test case.
According to the technical scheme, the test case is decomposed into various types of building blocks, incidence relations among the building blocks are specified, then the test model of the test case is built in a building block building mode, a user only needs to learn the principle of building by using the building blocks to combine keyword building blocks to complete the test case model, and then the case codes are generated through the model, so that the user can complete the automatic case without paying attention to details of specific building block implementation.
In any of the above technical solutions, preferably, the functional module includes at least one of a code and a function.
In any one of the above technical solutions, preferably, the association relationship includes an association relationship between at least two of the data blocks.
In any of the above technical solutions, preferably, the association relationship includes an association relationship between one data block and at least one action block.
In any of the above technical solutions, preferably, one action block is associated with at least two data blocks.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 illustrates a block flow diagram of an automated testing method in accordance with an embodiment of the present invention;
FIG. 2 is a block diagram illustrating an automated test system according to an embodiment of the present invention;
FIG. 3 shows a block flow diagram of building block models according to an embodiment of the present invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited to the specific embodiments disclosed below.
Automated testing methods and systems, readable storage media, and computer devices according to some embodiments of the invention are described below with reference to fig. 1-3.
As shown in fig. 1, the automated testing method according to one embodiment of the present invention comprises the following steps:
s1, configuring a data building block corresponding to variable data, an action building block corresponding to a function module and an association relation between the action building block and the data building block;
in this step, the data block: corresponding to variable DATA, namely input DATA of a program, the DATA of key value pairs JSON are expressed, and are abbreviated as DATA;
action building block: an address identifying a program, such as "class a. Function b," may be associated with a section of code module or function or combination, abbreviated as ACTION, that performs a particular function.
And (3) association relation: an action block may have a plurality of data blocks, and the combination of an action block and a data block is associated.
S2, building a building block model of the test case according to the data building block, the action building block and the incidence relation;
in this step, the block model is a predefined ordered arrangement of action blocks and data blocks, which is defined by the service scenario.
And S3, executing the building block model to finish the automatic test of the test case.
In this step, the execution process of the program returns another set of data after inputting data, which can be represented by the above-defined building block, so that writing a test case is to build a building block model.
In the embodiment, the test case is decomposed into various types of building blocks, the incidence relation among the building blocks is specified, then the test model of the test case is built in a building block building mode, a user only needs to learn the building principle of the building blocks, key word building blocks can be combined to complete the test case model, and then the case codes are generated through the model, so that the user can complete the automatic case without paying attention to the details of the implementation of the specific building blocks.
As shown in FIG. 2, an automated test system 100 according to another embodiment of the invention comprises:
a block configuration module 10 configured to configure a data block corresponding to variable data, an action block corresponding to a function module, and an association relationship between the action block and the data block;
a model building module 20 configured to build a building block model of the test case according to the data building block, the action building block, and the association relation;
and the execution module 30 is configured to execute the building block model to complete the automatic test of the test case.
In the embodiment, the test case is decomposed into various types of building blocks, the incidence relation among the building blocks is specified, then the test model of the test case is built in a building block building mode, a user only needs to learn the building principle of the building blocks, key word building blocks can be combined to complete the test case model, and then the case codes are generated through the model, so that the user can complete the automatic case without paying attention to the details of the implementation of the specific building blocks.
In any of the above embodiments, preferably, the association relationship includes an association relationship of at least two data blocks.
In this embodiment, the data blocks may be combined with each other, + number operation;
DATA(A)+DATA(B)=DATA(C);
for example: a = { P1:1}, b = { P2:2}, then c = { P1:1, P2.
In any of the above embodiments, preferably, the association relationship includes an association relationship between one data block and at least one action block.
In this embodiment, the action bricks may be combined with one or more data bricks, and finally, data bricks are generated, and the operation is performed by a sign;
ACTION(A)*DATA(B)=DATA(C);
in any of the above embodiments, preferably, the association relationship between one action block and at least two data blocks is provided.
In this embodiment, the action blocks cannot be combined with each other, but can be combined with other action blocks through data block combination;
ACTION(A)*DATA(B)*ACTION(D)=DATA(E)。
as shown in fig. 3, it shows an operation process of building a building block model of a test case:
the data building blocks are: A. b, C, the action building blocks are: c1, C2, C3;
the first step is as follows:
combining the DATA DATA (A) and the DATA (B) and then combining the DATA DATA (A) and the ACTION (C1) to execute the ACTION of the ACTION (C1) to obtain DATA DATA (D1);
the second step is that:
the DATA (D1) and the DATA (C) in the previous step are combined and then combined with the ACTION (C2), that is, the ACTION of the ACTION (C2) is performed, so as to obtain the DATA (D2);
the combination operation is repeated in this way, resulting in DATA (D3), i.e. the complete use case model is executed.
Based on the method shown in fig. 1, correspondingly, the embodiment of the present application further provides a readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the automated testing method.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method of the embodiments of the present application.
Based on the method shown in fig. 1 and the virtual device embodiment shown in fig. 2, in order to achieve the above object, an embodiment of the present application further provides a computer device, which is characterized by comprising a storage medium and a processor; a storage medium for storing a computer program; a processor for executing the computer program to implement the steps of the automated testing method.
Optionally, the computer device may also include a user interface, a network interface, a camera, radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, a WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium can also comprise an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
In the present invention, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance; the term "plurality" means two or more unless expressly limited otherwise. The terms "mounted," "connected," "fixed," and the like are to be construed broadly, and for example, "connected" may be a fixed connection, a removable connection, or an integral connection; "coupled" may be direct or indirect through an intermediary. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description of the present invention, it is to be understood that the terms "upper", "lower", "left", "right", "front", "rear", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplification of description, but do not indicate or imply that the referred device or unit must have a specific direction, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An automated testing method, comprising the steps of:
configuring a data building block corresponding to variable data, an action building block corresponding to a function module and an incidence relation between the action building block and the data building block;
building a building block model of the test case according to the data building block, the action building block and the incidence relation;
and executing the building block model to finish the automatic test of the test case.
2. The automated testing method of claim 1, wherein: the functional module includes at least one of code and a function.
3. The automated testing method of claim 1 or 2, wherein: the incidence relation comprises the incidence relation of at least two data building blocks.
4. The automated testing method of claim 1 or 2, wherein: the association comprises an association of a data block with at least one of the action blocks.
5. The automated testing method of claim 1 or 2, wherein: an association of one said action block with at least two said data blocks.
6. An automated test system, comprising:
the building block configuration module is set to be used for configuring a data building block corresponding to variable data, an action building block corresponding to a function module and an incidence relation between the action building block and the data building block;
the model building module is set to be used for building a building block model of the test case according to the data building block, the action building block and the incidence relation;
and the execution module is set to be used for executing the building block model and completing the automatic test of the test case.
7. The automated test system of claim 6, wherein: the functional module includes at least one of code and a function.
8. The automated test system of claim 6 or 7, wherein: the incidence relation comprises at least one of incidence relation of at least two data blocks, the incidence relation comprises at least one of incidence relation of one data block and at least one action block, and the incidence relation of one action block and at least two data blocks.
9. A readable storage medium, characterized in that a computer program is stored thereon which, when being executed by a processor, carries out the steps of the automated testing method according to any one of claims 1 to 5.
10. A computer device comprising a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the steps of the automated testing method of any of claims 1 to 5.
CN201911182553.2A 2019-11-27 2019-11-27 Automatic testing method and system, readable storage medium and computer equipment Active CN111221725B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911182553.2A CN111221725B (en) 2019-11-27 2019-11-27 Automatic testing method and system, readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911182553.2A CN111221725B (en) 2019-11-27 2019-11-27 Automatic testing method and system, readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN111221725A CN111221725A (en) 2020-06-02
CN111221725B true CN111221725B (en) 2023-04-07

Family

ID=70827735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911182553.2A Active CN111221725B (en) 2019-11-27 2019-11-27 Automatic testing method and system, readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN111221725B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221503A (en) * 2008-02-01 2008-07-16 中国建设银行股份有限公司 Software testing method and device
CN102135938A (en) * 2011-03-21 2011-07-27 中国工商银行股份有限公司 Software product testing method and system
CN202339542U (en) * 2011-03-21 2012-07-18 中国工商银行股份有限公司 Software product test system
EP2953072A1 (en) * 2014-06-06 2015-12-09 Accenture Global Services Limited Workflow test case generation
CN105608258A (en) * 2015-12-16 2016-05-25 苏州同元软控信息技术有限公司 Model based system design and information flow visualization simulation system and method
CN105955853A (en) * 2016-04-19 2016-09-21 国网江西省电力科学研究院 Control method for hardware configuration framework of distributed intelligent testing system of transformer substation
CN106598869A (en) * 2016-12-26 2017-04-26 北京京东金融科技控股有限公司 Method and device for realizing automatic software testing and electronic equipment
CN206584345U (en) * 2016-12-09 2017-10-24 中国电子科技集团公司第三十研究所 A kind of general-utility test platform for embedded computer board reliability test
CN108874680A (en) * 2018-07-09 2018-11-23 上海瀚银信息技术有限公司 A kind of method for testing software and system of automation
CN109684224A (en) * 2018-12-29 2019-04-26 深圳点猫科技有限公司 The test method and device of the conversion process of python code and building blocks

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8473913B2 (en) * 2006-01-11 2013-06-25 Hitachi Data Systems Corporation Method of and system for dynamic automated test case generation and execution
US10289524B2 (en) * 2014-06-06 2019-05-14 Accenture Global Services Limited Workflow test case generation

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221503A (en) * 2008-02-01 2008-07-16 中国建设银行股份有限公司 Software testing method and device
CN102135938A (en) * 2011-03-21 2011-07-27 中国工商银行股份有限公司 Software product testing method and system
CN202339542U (en) * 2011-03-21 2012-07-18 中国工商银行股份有限公司 Software product test system
EP2953072A1 (en) * 2014-06-06 2015-12-09 Accenture Global Services Limited Workflow test case generation
CN105608258A (en) * 2015-12-16 2016-05-25 苏州同元软控信息技术有限公司 Model based system design and information flow visualization simulation system and method
CN105955853A (en) * 2016-04-19 2016-09-21 国网江西省电力科学研究院 Control method for hardware configuration framework of distributed intelligent testing system of transformer substation
CN206584345U (en) * 2016-12-09 2017-10-24 中国电子科技集团公司第三十研究所 A kind of general-utility test platform for embedded computer board reliability test
CN106598869A (en) * 2016-12-26 2017-04-26 北京京东金融科技控股有限公司 Method and device for realizing automatic software testing and electronic equipment
CN108874680A (en) * 2018-07-09 2018-11-23 上海瀚银信息技术有限公司 A kind of method for testing software and system of automation
CN109684224A (en) * 2018-12-29 2019-04-26 深圳点猫科技有限公司 The test method and device of the conversion process of python code and building blocks

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
崔隽.基于数据积木的仿真数据生成.指挥信息系统与技术.2012,全文. *

Also Published As

Publication number Publication date
CN111221725A (en) 2020-06-02

Similar Documents

Publication Publication Date Title
CA2919904C (en) Method and system for obtaining a configuration profile
CN103294586B (en) For the automatic detection of the user preference of alternative user interface model
US9280451B2 (en) Testing device
CN105144074B (en) It is stored using the block of hybrid memory device
CN103268201B (en) A kind of date storage method, memory storage and read method
CN107291950B (en) Form data updating method and device and computer equipment
US20100131685A1 (en) Hardware configuration information system, method, and computer program product
CN105260092A (en) Method and device for dynamically changing input keyboard
CN111221725B (en) Automatic testing method and system, readable storage medium and computer equipment
CN108228611B (en) Document information copying method and device
CN110555732B (en) Marketing strategy pushing method and device and marketing strategy operation platform
CN107832228A (en) A kind of test case reduction method, device, equipment and storage medium
CN104424525B (en) Auxiliary is identified project the method and apparatus of scope
CN111309464A (en) Task scheduling method and system
CN110457318A (en) The update method of data field, device, medium, electronic equipment in block chain
CN115588458A (en) Storage device testing method, system, device and readable storage medium
CN111427567B (en) Intelligent product rapid generation method, system and equipment thereof
CN105243123A (en) Method and apparatus for generating difference file of offline map file and updating offline map file
JP5556539B2 (en) Communication terminal, communication system, session management method, and program
JP2008217443A (en) Business process simulator, and business process simulation program
CN111222066A (en) Pull-down component system and method for event processing and searching
JP2008112229A (en) Update data application method for software product
US10693494B2 (en) Reducing a size of multiple data sets
CN109032660A (en) A kind of generation method of VersionCode, device, electronic equipment and storage medium
CN114218293A (en) Data query method and device based on incremental algorithm 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
GR01 Patent grant
GR01 Patent grant