CN112799967A - GIT-based test script write-back test case method, system, device and medium - Google Patents

GIT-based test script write-back test case method, system, device and medium Download PDF

Info

Publication number
CN112799967A
CN112799967A CN202110331152.XA CN202110331152A CN112799967A CN 112799967 A CN112799967 A CN 112799967A CN 202110331152 A CN202110331152 A CN 202110331152A CN 112799967 A CN112799967 A CN 112799967A
Authority
CN
China
Prior art keywords
test script
test
git
test case
script
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.)
Granted
Application number
CN202110331152.XA
Other languages
Chinese (zh)
Other versions
CN112799967B (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.)
Jiajia Technology Co ltd
Original Assignee
Jiajia 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 Jiajia Technology Co ltd filed Critical Jiajia Technology Co ltd
Priority to CN202110331152.XA priority Critical patent/CN112799967B/en
Publication of CN112799967A publication Critical patent/CN112799967A/en
Application granted granted Critical
Publication of CN112799967B publication Critical patent/CN112799967B/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
    • 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

Abstract

The invention discloses a GIT-based test script write-back test case method, a system, equipment and a medium. The test script write-back test case method based on the GIT comprises the following steps: setting a description file according to a grammar specification, and developing a parser; writing a test script, and recording the relation between the relative path of the test script in the GIT code library and a test case in a description file; importing a test script, reading and analyzing a description file in a GIT code library by an analyzer, displaying the read information of the test case and the test script back to a user for secondary confirmation, and recording the incidence relation of the test case and the test script into an analyzer database; determining a test script corresponding to the test case according to the incidence relation between the test case and the test script, triggering and executing the test script, acquiring an execution result of the test script, and calculating an actual result of the test script execution according to the actual service requirement. The invention also provides a test script write-back test case system, a test script write-back test case device and a test script write-back test case medium based on the GIT.

Description

