CN111563041B - Test case on-demand accurate execution method - Google Patents

Test case on-demand accurate execution method Download PDF

Info

Publication number
CN111563041B
CN111563041B CN202010380984.6A CN202010380984A CN111563041B CN 111563041 B CN111563041 B CN 111563041B CN 202010380984 A CN202010380984 A CN 202010380984A CN 111563041 B CN111563041 B CN 111563041B
Authority
CN
China
Prior art keywords
code
test case
feature
test
requirement
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
CN202010380984.6A
Other languages
Chinese (zh)
Other versions
CN111563041A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202010380984.6A priority Critical patent/CN111563041B/en
Publication of CN111563041A publication Critical patent/CN111563041A/en
Application granted granted Critical
Publication of CN111563041B publication Critical patent/CN111563041B/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/3688Test management for test execution, e.g. scheduling of test suites
    • 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

Abstract

The invention provides a test case on-demand accurate execution method, which comprises a user code submitting client, a demand management system, a test case automatic execution system and a code hosting platform, wherein a code demand information extraction module and a code case relation analysis module are added between the user code submitting client and the code hosting platform, and the method comprises the following steps: (1) a test case designer inputs a test case into the test case management system and records the incidence relation between the test case and the requirements in the requirement management system; (2) when a user develops a software code, inquiring a related requirement of the code development from a requirement management system, and marking as Feature A; the invention can accurately identify which test cases need to be executed according to the change of each code, thereby efficiently identifying the cases which need to be updated and maintained, further greatly reducing the regression test cost and improving the test efficiency.

Description

