CN110209585A - A kind of software test case intelligent training method, terminal and storage medium - Google Patents

A kind of software test case intelligent training method, terminal and storage medium Download PDF

Info

Publication number
CN110209585A
CN110209585A CN201910480232.4A CN201910480232A CN110209585A CN 110209585 A CN110209585 A CN 110209585A CN 201910480232 A CN201910480232 A CN 201910480232A CN 110209585 A CN110209585 A CN 110209585A
Authority
CN
China
Prior art keywords
test case
software
test
training method
intelligent training
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.)
Withdrawn
Application number
CN201910480232.4A
Other languages
Chinese (zh)
Inventor
李男
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910480232.4A priority Critical patent/CN110209585A/en
Publication of CN110209585A publication Critical patent/CN110209585A/en
Withdrawn legal-status Critical Current

Links

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
    • 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/3676Test management for coverage analysis
    • 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 present invention provides a kind of software test case intelligent training method, terminal and storage medium, by extracting the software crucial phrase in software program;Software crucial phrase is matched with test use cases;Transfer the test case to match with software crucial phrase.Software test personnel can import testing requirement, so that obtaining software test case greatly shortens the time and manpower that Test Sample Design is write by system.In system use process, newly generated test set is tracked and recorded, for there is versatility, is accumulated, so that the platform constantly improve, association promotes the matching correlated performance of test case.Tester is reduced to the workload of test case editor, the needs based on software program is can be realized and matches corresponding test case, promote testing efficiency.

Description