GIT-based test script write-back test case method, system, device and medium
Technical Field
The invention relates to the technical field of script testing, in particular to a method, a system, equipment and a medium for writing back a test case of a test script based on GIT.
Background
In the mobile internet era, the requirement on the iteration speed of the product is higher and higher, and the defects of the traditional development mode are found in a large amount and concentrated in the test stage, so that the test period is too long, and the on-line time of the product is delayed. Therefore, a plurality of test management tools and automatic test tools appear in the market to assist the left shift of the test work, and the life cycle of the test plan and the life cycle of the test case are managed through the test management tools; an automated test tool is used to execute test script execution and to manage script execution logs and outcomes.
After the automatic test is introduced in the test work, a tester usually selects to execute a test case, then executes the script corresponding to the case on an automatic test tool and manually records the execution result of the script on the test case, namely the original action of manually executing the test case is changed into the current action of executing the test script, but the recording of the execution result of the script is not automatic, and the efficiency of executing the test case is improved.
The problems of the prior art are summarized as follows:
1. at present, the execution result of the automatic test script still depends on the manual recording of a tester to the test case, if the automatic recording is needed, the existing test management mode needs to be changed or the test script needs to be modified, the result is automatically written back to the test case in the script, and the invasiveness to the user service is high.
2. Different automatic testing frames/tools are used in different methods and actual business scenes of customers are different, an abstract model needs to be defined, the mainstream automatic testing frames/tools in the market can be covered, and the early investigation cost is very high.
In order to substantially improve the efficiency of the test case execution process after the automatic test is introduced, a set of reliable mechanism is required, so that the result of the test script execution can be automatically recorded on the test case, the test case execution and the automatic test script execution can be connected in series really, the test case execution efficiency is stepped, and the efficiency of the whole test activity is improved.
Disclosure of Invention
Based on this, the present invention provides a method, a system, a device and a medium for writing back test cases based on a GIT test script, which can improve the execution efficiency of test cases and the efficiency of test activities.
In a first aspect, the present invention provides a test script write-back test case method based on GIT, including:
setting a description file according to a grammar specification, and developing a parser;
writing a test script, and recording the relation between the relative path of the test script in the GIT code library and a test case in a description file;
importing a test script, reading and analyzing a description file in a GIT code library by an analyzer, displaying the read information of the test case and the test script back to a user for secondary confirmation, and recording the incidence relation of the test case and the test script into an analyzer database;
determining a test script corresponding to the test case according to the incidence relation between the test case and the test script, triggering and executing the test script, acquiring an execution result of the test script, and calculating an actual result of the test script execution according to the actual service requirement.
In an embodiment of the foregoing technical solution, the setting a description file according to a syntax specification includes: and setting and recording the incidence relation between the relative path of the test script and the test case according to the grammar specification to obtain a description file, and setting an appointed storage position of the description file into a root directory of the GIT code library.
In an embodiment of the foregoing technical solution, the developing resolver includes: the parser is developed according to the description file grammar specification.
In an embodiment of the foregoing technical solution, the writing a test script includes: and creating a description file in a root directory of the GIT code library, and writing a test script according to the test case.
In an embodiment of the foregoing technical solution, the reading and parsing of the description file and the test script by the parser includes: the address, credentials and branch or tag or commit id information of the GIT codebase are filled out on the parser for the parser to read the description file and test script.
In an embodiment of the foregoing technical solution, the parser reads and parses the description file and the test script, and further includes: the analyzer downloads the GIT code base and obtains a description file under the root directory of the GIT code base, and the relative path of the test script corresponding to each test case is analyzed according to the description file and is associated with the test script.
In one embodiment of the foregoing technical solution, the execution result includes an execution log and an output.
In a second aspect, the present invention provides a test script write-back test case system based on GIT, including:
the setting and developing module is configured for setting the description file according to the grammar specification and developing the resolver;
the test script compiling module is configured for compiling the test script and recording the relation between the relative path of the test script in the GIT code library and the test case in the description file;
the analysis module is configured for importing the test script, reading and analyzing the description file in the GIT code library by the analyzer, displaying the read information of the test case and the test script back to a user for secondary confirmation, and recording the association relation of the test case and the test script into the analyzer database;
and the script execution module is configured and used for determining a test script corresponding to the test case according to the incidence relation between the test case and the test script, triggering and executing the test script, acquiring an execution result of the test script, and calculating an actual result of the test script execution according to the actual service requirement.
In a third aspect, the present invention further provides a test script write-back test case device based on GIT, including:
a memory for storing one or more programs;
and the processor is used for operating the program stored in the memory so as to realize the GIT-based test script write-back test case method.
In a fourth aspect, the present invention further provides a computer-readable storage medium storing at least one program, which when executed by a processor, implements the method for writing back test cases based on the GIT test script as described in any one of the above.
Compared with the prior art, the GIT-based test script write-back test case method, the system, the equipment and the medium have the advantages that:
1. the invention can solve the problem of automatic association of the test case and the test script by compiling a description file on the premise of not changing the existing test service and the test script code of a user, thereby solving the problem that the execution result of the test script cannot be automatically recorded on the test case, further realizing real high-efficiency automatic test and greatly improving the efficiency of test activities.
2. The invention is used for solving the problem that the test case can not be automatically associated with the execution result of the test script, does not depend on any service scene and an automatic test frame or tool, does not need to change the existing test mode of a user, and has no invasion to the existing test script and the future test script of a client.
For a better understanding and practice, the invention is described in detail below with reference to the accompanying drawings.
Drawings
FIG. 1 is a block diagram of an exemplary flow of a GIT-based test script write-back test case method of the present invention.
FIG. 2 is a connection block diagram of the GIT-based test script write-back test case system of the present invention.
Detailed Description
The terms of orientation of up, down, left, right, front, back, top, bottom, and the like, referred to or may be referred to in this specification, are defined relative to their configuration, and are relative concepts. Therefore, it may be changed according to different positions and different use states. Therefore, these and other directional terms should not be construed as limiting terms.
The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a block diagram illustrating an exemplary flow of a method for writing back test cases based on a GIT test script according to the present invention.
In a first aspect, the method for writing back a test case based on a GIT test script comprises the following steps:
s1, setting a description file according to a rule specification and developing a resolver.
In the above S1, the setting the description file according to the syntax specification includes: and setting and recording the incidence relation between the relative path of the test script and the test case according to the grammar specification to obtain a description file, and setting an appointed storage position of the description file into a root directory of the GIT code library.
Further, the development resolver includes: the parser is developed according to the description file grammar specification.
And S2, writing a test script, and recording the relation between the relative path of the test script in the GIT code library and the test case in the description file.
In the above S2, the writing of the test script includes: and creating a description file in a root directory of the GIT code library, and writing a test script according to the test case.
The storage location of the descriptive file follows the agreed storage location described above.
And S3, importing the test script, reading and analyzing the description file in the GIT code library by the analyzer, displaying the read information of the test case and the test script back to a user for secondary confirmation, and recording the association relation of the test case and the test script into the analyzer database.
In the above S3, the parsing step of reading and parsing the description file and the test script includes:
filling out the address, the certificate and the branch or tag or commit Id information of the GIT code library on the analyzer, wherein the address, the certificate and the branch or tag or commit Id information are used for reading the description file and the test script by the analyzer;
the analyzer downloads the GIT code base and obtains a description file under the root directory of the GIT code base, and the relative path of the test script corresponding to each test case is analyzed according to the description file and is associated with the test script.
And S4, determining a test script corresponding to the test case according to the incidence relation between the test case and the test script, triggering and executing the test script, acquiring an execution result of the test script, and calculating an actual result of the test script according to actual service requirements.
The execution result of the test script is the execution result of the test case, and the result is directly written on the current test case.
The execution result comprises an execution log and an output.
Referring further to fig. 2, fig. 2 is a connection block diagram of the GIT-based test script write-back test case system according to the present invention.
In a second aspect, the present invention provides a test script write-back test case system based on GIT, including:
the setting and developing module is configured for setting the description file according to the grammar specification and developing the resolver;
the test script compiling module is configured for compiling the test script and recording the relation between the relative path of the test script in the GIT code library and the test case in the description file;
the analysis module is configured for importing the test script, reading and analyzing the description file in the GIT code library by the analyzer, displaying the read information of the test case and the test script back to a user for secondary confirmation, and recording the association relation of the test case and the test script into the analyzer database;
and the script execution module is configured and used for determining a test script corresponding to the test case according to the incidence relation between the test case and the test script, triggering and executing the test script, acquiring an execution result of the test script, and calculating an actual result of the test script execution according to the actual service requirement.
In a third aspect, the present invention further provides a test script write-back test case device based on GIT, including:
a memory for storing one or more programs;
and the processor is used for operating the program stored in the memory so as to realize the GIT-based test script write-back test case method.
The device may also preferably include a communication interface for communicating with external devices and for interactive transmission of data.
It should be noted that the memory may include a high-speed RAM memory, and may also include a nonvolatile memory (nonvolatile memory), such as at least one disk memory.
In a specific implementation, if the memory, the processor and the communication interface are integrated on a chip, the memory, the processor and the communication interface can complete mutual communication through the internal interface. If the memory, the processor and the communication interface are implemented independently, the memory, the processor and the communication interface may be connected to each other through a bus and perform communication with each other.
In a fourth aspect, the present invention further provides a computer-readable storage medium storing at least one program, which when executed by a processor, implements the method for writing back test cases based on GIT test scripts as described above.
It should be appreciated that the computer-readable storage medium is any data storage device that can store data or programs which can thereafter be read by a computer system. Examples of the computer readable storage medium include read-only memory, random-access memory, CD-ROMs, HDDs, DVDs, magnetic tapes, optical data storage devices, and the like. The computer readable storage medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.
Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
In some embodiments, the computer-readable storage medium may be non-transitory.
Compared with the prior art, the GIT-based test script write-back test case method, the system, the equipment and the medium have the advantages that:
1. the invention can solve the problem of automatic association of the test case and the test script by compiling a description file on the premise of not changing the existing test service and the test script code of a user, thereby solving the problem that the execution result of the test script cannot be automatically recorded on the test case, further realizing real high-efficiency automatic test and greatly improving the efficiency of the test execution stage.
2. The invention is used for solving the problem that the test case can not be automatically associated with the execution result of the test script, does not depend on any service scene and an automatic test frame/tool, does not need to change the existing test mode of a user, and has no invasion to the existing test script and the future test script of a client.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (10)