Test case on-demand accurate execution method
Technical Field
The invention relates to a test case, in particular to a method for accurately executing the test case according to requirements.
Background
In the actual software development and test process, testers need to design different test cases according to different user scenes and functions, and the test cases need to be changed and maintained following the change of software. Along with the lapse of time, the software scale is larger and larger, the number of test cases is also larger and larger, the regression execution cost of the test cases brought by the new software requirements is larger and larger, and the identification of which cases need to be updated is more difficult.
For automated test cases, full execution can be performed to find those cases that the test cannot pass to identify the test cases that need to be updated, but the regression execution cost is too high. For manual test cases, maintenance is eventually lost.
The existing method for executing precise test cases according to code changes is unit test, unit test frameworks of various languages analyze from a grammatical level, an association relation between the unit test cases and the code methods is established, and when the relevant code methods are found to be changed, the unit test cases associated with the relevant code methods are triggered to execute. However, the problem with this type of technique is that it is only valid for automation unit test cases, and completely ineffective for functional testing of business logic and for manual testing.
Disclosure of Invention
The invention aims to provide a method for accurately executing test cases on demand, which aims to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
a test case on-demand accurate execution method comprises a user code submission client, a demand management system, a test case automatic execution system and a code hosting platform, wherein a code demand information extraction module and a code case relation analysis module are added between the user code submission client and the code hosting platform, and the method comprises the following steps:
(1) a test case designer inputs a test case into the test case management system and records the incidence relation between the test case and the requirements in the requirement management system;
(2) when a user develops a software code, inquiring a related requirement of the code development from a requirement management system, and marking as Feature A;
(3) after the user codes are written, code submission is carried out on the codes to a code hosting platform through a code submitting client, and the feature A information associated with the code submission is filled into submission log information;
(4) intercepting code submission through a newly added code requirement information extraction module between a code submission client and a code hosting platform, and analyzing a submitted data message to analyze feature A information in submitted log information;
(5) the code requirement information extraction module is used for integrating the user code into the code hosting platform and acquiring the change submitted by the code;
(6) the code requirement information extraction module carries out combined signature on the code path and the method name of the newly added and modified part designed in the code change, and a unique identifiable identifier is formed for each changed method;
(7) the code requirement information extraction module records the associated information of each method and feature A in the N methods as binary data (method signature and feature A >);
(8) the code requirement information extraction module sends binary data to the code use case relation analysis module;
(9) recording the relation of the code method, the requirement and the test case by using ternary data (method signature, requirement and [ test case array ] >) in the code case relation analysis module, wherein the method signature and the requirement of all the ternary data can not be completely the same and represent the corresponding relation of different code methods and requirements; the test case array represents a test case set associated with the requirement;
(10) the code use case relation analysis module receives the binary data in the step (8) and inquires whether the binary data exists in the ternary data stored in the code use case relation analysis module;
if the test case exists, initiating a query request to the test case management system, and updating the test case data corresponding to the feature A to the method signature, the feature A and the [ test case array ] > corresponding to the method signature and the feature A;
if the test case data does not exist, establishing ternary data corresponding to the method signature and the feature A, then initiating a query request to the test case management system, and updating the test case data corresponding to the feature A into the method signature and the feature A corresponding to the method signature and the feature A and the test case array;
(11) the code case relation analysis module continuously inquires the ternary data stored by the code case relation analysis module whether other data which are related to the method signature and are unrelated to feature A exist;
if not, the step (11) is ended; if the test case exists, initiating a query request to the test case management system, and updating the test case data corresponding to the non-feature A to the method signature, the non-feature A and the test case array corresponding to the method signature and the non-feature A;
(12) the code case relation analysis module is used for updating the ternary data of the code method, the requirement and the test case; the method comprises the steps that test case arrays in a method, feature A, a test case array (JMSE), a method signature, a non-feature A and a test case array (JMSE) are mathematically combined to form a new array, the new array is used as a test case summary array associated with the method signature, and the new array is sent back to a code requirement information extraction module in the form of the method signature and the test case array union (JMSE);
(13) the code demand information extraction module pushes data to an automatic test case execution system or a tester for manual test, and the data is used as a test case set recommended to be executed by the code submission and is accurately executed according to requirements;
when the test is executed by the test case automatic execution system or a tester performing manual test, the test case automatic execution system queries the test case management system to acquire detailed information of the test case and performs test execution.
As a further scheme of the invention: the code change is divided into three types of addition, deletion and modification.
Compared with the prior art, the invention has the beneficial effects that:
after the method is adopted, a code demand information extraction module is added between the user code submission client and the code hosting platform, and the associated information of the code method and the test case is established and stored in the code case relation analysis module based on the analysis of the code submission log information. In a scene of generating code change, the code case relation analysis module can provide a test case set associated with the changed code, so that a downstream research and development process can accurately execute the test case according to needs, and the test efficiency is improved.
The invention can accurately identify which test cases need to be executed according to the change of each code, thereby efficiently identifying the cases which need to be updated and maintained, and further greatly reducing the regression test cost. Meanwhile, correlation analysis can be carried out based on research and development data, the latest test case associated with the changed code method can be found, the test case can be accurately executed according to needs, and the test efficiency is improved.
Drawings
FIG. 1 is a schematic diagram of an overall system for a method for accurately executing test cases on demand.
FIG. 2 is a system flow diagram of a method for accurately executing test cases on demand.
Detailed Description
The technical solution of the present patent will be described in further detail with reference to the following embodiments.
Referring to fig. 1-2, a test case on-demand precise execution method includes a user code submission client, a demand management system, a test case automatic execution system and a code hosting platform, wherein a code demand information extraction module and a code case relation analysis module are added between the user code submission client and the code hosting platform; the code requirement information extraction module intercepts and analyzes the message of data submitted by a user, and the code case relation analysis module records the test case data associated with the code method, the requirement and provides a query interface. Comprises the following steps:
(1) a test case designer inputs a test case into the test case management system and records the incidence relation between the test case and the requirement in the requirement management system; as indicated by arrows 1 and 2 in the figure.
(2) When a user develops a software code, inquiring a related requirement of the code development from a requirement management system, and marking as Feature A; as indicated by the two arrows 3, 4.
(3) After the user codes are written, code submission is carried out on the codes to a code hosting platform through a code submitting client, and the feature A information associated with the code submission is filled into submission log information; as indicated by the two-headed arrow 5. Wherein, the steps (1), (2) and (3) are standard practice of software development process.
(4) Intercepting code submission through a newly added code requirement information extraction module between a code submission client and a code hosting platform, and analyzing a submitted data message to analyze feature A information in submitted log information;
(5) the code requirement information extraction module is used for integrating the user code into the code hosting platform and acquiring the change submitted by the code; as indicated by the two arrows 6, 7.
(6) For the code hosting platform, code change is divided into three types, namely addition, deletion and modification; the code requirement information extraction module carries out combined signature on the code path and the method name of the newly added and modified part designed in the code change; forming a uniquely identifiable identifier for each of the altered methods; assuming that the code submitting the newly added and modified part of the code relates to N methods, and marking each method and a complete file path thereof as method 1, method 2.
(7) The code requirement information extraction module records the associated information of each method and feature A in the N methods as the following binary data < method signature, feature A >, such as < method2, feature A >;
(8) the code requirement information extraction module sends the binary data generated in the step (7) to the code use case relation analysis module; as indicated by the two-headed arrow 8.
(9) The code case relation analysis module maintains the following ternary data for recording the relation < method signature, requirement, [ test case array ] >, of the code method, requirement and test case, wherein the method signatures and requirements of all the ternary data cannot be completely the same and represent the corresponding relation of different code methods and requirements; the test case array represents a test case set associated with the requirement;
(10) after receiving the binary data in the step (8), the code case relation analysis module firstly queries whether the binary data exists in the ternary data stored in the code case relation analysis module; if the test case exists, initiating a query request to the test case management system, and updating the test case data corresponding to the feature A to the method signature, the feature A and the [ test case array ] > corresponding to the method signature and the feature A; if the test case data does not exist, establishing ternary data corresponding to the method signature and the feature A, then initiating a query request to the test case management system, and updating the test case data corresponding to the feature A into the method signature and the feature A corresponding to the method signature and the feature A and the test case array;
for example, for the binary data of < method2, feature A >, firstly, whether the data of method2 and feature A already exist in the ternary data stored in the self-storage device is inquired; if yes, a query request is sent to the test case management system, and as shown by arrows 9 and 10 in the figure, the test case data corresponding to feature A is updated to < method2, feature A, [ test case array ] > corresponding to < method2 and feature A >. If not, establishing ternary data corresponding to the < method2 and feature A >, then initiating a query request to the test case management system in the same way, as shown by arrows 9 and 10 in the figure, and updating the test case data corresponding to the feature A to the < method2, feature A and [ test case array ] > corresponding to the < method2 and feature A >;
(11) the code case relation analysis module continuously inquires the ternary data stored by the code case relation analysis module whether other data which are related to the method signature and are unrelated to feature A exist;
if not, the step (11) is ended; if the test case exists, initiating a query request to the test case management system, and updating the test case data corresponding to the non-feature A to the method signature, the non-feature A and the test case array corresponding to the method signature and the non-feature A;
for example, for the binary data of < method2, feature a >, after step (10) is completed, it is also queried whether there are other data related to method2 but not related to feature a in the ternary data stored in itself, for example, < method2, feature B, [ test case array ] >, and if not, step (11) is ended; if the result is found, a query request is also initiated to the test case management system, and as shown by arrows 9 and 10 in the figure, the test case data corresponding to feature B is updated to < method2, feature B and [ test case array ] > corresponding to < method2 and feature B >;
(12) the code case relation analysis module is used for updating the ternary data of the code method, the requirement and the test case; the method comprises the steps that test case arrays in a method, feature A, a test case array (JMSE), a method signature, a non-feature A and a test case array (JMSE) are mathematically combined to form a new array, the new array is used as a test case summary array associated with the method signature, and the new array is sent back to a code requirement information extraction module in the form of the method signature and the test case array union (JMSE);
for example, for method2, mathematically combining the test case arrays in < method2, feature a, [ test case array ] >, < method2, feature B, [ test case array ] >, to form a new array, which is used as the test case combined array associated with method2, and sending back to the code requirement information extraction module in the form of < method2, [ test case array combined set ] >; as indicated by arrow 11 in fig. 2.
(13) The code requirement information extraction module pushes the binary data of all the methods received in the step (12) to a test case automatic execution system, and the binary data is shown as an arrow 12 in the figure; or pushed to the tester of manual test as the test case set recommended to be executed by the code submission, as shown by the arrow 13 in the figure; and performing accurate execution as required.
When the test is executed by the test case automatic execution system or a tester performing manual test, the test case management system is inquired to obtain the detailed information of the test case, and the test execution is performed. As shown by the two arrows 14, 15; indicated by arrows 16, 17.
In this embodiment, it should be noted that the code submission client, the requirement management system, the test case automation execution system, and the code hosting platform adopted in the present application are common research and development systems, which are prior art, and therefore, the connection relationship and principle thereof are not described herein again.
Although the preferred embodiments of the present patent have been described in detail, the present patent is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present patent within the knowledge of those skilled in the art.