A kind of software test case intelligent training method, terminal and storage medium
Technical field
The present invention relates to server technology field more particularly to a kind of software test case intelligent training method, terminal and Storage medium.
Background technique
Artificial intelligence is since the birth, and theory and technology is increasingly mature, and application field also constantly expands, it is contemplated that not Carry out artificial intelligence bring sci-tech product, it will be the wisdom of humanity " container ".Artificial intelligence can consciousness to people, thinking The simulation of information process.
With the growth of software development time, function point may by exponential growth because new function and state with Existing function interacts, and test can only linear increase, this intermediate blank that can not be covered in the presence of test.Tested It when software function changes, or based on different use environments, needs to adjust test software, this is just needed again to survey Example on probation makes modification and perfection, and test case is caused to need to adapt to the variation of tested software in real time in this way, and test meets test It is required that usual tester needs the state of each test case of artificial judgment, whether inquiry matches with tested software, if Not updating test case and will lead to test process can not be normally carried out, and influence to test.
Summary of the invention
In order to overcome the deficiencies in the prior art described above, the present invention provide one kind can intelligent Matching test case, and it is right It is associated and records in newly generated test case, for there is versatility, accumulated, so that system constantly improve test Use-case.
The present invention provides a kind of terminal for realizing software test case intelligent training method thus, comprising: memory is used for Store computer program and software test case intelligent training method;Processor, for executing the computer program and software The step of test case intelligent training method, training method includes:
Obtain software program;
According to preset rules, the software crucial phrase in software program is extracted;
Software crucial phrase is matched with test use cases;
Transfer the test case to match with software crucial phrase.
Explanation is needed further exist for, step matches software crucial phrase with test use cases further include:
Transfer each test statement of test case concentration;
Software crucial phrase is decomposed, software keyword is formed;
Software keyword and each test statement are compared one by one.
Explanation is needed further exist for, the test statement to match with software keyword is extracted;
The test statement of extraction is arranged in test case according to preset order.
Explanation is needed further exist for, step obtains after software program further include:
Collect software test script;
According to preset rules, the script keyword in software test script is extracted;
Script keyword is matched with test use cases;
The test case to match with script keyword is transferred from test case concentration.
Explanation is needed further exist for, step transfers the test case to match with script keyword from test case concentration Further include:
The test case transferred is concentrated to be compared with from test case in software test script;Test case is transferred in judgement Coverage rate relative to software test script.
Explanation is needed further exist for, the coverage rate for transferring test case relative to software test script is greater than preset threshold When, judge that the test case fits through.
Explanation is needed further exist for, the test case that test case is concentrated with test case again will be transferred and matched;
It is concentrated from test case and obtains matching cover rate greater than preset threshold test case;
The test case is associated with use-case with test case composition is transferred.
Need further exist for explanation, the test case is associated with use-case and also wrapped with transferring test case and constitute by step It includes:
When carrying out edit operation to a certain test case, carried out with the associated association test case of the test case same Walk edit operation;
After the completion of edit operation, a new association test case preservation synchronous with first association test case is formed, and Synchronization matches with software test script.
As can be seen from the above technical solutions, the invention has the following advantages that
By extracting the software crucial phrase in software program;Software crucial phrase is matched with test use cases; Transfer the test case to match with software crucial phrase.Software test personnel can import testing requirement by system, thus It obtains software test case and greatly shortens the time and manpower that Test Sample Design is write.In system use process, for new The test set of generation is tracked and is recorded, and for there is versatility, is accumulated, so that the platform constantly improve, association is mentioned Rise the matching correlated performance of test case.Tester is reduced to the workload of test case editor, can be realized based on software The needs of program match corresponding test case, promote testing efficiency.
Detailed description of the invention
In order to illustrate more clearly of technical solution of the present invention, attached drawing needed in description will be made below simple Ground introduction, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ordinary skill For personnel, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is software test case intelligent training method flow chart;
Fig. 2 is software test case intelligent training method embodiment flow chart;
Fig. 3 is software test case intelligent training method embodiment flow chart.
Specific embodiment
It is AI the present invention is based on artificial intelligence english abbreviation, is applied in software test case intelligent training, simulation extends Intelligent Theory and method with extension people is into software test case intelligent training.Using system as with the similar side of human intelligence Formula applies software test.
Software program of the present invention can be existing software program, be also possible in R&D process, or research and development It completes.The stability to software program, adaptability are needed, applicability etc. is tested.And it is understandable that software and surveys Examination is to arrange to be formed based on a plurality of sentence, and every sentence has to be formed based on multiple character arrangements.Upgrade to software program When, adjustable sentence or character can also be edited.Software program can be application program, be also possible to system Software program.Software program is the functional module based on certain purposes.
Test case concentration of the present invention includes multiple test cases, that is, the set of test case.Test Use-case can of course arrange to be formed based on a plurality of sentence, and every sentence has to be formed based on multiple character arrangements, but is not limited to State form.Test case may be implemented to test the stability of the software program after different software programs, and upgrading, adapt to Property, applicability etc..
Test case and software program described in the invention may be implemented in hardware, software, firmware or theirs is any Combination.The various features are module, and unit or assembly may be implemented together in integration logic device or separately as discrete But the logical device of interoperable or other hardware devices.In some cases, the various features of electronic circuit can be by reality It is now one or more integrated circuit device, such as IC chip or chipset.
If realized within hardware, the present invention relates to a kind of terminals, such as can be used as processor or integrated circuit dress It sets, such as IC chip or chipset.Alternatively or additionally, if realized in software or firmware, the technology can Realize at least partly by computer-readable data storage medium, including instruction, when implemented, make processor execute one or More above methods.For example, computer-readable data storage medium can store the instruction such as executed by processor.
The computer program product of computer-readable medium can form a part, may include packaging material.Data Computer-readable medium may include computer storage medium, such as random access memory (RAM), read-only memory (ROM), nonvolatile RAM (NVRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory, magnetic or Optical data carrier and analog.In some embodiments, a kind of manufacture product may include that one or more computers can Read storage media.
In some embodiments, computer readable storage medium may include non-volatile media.Term " non-transient " institute Stating storage medium can indicate to be not included in carrier wave or transmitting signal.In certain embodiments, non-transitory storage medium can be with Storing data, it can be changed over time in (for example, RAM or cache).
It includes that one or more processors execute that the code or instruction, which can be software and/or firmware by processing circuit, Such as one or more digital signal processors (DSP), general purpose microprocessor, application-specific integrated circuit (ASICs), scene can be compiled Journey gate array (FPGA) or other equivalents are integrated circuit or discrete logic.Therefore, term " processor, " due to It can refer to that any aforementioned structure or any other structure are more suitable for the technology as described herein realized as used herein.Separately Outside, in some respects, function described in the disclosure can be provided in software module and hardware module.
Method in the present invention specifically includes: as shown in Figure 1,
S11 obtains software program;
Here a software program is actively transferred by user.Software journey can certainly be transferred on preset time point by system Sequence, concrete mode is without limitation.
S12 extracts the software crucial phrase in software program according to preset rules;
Here preset rules are set by the functional information or attribute information or realm information etc. of software program It is fixed.Setting means is by user's self-setting.It is rule-based to extract the software crucial phrase in software program.Here software closes Keyword group is arranged by a plurality of sentence for forming software to be formed or multiple character arrangements are formed.Its essence is can embody software The function to be realized, or carried out by user to the code in software program based on the needs of system, sentence etc. is identified, and is come Form software crucial phrase.Its effect is the main feature of prominent intelligent training.
S13 matches software crucial phrase with test use cases;
If test use cases have test case identical with software crucial phrase, test case concentrates side test to use Example forms the corresponding relationship with software crucial phrase.Slave test case concentration that in this way can be intelligent transfers test case, keeps away Artificial lookup is exempted from, the problem of retrieval.
S14 transfers the test case to match with software crucial phrase.
The test case taken out can be supplied to the test that user carries out to software program and use, or use test Example advanced optimizes, the use of Lai Shiying software program.
It is understood that software crucial phrase is matched with test use cases, matching relationship here be can be Whole matching based on test case is also possible to the matching of sentence or character or code based on test case.Such as Fig. 2 It is shown,
S21 transfers each test statement of test case concentration;
It is certainly not limited to the sentence of test case concentration, is also based on character, code etc..
S22 decomposes software crucial phrase, forms software keyword;
It is exactly the expansion to software crucial phrase, convenient for being compared one by one with each test statement that test case is concentrated.
S23 compares software keyword and each test statement one by one.
Alignments can be the comparison of sentence, is also possible to the comparison of code or character in sentence, is also possible to software The comparison of the marker for each test statement that marker and test case are concentrated in keyword.
S24 extracts the test statement to match with software keyword;
It is consistent if there is comparing after comparison, or match, it executes and extracts instruction.
The test statement of extraction is arranged in test case according to preset order by S25.
It by the sentence or character or code etc. of extraction, is arranged, or is logined in corresponding list, by testing Personnel edit and subsequent operation, and arrangement can also be carried out based on preset mode and forms test case.
In some embodiments, it is used program that software program, which has first test case or software program, It is equipped with test case.It concentrates, and can be associated in order to which first test case can be matched to test case Corresponding test case can be needed based on test when carrying out the editor such as software program upgrading, or revision, can transfer liter Grade, or the test case that revision matches, the change of such software program can concentrate existing test to use based on test case Example carries out matching test use-case.
Specifically as shown in figure 3, after getting software program, S31 collects software test script;
S32 extracts the script keyword in software test script according to preset rules;
S33 matches script keyword with test use cases;
S34 transfers the test case to match with script keyword from test case concentration.
Software test script is concentrated the test case transferred to be compared by S35 with from test case;Test is transferred in judgement Coverage rate of the use-case relative to software test script.
S36, transfer test case relative to software test script coverage rate be greater than preset threshold when, judge the test Use-case fits through.The specific value of coverage rate can be based on being configured using needing.
Further, the test case that test case is concentrated with test case again will be transferred to match;
It is concentrated from test case and obtains matching cover rate greater than preset threshold test case;
The test case is associated with use-case with test case composition is transferred.
When carrying out edit operation to a certain test case, carried out with the associated association test case of the test case same Walk edit operation;
After the completion of edit operation, a new association test case preservation synchronous with first association test case is formed, and Synchronization matches with software test script.The mode of editor, which can be additions and deletions and change, to be looked into.
In this way when editing to association test case, system had not only saved first version, but also saved new test case. Tester can be needed based on the test of software program to transfer test case in this way.
Test case and software program form a related network, and can marking purposes according to demand.
In order to further illustrate below above embodiment with a specific embodiment explanation.
At the beginning of the training of intelligence software Test Sample Design starts, trainer or system is needed to collect based on preset condition Software requirement and software test case, and by demand and test case classification, refinement.Software requirement, software use-case are carried out Preliminary working marks convenient for the later period
The mark at initial stage needs to mark engineer according to the complete twin-request of rule and the mark of test case.Wherein mark Rule is keyword rule and data, business rule of detachment.
Keyword rule is to match corresponding test case according to keyword in demand.Such as: requirement description is " to log in System " is related to " logging in " two word, then be matched to operation flow test use cases include " input correct user name, password, Can login system " " user name of input error, correct code entry system, there is reasonable prompt " " input correct user Name, the code entry system of mistake " etc..
What data, business rule of detachment indicated is the organizational form of test set, i.e. test Business Stream use-case and test data It organizes respectively.As " inputted correct user name, password, can log in and be in the above-mentioned corresponding test set of " login system " demand System " is Business Stream test case, and " user name: root password: 123456 " " random number " is test data.
Mark is completed according to the above rule, generates mark object, the i.e. corresponding relationship of keyword and set of uses case, referred to as " mark collection ", it can be understood as the corresponding relationship of key-value.
Next, whether sound the corresponding relationship for needing to verify this key-value method of inspection formulated be as follows:
Multiple demands are randomly selected, Test Sample Design is carried out according to mark rule, generates test use cases A;
System transfers the test use cases B of test case concentration;
Coverage rate A/B is calculated, less than 90%, is then considered as evaluation and does not pass through, continue not mark collection entirely.
When the evaluation of mark collection passes through, when coverage rate is greater than 90%, software developer establishes training mould according to the set The rule that type, i.e. machine can identify.
Software test personnel can be imported testing requirement, greatly be contracted to obtain software test case by the platform The time and manpower that short Test Sample Design is write.In system use process, newly generated test set is tracked and remembered Record is accumulated for there is versatility, so that the continuous self-perfection of the platform, thus more intelligent.
The present invention also provides a kind of terminals for realizing software test case intelligent training method, comprising: memory, for depositing Store up computer program and software test case intelligent training method;Processor is surveyed for executing the computer program and software Example intelligent training method on probation, the step of to realize software test case intelligent training method.
It is described the present invention also provides a kind of computer readable storage medium with software test case intelligent training method Computer program is stored on computer readable storage medium, the computer program is executed by processor to realize software test The step of use-case intelligent training method.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of software test case intelligent training method, which is characterized in that method includes:
Obtain software program;
According to preset rules, the software crucial phrase in software program is extracted;
Software crucial phrase is matched with test use cases;
Transfer the test case to match with software crucial phrase.
2. software test case intelligent training method according to claim 1, which is characterized in that
Step matches software crucial phrase with test use cases further include:
Transfer each test statement of test case concentration;
Software crucial phrase is decomposed, software keyword is formed;
Software keyword and each test statement are compared one by one.
3. software test case intelligent training method according to claim 2, which is characterized in that
Extract the test statement to match with software keyword;
The test statement of extraction is arranged in test case according to preset order.
4. software test case intelligent training method according to claim 1, which is characterized in that
Step obtains after software program further include:
Collect software test script;
According to preset rules, the script keyword in software test script is extracted;
Script keyword is matched with test use cases;
The test case to match with script keyword is transferred from test case concentration.
5. software test case intelligent training method according to claim 4, which is characterized in that
Step transfers the test case to match with script keyword from test case concentration further include:
The test case transferred is concentrated to be compared with from test case in software test script;It is opposite that test case is transferred in judgement In the coverage rate of software test script.
6. software test case intelligent training method according to claim 5, which is characterized in that
When transferring test case and being greater than preset threshold relative to the coverage rate of software test script, test case matching is judged Pass through.
7. software test case intelligent training method according to claim 6, which is characterized in that
The test case that test case is concentrated with test case again will be transferred to match;
It is concentrated from test case and obtains matching cover rate greater than preset threshold test case;
The test case is associated with use-case with test case composition is transferred.
8. software test case intelligent training method according to claim 7, which is characterized in that
The test case is associated with use-case with test case composition is transferred by step further include:
When carrying out edit operation to a certain test case, volume is synchronized with the associated association test case of the test case Collect operation;
After the completion of edit operation, a new association test case preservation synchronous with first association test case is formed, and synchronous Match with software test script.
9. a kind of terminal for realizing software test case intelligent training method characterized by comprising
Memory, for storing computer program and software test case intelligent training method;
Processor, for executing the computer program and software test case intelligent training method, to realize such as claim 1 To described in 8 any one the step of software test case intelligent training method.
10. a kind of computer readable storage medium with software test case intelligent training method, which is characterized in that the meter Computer program is stored on calculation machine readable storage medium storing program for executing, the computer program is executed by processor to realize such as claim Described in 1 to 8 any one the step of software test case intelligent training method.
CN201910480232.4A 2019-06-04 2019-06-04 A kind of software test case intelligent training method, terminal and storage medium Withdrawn CN110209585A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910480232.4A CN110209585A (en) 2019-06-04 2019-06-04 A kind of software test case intelligent training method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910480232.4A CN110209585A (en) 2019-06-04 2019-06-04 A kind of software test case intelligent training method, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN110209585A true CN110209585A (en) 2019-09-06

Family

ID=67790602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910480232.4A Withdrawn CN110209585A (en) 2019-06-04 2019-06-04 A kind of software test case intelligent training method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN110209585A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190814A (en) * 2019-12-17 2020-05-22 远光软件股份有限公司 Software test case generation method and device, storage medium and terminal
CN111209214A (en) * 2020-02-17 2020-05-29 网易(杭州)网络有限公司 Code test processing method and device, electronic equipment and medium
CN112527658A (en) * 2020-12-17 2021-03-19 展讯通信(上海)有限公司 Test case processing method and device for unit test
CN112579466A (en) * 2020-12-25 2021-03-30 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN115134261A (en) * 2022-06-27 2022-09-30 平安银行股份有限公司 Testing method and device based on flow playback

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111190814A (en) * 2019-12-17 2020-05-22 远光软件股份有限公司 Software test case generation method and device, storage medium and terminal
CN111190814B (en) * 2019-12-17 2024-02-06 远光软件股份有限公司 Method and device for generating software test case, storage medium and terminal
CN111209214A (en) * 2020-02-17 2020-05-29 网易(杭州)网络有限公司 Code test processing method and device, electronic equipment and medium
CN111209214B (en) * 2020-02-17 2023-04-25 网易(杭州)网络有限公司 Code test processing method and device, electronic equipment and medium
CN112527658A (en) * 2020-12-17 2021-03-19 展讯通信(上海)有限公司 Test case processing method and device for unit test
CN112579466A (en) * 2020-12-25 2021-03-30 深圳证券交易所 Test case generation method and device and computer readable storage medium
CN115134261A (en) * 2022-06-27 2022-09-30 平安银行股份有限公司 Testing method and device based on flow playback
CN115134261B (en) * 2022-06-27 2023-08-22 平安银行股份有限公司 Flow playback-based testing method and device

Similar Documents

Publication Publication Date Title
CN110209585A (en) A kind of software test case intelligent training method, terminal and storage medium
CN108268581A (en) The construction method and device of knowledge mapping
CN111026671B (en) Test case set construction method and test method based on test case set
CN107957957A (en) The acquisition methods and device of test case
CN107423214A (en) Software regression testing use-case acquisition methods, device and storage medium and electronic equipment
CN109582799A (en) The determination method, apparatus and electronic equipment of knowledge sample data set
CN106909510A (en) A kind of method and server for obtaining test case
CN105468677A (en) Log clustering method based on graph structure
CN105787058B (en) A kind of user tag system and the data delivery system based on user tag system
CN103761189A (en) Test case management method and system
CN101882135B (en) Data processing method and device
CN109710933A (en) Acquisition methods, device, computer equipment and the storage medium of training corpus
CN108279885A (en) A kind of method and device that multiple model codes are carried out with Integrated Simulation
CN103955429B (en) Determine the method and device of regression test scope
CN106294128B (en) A kind of automated testing method and device exporting report data
CN106933691A (en) A kind of recognition methods and system for abnormity point in seasonal time series data sequence
CN110019111A (en) Data processing method, device, storage medium and processor
CN103235757B (en) Several apparatus and method that input domain tested object is tested are made based on robotization
CN107179933A (en) Dynamic language identification variables method, device, interpretation method and software transplanting method
CN107861950A (en) The detection method and device of abnormal text
CN101246473B (en) Segmentation system evaluating method and segmentation evaluating system
CN110134583A (en) Software test and data processing method and device
CN112230929B (en) CIM model data analysis method, CIM model data analysis device and storage medium
CN112860811B (en) Method and device for determining data blood relationship, electronic equipment and storage medium
CN109542496A (en) Incremental code determines method, apparatus and system

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190906