1. A test script write-back test case method based on GIT is characterized by comprising the following steps:
setting a description file according to a grammar specification, and developing a parser;
writing a test script, and recording the relation between the relative path of the test script in the GIT code library and a test case in a description file;
importing a test script, reading and analyzing a description file in a GIT code library by an analyzer, displaying the read information of the test case and the test script back to a user for secondary confirmation, and recording the incidence relation of the test case and the test script into an analyzer database;
determining a test script corresponding to the test case according to the incidence relation between the test case and the test script, triggering and executing the test script, acquiring an execution result of the test script, and calculating an actual result of the test script execution according to the actual service requirement.
2. The GIT-based test script write-back test case method according to claim 1, wherein the setting of the description file according to the syntax specification comprises: and setting and recording the incidence relation between the relative path of the test script and the test case according to the grammar specification to obtain a description file, and setting an appointed storage position of the description file into a root directory of the GIT code library.
3. The GIT-based test script write-back test case method according to claim 2, wherein the developing parser comprises: the parser is developed according to the description file grammar specification.
4. The GIT-based test script write-back test case method according to claim 3, wherein writing the test script comprises: and creating a description file in a root directory of the GIT code library, and writing a test script according to the test case.
5. The GIT-based test script write-back test case method according to claim 4, wherein the parser reads and parses the description file and the test script, comprising: the address, credentials and branch or tag or commit id information of the GIT codebase are filled out on the parser for the parser to read the description file and test script.
6. The GIT-based test script write-back test case method according to claim 5, wherein the parser reads and parses the description file and the test script, further comprising: the analyzer downloads the GIT code base and obtains a description file under the root directory of the GIT code base, and the relative path of the test script corresponding to each test case is analyzed according to the description file and is associated with the test script.
7. The GIT-based test script write-back test case method according to any one of claims 1 to 6, wherein the execution result comprises an execution log and an outcome.
8. A test script write-back test case system based on GIT is characterized by comprising:
the setting and developing module is configured for setting the description file according to the grammar specification and developing the resolver;
the test script compiling module is configured for compiling the test script and recording the relation between the relative path of the test script in the GIT code library and the test case in the description file;
the analysis module is configured for importing the test script, reading and analyzing the description file in the GIT code library by the analyzer, displaying the read information of the test case and the test script back to a user for secondary confirmation, and recording the association relation of the test case and the test script into the analyzer database;
and the script execution module is configured and used for determining a test script corresponding to the test case according to the incidence relation between the test case and the test script, triggering and executing the test script, acquiring an execution result of the test script, and calculating an actual result of the test script execution according to the actual service requirement.
9. A GIT-based test script write-back test case device is characterized by comprising:
a memory for storing one or more programs;
a processor for executing the program stored in the memory to implement the GIT-based test script write-back test case method of any one of claims 1 to 7.
10. A computer-readable storage medium storing at least one program which, when executed by a processor, implements the GIT-based test script write-back test case method of any of claims 1-7.
CN202110331152.XA 2021-03-29 2021-03-29 GIT-based test script write-back test case method, system, device and medium Active CN112799967B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110331152.XA CN112799967B (en) 2021-03-29 2021-03-29 GIT-based test script write-back test case method, system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110331152.XA CN112799967B (en) 2021-03-29 2021-03-29 GIT-based test script write-back test case method, system, device and medium