Claims (2)

1. A test case on-demand accurate execution method is characterized by comprising a user code submission client, a demand management system, a test case automatic execution system and a code hosting platform, wherein a code demand information extraction module and a code case relation analysis module are added between the user code submission client and the code hosting platform, and the method comprises the following steps:
(1) a test case designer inputs a test case into the test case management system and records the incidence relation between the test case and the requirements in the requirement management system;
(2) when a user develops a software code, inquiring a related requirement of the code development from a requirement management system, and marking as Feature A;
(3) after the user codes are written, code submission is carried out on the codes to a code hosting platform through a code submitting client, and the feature A information associated with the code submission is filled into submission log information;
(4) intercepting code submission through a newly added code requirement information extraction module between a code submission client and a code hosting platform, and analyzing a submitted data message to analyze feature A information in submitted log information;
(5) the code requirement information extraction module is used for integrating the user code into the code hosting platform and acquiring the change submitted by the code;
(6) the code requirement information extraction module carries out combined signature on the code path and the method name of the newly added and modified part designed in the code change, and a unique identifiable identifier is formed for each changed method;
(7) the code requirement information extraction module records the associated information of each method and feature A in the N methods as binary data (method signature and feature A >);
(8) the code requirement information extraction module sends binary data to the code use case relation analysis module;
(9) recording the relation of the code method, the requirement and the test case by using ternary data (method signature, requirement and [ test case array ] >) in the code case relation analysis module, wherein the method signature and the requirement of all the ternary data can not be completely the same and represent the corresponding relation of different code methods and requirements; the test case array represents a test case set associated with the requirement;
(10) the code use case relation analysis module receives the binary data in the step (8) and inquires whether the binary data exists in the ternary data stored in the code use case relation analysis module;
if the test case exists, initiating a query request to the test case management system, and updating the test case data corresponding to the feature A to the method signature, the feature A and the [ test case array ] > corresponding to the method signature and the feature A;
if the test case data does not exist, establishing ternary data corresponding to the method signature and the feature A, then initiating a query request to the test case management system, and updating the test case data corresponding to the feature A into the method signature and the feature A corresponding to the method signature and the feature A and the test case array;
(11) the code case relation analysis module continuously inquires the ternary data stored by the code case relation analysis module whether other data which are related to the method signature and are unrelated to feature A exist;
if not, the step (11) is ended; if the test case exists, initiating a query request to the test case management system, and updating the test case data corresponding to the non-feature A to the method signature, the non-feature A and the test case array corresponding to the method signature and the non-feature A;
(12) the code case relation analysis module is used for updating the ternary data of the code method, the requirement and the test case; the method comprises the steps that test case arrays in a method, feature A, a test case array (JMSE), a method signature, a non-feature A and a test case array (JMSE) are mathematically combined to form a new array, the new array is used as a test case summary array associated with the method signature, and the new array is sent back to a code requirement information extraction module in the form of the method signature and the test case array union (JMSE);
(13) the code demand information extraction module pushes data to an automatic test case execution system or a tester for manual test, and the data is used as a test case set recommended to be executed by the code submission and is accurately executed according to requirements;
when the test is executed by the test case automatic execution system or a tester performing manual test, the test case automatic execution system queries the test case management system to acquire detailed information of the test case and performs test execution.
2. The method of claim 1, wherein the code change is classified into add, delete, and modify.
CN202010380984.6A 2020-05-08 2020-05-08 Test case on-demand accurate execution method Active CN111563041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010380984.6A CN111563041B (en) 2020-05-08 2020-05-08 Test case on-demand accurate execution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010380984.6A CN111563041B (en) 2020-05-08 2020-05-08 Test case on-demand accurate execution method

Publications (2)

Publication Number Publication Date
CN111563041A CN111563041A (en) 2020-08-21
CN111563041B true CN111563041B (en) 2022-02-08

Family

ID=72071814

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010380984.6A Active CN111563041B (en) 2020-05-08 2020-05-08 Test case on-demand accurate execution method

Country Status (1)

Country Link
CN (1) CN111563041B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035374A (en) * 2020-09-09 2020-12-04 中国铁塔股份有限公司 Regression testing method and system and electronic equipment
CN112256556A (en) * 2020-09-11 2021-01-22 上海汇付数据服务有限公司 Test method and test device using test case
CN112200536B (en) * 2020-09-30 2022-10-11 厦门市美亚柏科信息股份有限公司 Test case monitoring management method, terminal equipment and storage medium
CN112100359A (en) * 2020-10-14 2020-12-18 北京嘀嘀无限科技发展有限公司 Test case searching method, device, equipment and storage medium
CN112685312A (en) * 2020-12-31 2021-04-20 广州品唯软件有限公司 Test case recommendation method and device for uncovered codes
CN113704112A (en) * 2021-08-30 2021-11-26 浙江网商银行股份有限公司 Data processing method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6415396B1 (en) * 1999-03-26 2002-07-02 Lucent Technologies Inc. Automatic generation and maintenance of regression test cases from requirements
CN101908017A (en) * 2010-06-01 2010-12-08 南京大学 Regression test case screening method based on partial multi-coverage
CN102364449A (en) * 2011-10-24 2012-02-29 中兴通讯股份有限公司 Generation method and system for minimum test case set
CN104239204A (en) * 2014-08-20 2014-12-24 浪潮(北京)电子信息产业有限公司 Generation method of minimum test case suite
CN104572031A (en) * 2013-10-09 2015-04-29 腾讯科技(深圳)有限公司 Method and device for generating test case
CN106294138A (en) * 2016-07-29 2017-01-04 东软集团股份有限公司 Method for generating test case and device
CN107515826A (en) * 2017-08-28 2017-12-26 广州阿里巴巴文学信息技术有限公司 Test case accurate recommendation method, device, system, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6415396B1 (en) * 1999-03-26 2002-07-02 Lucent Technologies Inc. Automatic generation and maintenance of regression test cases from requirements
CN101908017A (en) * 2010-06-01 2010-12-08 南京大学 Regression test case screening method based on partial multi-coverage
CN102364449A (en) * 2011-10-24 2012-02-29 中兴通讯股份有限公司 Generation method and system for minimum test case set
CN104572031A (en) * 2013-10-09 2015-04-29 腾讯科技(深圳)有限公司 Method and device for generating test case
CN104239204A (en) * 2014-08-20 2014-12-24 浪潮(北京)电子信息产业有限公司 Generation method of minimum test case suite
CN106294138A (en) * 2016-07-29 2017-01-04 东软集团股份有限公司 Method for generating test case and device
CN107515826A (en) * 2017-08-28 2017-12-26 广州阿里巴巴文学信息技术有限公司 Test case accurate recommendation method, device, system, equipment and storage medium