Publications (2)

Publication Number Publication Date
CN112799967A true CN112799967A (en) 2021-05-14
CN112799967B CN112799967B (en) 2021-07-06

Family

ID=75815885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110331152.XA Active CN112799967B (en) 2021-03-29 2021-03-29 GIT-based test script write-back test case method, system, device and medium

Country Status (1)

Country Link
CN (1) CN112799967B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541730A (en) * 2011-12-08 2012-07-04 北京空间飞行器总体设计部 Semantic identification and automatic generation method for spacecraft test script
CN103246604A (en) * 2013-03-29 2013-08-14 北京京东尚科信息技术有限公司 Soft testing system, soft testing method, controlling device and executing devices
CN103345446A (en) * 2013-07-10 2013-10-09 四川九洲电器集团有限责任公司 Automated testing method suitable for remote control products
CN103377125A (en) * 2012-04-25 2013-10-30 杭州勒卡斯广告策划有限公司 Code testing method, device and system
US20200201749A1 (en) * 2018-12-21 2020-06-25 Ncr Corporation Point of sale platform process crawler

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541730A (en) * 2011-12-08 2012-07-04 北京空间飞行器总体设计部 Semantic identification and automatic generation method for spacecraft test script
CN103377125A (en) * 2012-04-25 2013-10-30 杭州勒卡斯广告策划有限公司 Code testing method, device and system
CN103246604A (en) * 2013-03-29 2013-08-14 北京京东尚科信息技术有限公司 Soft testing system, soft testing method, controlling device and executing devices
CN103345446A (en) * 2013-07-10 2013-10-09 四川九洲电器集团有限责任公司 Automated testing method suitable for remote control products
US20200201749A1 (en) * 2018-12-21 2020-06-25 Ncr Corporation Point of sale platform process crawler

Also Published As

Publication number Publication date
CN112799967B (en) 2021-07-06

Similar Documents

Publication Publication Date Title
CN107516510B (en) Automatic voice testing method and device for intelligent equipment
CN106940428B (en) Chip verification method, device and system
CN103578568B (en) The performance test methods of solid state hard disc and device
CN108255729B (en) Mobile phone game automatic testing method and system based on Unity platform
CN102495789B (en) Automatic test method and device for the same
CN108717393A (en) A kind of applied program testing method and mobile terminal
CN109302522A (en) Test method, device and computer system and medium
CN105405221A (en) Method and device for automated test
CN104850411A (en) Storage system reference evaluation program generating method and apparatus
US7275231B2 (en) High level validation of designs and products
CN103186463B (en) Determine the method and system of the test specification of software
CN111679982A (en) Automatic testing method for REST API (representational State transfer) interface software
CN109032864A (en) A kind of method and system of NVMe SSD hot plug test
CN105760300B (en) A kind of automated testing method and test macro of STK/UTK business
CN103077080B (en) Based on parallel program performance collecting method and the device of high performance platform
CN110413517A (en) A kind of test report generation method, device, electronic equipment and storage medium
CN112799967B (en) GIT-based test script write-back test case method, system, device and medium
US20180239603A1 (en) Software Development Estimating Based on Functional Areas
CN111949543A (en) Testing method and device based on distributed platform, electronic equipment and storage medium
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN110554949A (en) Cross-platform process data collecting and analyzing tool, method and using method
CN108733566A (en) A kind of virtualization system automatization test system and method based on python
CN109522234A (en) Show method, system and the automated testing method of test case implementation progress
CN113672222A (en) Application program interface management device and construction method thereof
KR100990091B1 (en) Method and apparatus for the requirement management

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Git based test script write back test case method, system, equipment and medium

Effective date of registration: 20220117

Granted publication date: 20210706

Pledgee: Shanghai Pudong Development Bank Limited by Share Ltd. Guangzhou branch

Pledgor: Jiajia Technology Co.,Ltd.

Registration number: Y2022980000661

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20231127

Granted publication date: 20210706

Pledgee: Shanghai Pudong Development Bank Limited by Share Ltd. Guangzhou branch

Pledgor: Jiajia Technology Co.,Ltd.

Registration number: Y2022980000661

PC01 Cancellation of the registration of the contract for pledge of patent right