Also Published As

Publication number Publication date
CN111563041A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
CN111563041B (en) Test case on-demand accurate execution method
CN107506451B (en) Abnormal information monitoring method and device for data interaction
CN112506807B (en) Automatic test system for interface serving multiple systems
CN109558411A (en) A kind of lower chain synchronous method and device based on block chain data
CN108647357B (en) Data query method and device
CN110083581B (en) Log tracing method and device, storage medium and computer equipment
CN108111364B (en) Service system testing method and device
CN103077108A (en) Method and system for warning browser crash
CN113190220A (en) JSON file differentiation comparison method and device
CN114281663A (en) Test processing method, test processing device, electronic equipment and storage medium
CN111581110B (en) Service data accuracy detection method, device, system and storage medium
CN116107589B (en) Automatic compiling method, device and equipment of software codes and storage medium
CN114625407A (en) Method, system, equipment and storage medium for implementing AB experiment
CN116775488A (en) Abnormal data determination method, device, equipment, medium and product
CN113886221B (en) Test script generation method and device, storage medium and electronic equipment
CN110889017B (en) Retrieval method and terminal for information encrypted through base64
CN113868116A (en) Test dependent data generation method and device, server and storage medium
CN109525642B (en) LIMS system client data automatic reporting method under user mechanism
CN113138906A (en) Call chain data acquisition method, device, equipment and storage medium
CN111695031A (en) Label-based searching method, device, server and storage medium
CN112965993B (en) Data processing system, method, device and storage medium
CN107609008A (en) A kind of data importing device and method from relevant database to Kafka based on Apache Sqoop
CN115617319A (en) Information processing method and device
CN108008957B (en) Data reverse analysis method in iOS
CN117349170A (en) Method for verifying functional correctness by interface automation test

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