CN109344048A - A kind of test method, storage medium and server - Google Patents

A kind of test method, storage medium and server Download PDF

Info

Publication number
CN109344048A
CN109344048A CN201810941482.9A CN201810941482A CN109344048A CN 109344048 A CN109344048 A CN 109344048A CN 201810941482 A CN201810941482 A CN 201810941482A CN 109344048 A CN109344048 A CN 109344048A
Authority
CN
China
Prior art keywords
test
case
regression
test case
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810941482.9A
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201810941482.9A priority Critical patent/CN109344048A/en
Publication of CN109344048A publication Critical patent/CN109344048A/en
Pending 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
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The present invention provides a kind of test method, storage medium and servers, comprising: when carrying out system testing to object to be measured, records the test case during the system testing, and the test case of record is stored in benchmark test set of uses case;It obtains the use-case that regression test is carried out to the object to be measured and screens logic;Logic is screened according to the use-case to screen the benchmark test set of uses case, and the test case retained after screening deposit regression test case is concentrated;Regression test parameter is obtained, according to the test case that the regression test parameter and the regression test case are concentrated, regression test is executed to the updated object to be measured;The test result data of the regression test is compared with expected demand data, the data that contrastive test does not meet default test result are positioned according to comparison result;According to positioning as a result, exporting the test result of the regression test.The present invention can save manpower, can reduce maintenance cost, improve testing efficiency.

Description

A kind of test method, storage medium and server
Technical field
The present invention relates to software test field more particularly to a kind of test methods, storage medium and server.
Background technique
System may all will affect the use of whole system, tradition in edition upgrading or business function maintenance modification Regression testing method be usually by the test vector of operation in need sequentially arrange, be equivalent to each test of isolated operation Vector is separated by the long period every time, or runs a regression test after making larger update, and finally by artificial or simple Single order carrys out inspection result.Such regression testing method is the case where verifying lower complexity, test vector negligible amounts Under can satisfy requirement;However, with the frequent updating of system application version, the especially change of large-tonnage product data, so that very Hardly possible completes the regression test of all test vectors within a short period of time, and problem cannot be fed back as early as possible, will be further design Modification hides some dangers for.In addition, being separated by the long period runs a regression test, it can also prevent problem from feeding back as early as possible, make to design Process is in the state for constantly modifying the function of already passing through, and new modification is always possible to bring new problem, Vicious circle so is fallen into, design work is eventually led to and falls into inefficient circulation.
In conclusion existing regression test is low for the testing efficiency of the system of frequent updating, and expends a large amount of manpowers, System maintenance is at high cost.
Summary of the invention
The embodiment of the invention provides a kind of test method, storage medium and servers, to solve existing regression test It is low for the testing efficiency of the system of frequent updating, and expend a large amount of manpowers, system maintenance problem at high cost.
The first aspect of the embodiment of the present invention provides a kind of test method, comprising:
When carrying out system testing to object to be measured, the test case during the system testing is recorded, and by record The test case is stored in benchmark test set of uses case;
It obtains the use-case that regression test is carried out to the object to be measured and screens logic;
Logic is screened according to the use-case to screen the benchmark test set of uses case, and the test retained after screening is used Example deposit regression test case is concentrated;
Regression test parameter is obtained, is used according to the test that the regression test parameter and the regression test case are concentrated Example executes regression test to the updated object to be measured;
The test result data of the regression test is compared with expected demand data, is positioned according to comparison result Contrastive test does not meet the data of default test result;
According to positioning as a result, exporting the test result of the regression test.
The second aspect of the embodiment of the present invention provides a kind of server, including memory and processor, the storage Device is stored with the computer program that can be run on the processor, and the processor is realized such as when executing the computer program Lower step:
When carrying out system testing to object to be measured, the test case during the system testing is recorded, and by record The test case is stored in benchmark test set of uses case;
It obtains the use-case that regression test is carried out to the object to be measured and screens logic;
Logic is screened according to the use-case to screen the benchmark test set of uses case, and the test retained after screening is used Example deposit regression test case is concentrated;
Regression test parameter is obtained, is used according to the test that the regression test parameter and the regression test case are concentrated Example executes regression test to the updated object to be measured;
The test result data of the regression test is compared with expected demand data, is positioned according to comparison result Contrastive test does not meet the data of default test result;
According to positioning as a result, exporting the test result of the regression test.
The third aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and the computer program realizes following steps when being executed by processor:
When carrying out system testing to object to be measured, the test case during the system testing is recorded, and by record The test case is stored in benchmark test set of uses case;
It obtains the use-case that regression test is carried out to the object to be measured and screens logic;
Logic is screened according to the use-case to screen the benchmark test set of uses case, and the test retained after screening is used Example deposit regression test case is concentrated;
Regression test parameter is obtained, is used according to the test that the regression test parameter and the regression test case are concentrated Example executes regression test to the updated object to be measured;
The test result data of the regression test is compared with expected demand data, is positioned according to comparison result Contrastive test does not meet the data of default test result;
According to positioning as a result, exporting the test result of the regression test.
In the embodiment of the present invention, when carrying out system testing to object to be measured, the test during the system testing is recorded Use-case, and the test case of record is stored in benchmark test set of uses case, it obtains and regression test is carried out to the object to be measured Use-case screen logic, according to the use-case screen logic the benchmark test set of uses case is screened, will retain after screening Test case deposit regression test case concentrate, due to integrating system testing and regression test, in system testing Test case of the data of test case as regression test is collected, reuses test case to save manpower and time, then Regression test parameter is obtained, according to the test case that the regression test parameter and the regression test case are concentrated, to described The updated object to be measured executes regression test, by the test result data of the regression test and expected demand data It is compared, the data that contrastive test does not meet default test result is automatically positioned according to comparison result, save manpower, last root According to positioning as a result, exporting the test result of the regression test, the test result of this programme output includes not meeting default survey The positioning of the data of test result can reduce maintenance cost, while improving testing efficiency it is not necessary that errors present is positioned manually.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings;
Fig. 1 is the implementation flow chart of test method provided in an embodiment of the present invention;
Fig. 2 is the specific implementation flow chart of test method S103 provided in an embodiment of the present invention;
Fig. 3 is the specific implementation flow chart of test method S105 provided in an embodiment of the present invention;
Fig. 4 is the structural block diagram of test device provided in an embodiment of the present invention;
Fig. 5 is the schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field Those of ordinary skill's all other embodiment obtained without making creative work, belongs to protection of the present invention Range.
Fig. 1 shows the implementation process of test method provided in an embodiment of the present invention, and this method process includes step S101 To S106.The specific implementation principle of each step is as follows:
S101: when carrying out system testing to object to be measured, the test case during the system testing is recorded, and will note The test case of record is stored in benchmark test set of uses case.
Specifically, object to be measured is application software.System testing is the software that will pass through integration testing, as department of computer science One part of system, combines with other parts in system, the system carried out under actual motion environment to computer system Column are strictly effectively tested, and to find the potential problem of software, guarantee the normal operation of system.System testing includes functional test And robustness testing, whether functional test, that is, software system function is correct, and according to being requirement documents, such as " product is needed Seek description ".Correctness is the most important qualitative factor of software.Robustness testing, that is, software system is in abnormal conditions The ability that can be operated normally down.Robustness includes two layers of meaning: first is that fault-tolerant ability, second is that recovery capability.Of the invention real It applies in example, when carrying out system testing to object to be measured, is become based on software-implemented fault injection book, test specification book and program The test case that more coverage confirmation form generates is used for system testing, and records the test case, and benchmark test set of uses case It is exactly the set for storing test case used in record system testing process, provides reference for regression test.
Optionally, in embodiments of the present invention, the combination for needing to cover is enumerated according to the requirement documents of system testing, then Generate test case one by one, until all combinations are all capped, the generating criteria of every test case be covering as far as possible it is more not by The combination of covering.The test case of generation is for system testing and is stored in benchmark test set of uses case.
S102: it obtains the use-case that regression test is carried out to the object to be measured and screens logic.
Specifically, regression test refer to the object to be measured after having updated, such as application software update apply version Test is re-started after this to confirm and update without introducing new mistake or other codes being caused to generate mistake.Implement in the present invention In example, after object to be measured more new version, due to updating the partial code just for application software, to updated object to be measured Carrying out system testing again, not only waste of manpower also wastes time, and manually carries out regression test and need to rewrite regression test Test case, also need labor intensive and time.
In embodiments of the present invention, the testing requirement of user is different, test needed for carrying out regression test to object to be measured Use-case is also different, when needing to carry out regression test to object to be measured, obtains the use that regression test is carried out to the object to be measured Example screening logic, so that screening the test use that logic obtains the testing requirement for meeting the regression test according to the use-case Example.
The use-case screening logic of regression test in the embodiment of the present invention includes the screening of the screening of interface level, business-level And the screening of use-case rank, it is specifically as follows:
(1) screening of interface level: classify by interface type or interface index to test case;Distinct interface class Type or the corresponding test case of interface index be not identical, and when the interface of a certain number of Selection and call, corresponding test is used Example is determining.Certainly, the corresponding test case more than one of same interface.Optionally, the client id of homologous ray is not corresponding Different interfaces, and interface is previously provided with corresponding test case, is determined according to the address URL that client id searches corresponding interface Corresponding test case.
(2) screening of business-level: type of business test case classification is pressed;Wherein, type of business is the class of realization business Type, the object to be measured part in need of test for realizing a certain business function.Optionally, according to the business of identical services branch Category codes are screened, using the corresponding test case of type of business code in the benchmark test set of uses case as one kind.
(3) screening of use-case rank: being screened according to the mark of test case, the mark flag=E of test case, table Show that last time executes the test case of error.When carrying out system testing, the test case executed, which is divided into, to be run succeeded and executes Error executes the flag=E that is identified as of the test case of error, last time was quickly selected to execute the survey of error when conveniently testing again Example on probation is tested, and testing efficiency is improved.Optionally, it is identified according to the flag of test case in the benchmark test set of uses case A wheel screening is carried out, flag=E indicates that last time executes the test case of error, and the test case that last time executes error is classified as one Class.
S103: logic is screened according to the use-case, the benchmark test set of uses case is screened, by what is retained after screening Test case is stored in regression test case and concentrates.
Specifically, when carrying out system testing to object to be measured, to test comprehensively, the test case quantity of system testing is carried out It is more, and be to improve testing efficiency, when object to be measured only carries out part update, executes primary complete system again again and survey Examination certainly will waste time, and the embodiment of the present invention screens logic according to the use-case of the regression test of acquisition, from benchmark test set of uses case In filter out test case for carrying out regression test, and the test case that these screenings remain is stored in regression test In set of uses case, regression test collection is the set for storing the test case for carrying out regression test.Regression test case is concentrated also Including the corresponding testing requirement of test case.
Optionally, in embodiments of the present invention, test need are increased according to regression test stage new test specification book It asks and test case, increased test case is added to original regression test case and concentrates.If the testing requirement in certain Geju City exists Old regression test case concentration is uncovered, and increases new test case to cover to the old testing requirement that this is uncovered Lid, and the test case newly increased is merged into initial regression test case and is concentrated.Delete out-of-date testing requirement, and from original Beginning regression test case, which is concentrated, deletes out-of-date test case.Improve the testing requirement for having variation and original regression test case collection In test case.Further, it is determined that the corresponding relationship of increase and improved test case and testing requirement, if test is used Example can coverage test demand, this test case and testing requirement are associated.
Optionally, the test case in the benchmark test set of uses case is attempted to reuse, if can reuse, is retained on In the benchmark test set of uses case, if cannot reuse, which is removed in the benchmark test set of uses case.
The embodiment of the present invention is filtered out from benchmark test set of uses case according to the screening logic of regression test and is surveyed for returning The test case of examination saves manpower, reduces maintenance cost, while improving testing efficiency to be tested automatically.
As an embodiment of the present invention, as shown in Fig. 2, use-case screening logic is to be screened according to priority, on S103 is stated to specifically include:
A1: the test case of the benchmark test set of uses case is subjected to priority row according to the ordering factor of test case Sequence, the ordering factor include one or more of following ordering factor: test case whether be newly-increased test case, Whether test case is that improved test case, corresponding testing requirement priority, corresponding testing requirement number, corresponding defect are serious Degree, corresponding defect number and corresponding defect state.Specifically, the corresponding test of the test case in benchmark test set of uses case needs It asks, a test case can be simultaneously to a testing requirement be coped with, and the priority of testing requirement is preset according to user, and test is used The corresponding defect number of example is to execute the defect number of the testing case, and defect severity is previously according to defect level table It determines, and it includes normal condition, defect reparation state etc. that test case, which corresponds to defect state,.It should be noted that newly-increased survey Test case of the example in addition to benchmark test set of uses case is newly added according to new testing requirement on probation, in benchmark test set of uses case Test case improves a kind of situation for also belonging to newly-increased test case.In the embodiment of the present invention, is determined and surveyed according to ordering factor The priority of example on probation, is ranked up the test case in benchmark test set of uses case according to priority.
Specifically, after classifying in the benchmark test set of uses case, the test case in each classification is used according to test The ordering factor of example carries out priority ranking.The test case higher for priority preferentially executes.Ordering factor includes test Whether use-case is newly-increased or improves, corresponding testing requirement priority, corresponding testing requirement number, corresponds to defect severity, is right Answer one or more of defect number and corresponding defect state.According to ordering factor to Test Case Prioritization, priority Higher test case deposit regression test case collection preferentially executes.
Optionally, priority can be carried out to test case according to an ordering factor or simultaneously according to multiple ordering factors Sequence, with reference to following table 1
Table 1:
A2: the test case that priority meets pre-set priority is stored in regression test case collection.Specifically, according to preferential The test case for meeting pre-set priority is selected in test case after grade sequence, the test case as regression test is stored in back The test case returned test case to concentrate, and be unsatisfactory for pre-set priority is not stored in regression test case concentration then.
Optionally, the specific implementation flow of the step A2 is as follows:
A21: the test case in the benchmark test set of uses case is classified by specified classifying rules
A22: class testing use-case each after classification is subjected to priority ranking according to the ordering factor of test case.
In embodiments of the present invention, test case includes by interface class, by type of business point by specified classifying rules Class and by use-case mark classification.Test case grouping in the benchmark test set of uses case.
As an embodiment of the present invention, the specific implementation stream of test method step A1 provided in an embodiment of the present invention Journey, details are as follows:
A11: the priority scoring of i-th of test case in the benchmark test set of uses case is calculated according to the following formula Priority_scorei:
Wherein, N_flawiFor the corresponding defect number of i-th of test case, N_demandiIt is corresponding for i-th of test case Testing requirement number, Serious_scoreinFor the severity scale of corresponding n-th of the defect of i-th of test case, Matched_degreeimFor the matching degree of corresponding m-th of the testing requirement of i-th of test case, Status=' New ' indicates to survey Example on probation is that newly-increased perhaps improved ω is the weight that test case is priorities of test cases when increasing newly or improving.Formula (1) it indicates, if corresponding defect number is greater than 0, the scoring of the priority of test case is by corresponding defect number, corresponding Testing requirement number, corresponding defect severity and corresponding testing requirement priority determine jointly.If corresponding lack It falls into number and is equal to 0, and test case is newly-increased or improves that is, test case is " New ", is scored to the priority of test case Add the weight of 2 ω, and comprehensively considers corresponding testing requirement number and corresponding testing requirement priority.
A12: each test case in the benchmark test set of uses case is according to priority scored and is sorted from high to low.
In the embodiment of the present invention, the priority for the test case concentrated according to ordering factor calculating benchmark test case is commented Point, then each test case is according to priority scored and is sorted from high to low, facilitate screening to use for carrying out the test of regression test Example.
S104: obtaining regression test parameter, the survey concentrated according to the regression test parameter and the regression test case Example on probation executes regression test to the updated object to be measured;
In embodiments of the present invention, the regression test parameter can be user's input, be also possible to what user prestored. Regression test parameter can be parameter when system testing, be also possible to the parameter determined after software systems update.According to described The test case that regression test parameter and the regression test case are concentrated executes regression test automatically, and automatic regression test will be big Width reduces the cost in the stages such as system testing, maintenance upgrade.
S105: the test result data of the regression test is compared with expected demand data, is tied according to comparing Fruit positioning contrastive test does not meet the data of default test result.
As an embodiment of the present invention, Fig. 3 shows the specific of test method S105 provided in an embodiment of the present invention Implementation process, details are as follows:
B1: the data that regression test returns are split into field value corresponding with the data type of expected demand data.
B2: the field value of fractionation is compared with the expected demand data, if comparison result is not in expected results In range, then failure is compared.Specifically, the field value of fractionation is compared respectively at the expected demand data, if than To result in desired extent, then success is compared.
B3: position of the positioning field value for comparing failure in the source code of the object to be measured, and lost comparing The field lost and position write-in failure result are concentrated.Specifically, it is asserted according to what the description of the function point of test case was added, Assert whether fail for judging to execute to compare, thus field of the contrast locating to failure, and the field for comparing failure is put into mistake It loses in result set.
In embodiments of the present invention, the data that regression test returns are split into the data type with expected demand data Corresponding field value, and the field value of fractionation is compared with expected demand data, if comparison result is not in desired extent Interior, then contrast locating does not need manually to check failure position, to improve testing efficiency to the field value of failure.
S106: according to positioning as a result, exporting the test result of the regression test.
In embodiments of the present invention, test result includes by the test result data of the regression test and expected demand The comparison result that data are compared, and compare the position of the test result data of failure.
In the embodiment of the present invention, in the embodiment of the present invention, when carrying out system testing to object to be measured, records the system and survey Test case during examination, and the test case of record is stored in benchmark test set of uses case, it obtains to described to be measured right Use-case as carrying out regression test screens logic, screens logic according to the use-case and sieves to the benchmark test set of uses case Choosing concentrates the test case retained after screening deposit regression test case, due to collecting system testing and regression test At test case of the data of collection test case as regression test in system testing reuses test case to save Human-saving and time, then regression test parameter is obtained, it is concentrated according to the regression test parameter and the regression test case Test case executes regression test to the updated object to be measured, by the test result data of the regression test It is compared with expected demand data, the number that contrastive test does not meet default test result is automatically positioned according to comparison result According to, manpower is saved, finally according to positioning as a result, export the test result of the regression test, the test knot of this programme output Fruit includes the positioning for not meeting the data of default test result, it is not necessary that errors present is positioned manually, can reduce maintenance cost, simultaneously Improve testing efficiency.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Corresponding to test method described in foregoing embodiments, Fig. 4 shows test device provided by the embodiments of the present application Structural block diagram illustrates only part relevant to the embodiment of the present application for ease of description.
Referring to Fig. 4, which includes: use-case recording unit 41, screens logic acquiring unit 42, use-case screening unit 43, regression test unit 44, data positioning unit 45, as a result output unit 46, in which:
Use-case recording unit 41, when for carrying out system testing to object to be measured, during recording the system testing Test case, and the test case of record is stored in benchmark test set of uses case;
Logic acquiring unit 42 is screened, screens logic for obtaining the use-case for carrying out regression test to the object to be measured;
Use-case screening unit 43 screens the benchmark test set of uses case for screening logic according to the use-case, The test case retained after screening deposit regression test case is concentrated;
Regression test unit 44 is surveyed for obtaining regression test parameter according to the regression test parameter and the recurrence The test case that example on probation is concentrated executes regression test to the updated object to be measured;
Data positioning unit 45, for comparing the test result data of the regression test and expected demand data It is right, the data that contrastive test does not meet default test result are positioned according to comparison result;
As a result output unit 46, for according to positioning as a result, exporting the test result of the regression test.
Optionally, the use-case screening logic is to be screened according to priority, and the use-case screening unit 43 includes:
Sorting module, for carrying out the test case of the benchmark test set of uses case according to the ordering factor of test case Priority ranking, the ordering factor include one or more of following ordering factor: whether test case is newly-increased Whether test case, test case are improved test case, corresponding testing requirement priority, correspond to testing requirement number, is right Answer defect severity, corresponding defect number and corresponding defect state;
Use case storage module, the test case for priority to be met to pre-set priority are stored in regression test case collection.
Optionally, the sorting module includes:
Priority, which scores, determines submodule, for calculating i-th of survey in the benchmark test set of uses case according to the following formula The priority scoring Priority_score of example on probationi:
Wherein, N_flawiFor the corresponding defect number of i-th of test case, N_demandiIt is corresponding for i-th of test case Testing requirement number, Serious_scoreinFor the severity scale of corresponding n-th of the defect of i-th of test case, Matched_degreeimFor the matching degree of corresponding m-th of the testing requirement of i-th of test case, Status=' New ' indicates to survey Example on probation is that newly-increased perhaps improved ω is the weight that test case is priorities of test cases when increasing newly or improving;
Marking and queuing submodule, for according to priority scoring each test case in the benchmark test set of uses case from height To low sequence.
Optionally, the sorting module includes:
Classification submodule, for being divided the test case in the benchmark test set of uses case by specified classifying rules Class;
Classification and ordination submodule, it is excellent according to the progress of the ordering factor of test case for each class testing use-case after classifying First grade sequence.
Optionally, the data positioning unit 45 includes:
Data split module, and the data for returning to regression test split into the data type with expected demand data Corresponding field value;
Data comparing module, for the field value of fractionation to be compared with the expected demand data, if comparing knot Fruit then compares failure not within the scope of expected results;
Data locating module, for positioning position of the field value for comparing failure in the source code of the object to be measured It sets, and the field for comparing failure and position write-in failure result is concentrated.
In the embodiment of the present invention, when carrying out system testing to object to be measured, the test during the system testing is recorded Use-case, and the test case of record is stored in benchmark test set of uses case, it obtains and regression test is carried out to the object to be measured Use-case screen logic, according to the use-case screen logic the benchmark test set of uses case is screened, will retain after screening Test case deposit regression test case concentrate, due to integrating system testing and regression test, in system testing Test case of the data of test case as regression test is collected, reuses test case to save manpower and time, then Regression test parameter is obtained, according to the test case that the regression test parameter and the regression test case are concentrated, to described The updated object to be measured executes regression test, by the test result data of the regression test and expected demand data It is compared, the data that contrastive test does not meet default test result is automatically positioned according to comparison result, save manpower, last root According to positioning as a result, exporting the test result of the regression test, the test result of this programme output includes not meeting default survey The positioning of the data of test result can reduce maintenance cost, while improving testing efficiency it is not necessary that errors present is positioned manually.
Fig. 5 is the schematic diagram for the server that one embodiment of the invention provides.As shown in figure 5, the server 5 of the embodiment wraps It includes: processor 50, memory 51 and being stored in the computer that can be run in the memory 51 and on the processor 50 Program 52, such as test program.The processor 50 realizes that above-mentioned each test method is real when executing the computer program 52 Apply the step in example, such as step 101 shown in FIG. 1 is to 106.Alternatively, the processor 50 executes the computer program 52 The function of each module/unit in the above-mentioned each Installation practice of Shi Shixian, such as the function of module 41 to 46 shown in Fig. 4.
Illustratively, the computer program 52 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 51, and are executed by the processor 50, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 52 in the server 5 is described.
The server 5 can be desktop PC, notebook, palm PC and cloud server etc. and calculate equipment. The server may include, but be not limited only to, processor 50, memory 51.It will be understood by those skilled in the art that Fig. 5 is only It is the example of server 5, does not constitute the restriction to server 5, may include than illustrating more or fewer components or group Close certain components or different components, for example, the server can also include input-output equipment, network access equipment, Bus etc..
The processor 50 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 51 can be the internal storage unit of the server 5, such as the hard disk or memory of server 5. The memory 51 is also possible to the External memory equipment of the server 5, such as the plug-in type being equipped on the server 5 is hard Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 51 can also both include the internal storage unit of the server 5 or wrap Include External memory equipment.The memory 51 is for other programs needed for storing the computer program and the server And data.The memory 51 can be also used for temporarily storing the data that has exported or will export.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of test method characterized by comprising
When carrying out system testing to object to be measured, the test case during the system testing is recorded, and will be described in record Test case is stored in benchmark test set of uses case;
It obtains the use-case that regression test is carried out to the object to be measured and screens logic;
Logic is screened according to the use-case to screen the benchmark test set of uses case, and the test case retained after screening is deposited Enter regression test case concentration;
Regression test parameter is obtained, it is right according to the test case that the regression test parameter and the regression test case are concentrated The updated object to be measured executes regression test;
The test result data of the regression test is compared with expected demand data, according to comparison result contrast locating pair Test does not meet the data of default test result;
According to positioning as a result, exporting the test result of the regression test.
2. test method according to claim 1, which is characterized in that the use-case screening logic is to be sieved according to priority Choosing, it is described that the benchmark test set of uses case is screened according to use-case screening logic, the test retained after screening is used Example deposit regression test case is concentrated, comprising:
The test case of the benchmark test set of uses case is subjected to priority ranking, the row according to the ordering factor of test case Sequence factor includes one or more of following ordering factor: whether test case is newly-increased test case, test case Whether it is improved test case, corresponding testing requirement priority, corresponding testing requirement number, corresponds to defect severity, is right Answer defect number and corresponding defect state;
The test case that priority meets pre-set priority is stored in regression test case collection.
3. test method according to claim 2, which is characterized in that the test by the benchmark test set of uses case is used Example carries out priority ranking according to the ordering factor of test case, comprising:
The priority scoring Priority_ of i-th of test case in the benchmark test set of uses case is calculated according to the following formula scorei:
Wherein, N_flawiFor the corresponding defect number of i-th of test case, N_demandiFor the corresponding survey of i-th of test case Examination demand number, Serious_scoreinFor the severity scale of corresponding n-th of the defect of i-th of test case, Matched_degreeimFor the matching degree of corresponding m-th of the testing requirement of i-th of test case, Status=' New ' indicates to survey Example on probation is that newly-increased perhaps improved ω is the weight that test case is priorities of test cases when increasing newly or improving;
Each test case in the benchmark test set of uses case is according to priority scored and is sorted from high to low.
4. test method according to claim 2, which is characterized in that the test by the benchmark test set of uses case is used Example carries out priority ranking according to the ordering factor of test case, comprising:
Test case in the benchmark test set of uses case is classified by specified classifying rules;
Class testing use-case each after classification is subjected to priority ranking according to the ordering factor of test case.
5. test method according to any one of claims 1 to 4, which is characterized in that the survey by the regression test Test result data are compared with expected demand data, and contrast locating is to the data for not meeting default test result, comprising:
The data that regression test returns are split into field value corresponding with the data type of expected demand data;
The field value of fractionation is compared with the expected demand data, if comparison result not within the scope of expected results, Then compare failure;
Position position of the field value for comparing failure in the source code of the object to be measured, and the field that failure will be compared It is concentrated with position write-in failure result.
6. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realization is as described in any one of claims 1 to 5 the step of test method when the computer program is executed by processor.
7. a kind of server, including memory, processor and storage can transport in the memory and on the processor Capable computer program, which is characterized in that the processor realizes following steps when executing the computer program:
When carrying out system testing to object to be measured, the test case during the system testing is recorded, and will be described in record Test case is stored in benchmark test set of uses case;
It obtains the use-case that regression test is carried out to the object to be measured and screens logic;
Logic is screened according to the use-case to screen the benchmark test set of uses case, and the test case retained after screening is deposited Enter regression test case concentration;
Regression test parameter is obtained, it is right according to the test case that the regression test parameter and the regression test case are concentrated The updated object to be measured executes regression test;
The test result data of the regression test is compared with expected demand data, according to comparison result contrast locating pair Test does not meet the data of default test result;
According to positioning as a result, exporting the test result of the regression test.
8. server according to claim 7, which is characterized in that the use-case screening logic is to be screened according to priority, It is described that the benchmark test set of uses case is screened according to use-case screening logic, the test case retained after screening is deposited Enter regression test case concentration, comprising:
The test case of the benchmark test set of uses case is subjected to priority ranking, the row according to the ordering factor of test case Sequence factor includes one or more of following ordering factor: whether test case is newly-increased test case or test Whether use-case is improved test case, corresponding testing requirement priority, corresponding testing requirement number, the corresponding serious journey of defect Degree, corresponding defect number and corresponding defect state;
The test case that priority meets pre-set priority is stored in regression test case collection.
9. server according to claim 8, which is characterized in that the test case by the benchmark test set of uses case Priority ranking is carried out according to the ordering factor of test case, comprising:
The priority scoring Priority_ of i-th of test case in the benchmark test set of uses case is calculated according to the following formula scorei:
Wherein, N_flawiFor the corresponding defect number of i-th of test case, N_demandiFor the corresponding survey of i-th of test case Examination demand number, Serious_scoreinFor the severity scale of corresponding n-th of the defect of i-th of test case, Matched_degreeimFor the matching degree of corresponding m-th of the testing requirement of i-th of test case, Status=' New ' indicates to survey Example on probation is that newly-increased perhaps improved ω is the weight that test case is priorities of test cases when increasing newly or improving;
Each test case in the benchmark test set of uses case is according to priority scored and is sorted from high to low.
10. server according to any one of claims 7 to 9, which is characterized in that the test by the regression test Result data is compared with expected demand data, and contrast locating is to the data for not meeting default test result, comprising:
The data that regression test returns are split into field value corresponding with the data type of expected demand data;
The field value of fractionation is compared with the expected demand data, if comparison result not within the scope of expected results, Then compare failure;
Position position of the field value for comparing failure in the source code of the object to be measured, and the field that failure will be compared It is concentrated with position write-in failure result.
CN201810941482.9A 2018-08-17 2018-08-17 A kind of test method, storage medium and server Pending CN109344048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810941482.9A CN109344048A (en) 2018-08-17 2018-08-17 A kind of test method, storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810941482.9A CN109344048A (en) 2018-08-17 2018-08-17 A kind of test method, storage medium and server

Publications (1)

Publication Number Publication Date
CN109344048A true CN109344048A (en) 2019-02-15

Family

ID=65291393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810941482.9A Pending CN109344048A (en) 2018-08-17 2018-08-17 A kind of test method, storage medium and server

Country Status (1)

Country Link
CN (1) CN109344048A (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947656A (en) * 2019-03-29 2019-06-28 北京奇艺世纪科技有限公司 A kind of testing case management and device
CN110083543A (en) * 2019-05-07 2019-08-02 江苏满运软件科技有限公司 Regression testing method, device, electronic equipment and storage medium
CN110209590A (en) * 2019-06-05 2019-09-06 山东科技大学 A kind of automated testing method and system towards intelligent robot
CN110633222A (en) * 2019-11-01 2019-12-31 中国银行股份有限公司 Method and device for determining regression test case
CN110727582A (en) * 2019-09-06 2020-01-24 平安健康保险股份有限公司 Program testing method and device, computer equipment and storage medium
CN110888801A (en) * 2019-10-23 2020-03-17 贝壳技术有限公司 Software program testing method and device, storage medium and electronic equipment
CN111008137A (en) * 2019-12-06 2020-04-14 广州品唯软件有限公司 Method and system for customizing test set
CN111308935A (en) * 2020-02-27 2020-06-19 北京广利核***工程有限公司 Automatic testing device and method for priority management product
CN111352782A (en) * 2020-02-28 2020-06-30 北京字节跳动网络技术有限公司 Interface testing method and device, computer equipment and storage medium
CN111552646A (en) * 2020-04-30 2020-08-18 北京百度网讯科技有限公司 Method and apparatus for regression testing
CN111858371A (en) * 2020-07-28 2020-10-30 北京达佳互联信息技术有限公司 Software testing method, system, storage medium and computer equipment
CN112052162A (en) * 2020-08-14 2020-12-08 国电南瑞科技股份有限公司 Regression test case selection method and device
CN112256578A (en) * 2020-10-23 2021-01-22 恒生电子股份有限公司 Management method and management terminal of test case, electronic device and storage medium
CN112346898A (en) * 2020-10-28 2021-02-09 交控科技股份有限公司 Test method and system for rail transit system
CN112487140A (en) * 2020-11-27 2021-03-12 平安科技(深圳)有限公司 Question-answer dialogue evaluating method, device, equipment and storage medium
CN113434436A (en) * 2021-07-30 2021-09-24 拉扎斯网络科技(上海)有限公司 Test case generation method and device, electronic equipment and storage medium
CN114168472A (en) * 2021-12-09 2022-03-11 惠州Tcl移动通信有限公司 Use case execution method and device, electronic equipment and computer readable storage medium
CN114595137A (en) * 2020-12-03 2022-06-07 中国联合网络通信集团有限公司 Test case obtaining method and device
CN115865809A (en) * 2023-02-02 2023-03-28 爱集微咨询(厦门)有限公司 Data transmission method and device, electronic equipment and readable storage medium
CN116662210A (en) * 2023-07-28 2023-08-29 杭州罗莱迪思科技股份有限公司 Interface regression testing method, device and application

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866317A (en) * 2010-06-29 2010-10-20 南京大学 Regression test case selection method based on cluster analysis
CN102521122A (en) * 2011-11-23 2012-06-27 北京交通大学 Dynamic scene oriented method and system for generating test sequence
CN105159827A (en) * 2015-08-21 2015-12-16 北京航空航天大学 Reliability accelerated testing method for GUI software
CN105302720A (en) * 2015-10-27 2016-02-03 浪潮电子信息产业股份有限公司 Software regression test case screening method
CN105446885A (en) * 2015-12-28 2016-03-30 西南大学 Regression testing case priority ranking technology based on needs
CN105718371A (en) * 2016-01-21 2016-06-29 深圳市同创国芯电子有限公司 Regression test method, device and system
CN106815140A (en) * 2015-12-02 2017-06-09 北京奇虎科技有限公司 A kind of interface test method and device
CN107391376A (en) * 2017-07-26 2017-11-24 成都科来软件有限公司 A kind of regression testing method
CN107544905A (en) * 2017-08-22 2018-01-05 中国农业银行股份有限公司 The optimization method and system of regression test case collection

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866317A (en) * 2010-06-29 2010-10-20 南京大学 Regression test case selection method based on cluster analysis
CN102521122A (en) * 2011-11-23 2012-06-27 北京交通大学 Dynamic scene oriented method and system for generating test sequence
CN105159827A (en) * 2015-08-21 2015-12-16 北京航空航天大学 Reliability accelerated testing method for GUI software
CN105302720A (en) * 2015-10-27 2016-02-03 浪潮电子信息产业股份有限公司 Software regression test case screening method
CN106815140A (en) * 2015-12-02 2017-06-09 北京奇虎科技有限公司 A kind of interface test method and device
CN105446885A (en) * 2015-12-28 2016-03-30 西南大学 Regression testing case priority ranking technology based on needs
CN105718371A (en) * 2016-01-21 2016-06-29 深圳市同创国芯电子有限公司 Regression test method, device and system
CN107391376A (en) * 2017-07-26 2017-11-24 成都科来软件有限公司 A kind of regression testing method
CN107544905A (en) * 2017-08-22 2018-01-05 中国农业银行股份有限公司 The optimization method and system of regression test case collection

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
屈波等: "回归测试中测试用例优先级技术研究综述", 《计算机科学与探索》 *
张江河: "软件测试用例复用研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
李政等: "面向回归测试的测试用例集优化技术研究", 《中国金融电脑》 *

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947656A (en) * 2019-03-29 2019-06-28 北京奇艺世纪科技有限公司 A kind of testing case management and device
CN110083543B (en) * 2019-05-07 2022-08-19 江苏满运软件科技有限公司 Regression testing method, device, electronic equipment and storage medium
CN110083543A (en) * 2019-05-07 2019-08-02 江苏满运软件科技有限公司 Regression testing method, device, electronic equipment and storage medium
CN110209590A (en) * 2019-06-05 2019-09-06 山东科技大学 A kind of automated testing method and system towards intelligent robot
CN110209590B (en) * 2019-06-05 2023-04-21 山东科技大学 Automatic testing method and system for intelligent robot
CN110727582A (en) * 2019-09-06 2020-01-24 平安健康保险股份有限公司 Program testing method and device, computer equipment and storage medium
CN110888801A (en) * 2019-10-23 2020-03-17 贝壳技术有限公司 Software program testing method and device, storage medium and electronic equipment
CN110633222A (en) * 2019-11-01 2019-12-31 中国银行股份有限公司 Method and device for determining regression test case
CN111008137A (en) * 2019-12-06 2020-04-14 广州品唯软件有限公司 Method and system for customizing test set
CN111008137B (en) * 2019-12-06 2023-06-23 广州品唯软件有限公司 Method and system for customizing test set
CN111308935A (en) * 2020-02-27 2020-06-19 北京广利核***工程有限公司 Automatic testing device and method for priority management product
CN111352782A (en) * 2020-02-28 2020-06-30 北京字节跳动网络技术有限公司 Interface testing method and device, computer equipment and storage medium
CN111552646B (en) * 2020-04-30 2023-08-29 阿波罗智能技术(北京)有限公司 Method and apparatus for regression testing
CN111552646A (en) * 2020-04-30 2020-08-18 北京百度网讯科技有限公司 Method and apparatus for regression testing
CN111858371A (en) * 2020-07-28 2020-10-30 北京达佳互联信息技术有限公司 Software testing method, system, storage medium and computer equipment
CN112052162B (en) * 2020-08-14 2022-09-23 国电南瑞科技股份有限公司 Regression test case selection method and device
CN112052162A (en) * 2020-08-14 2020-12-08 国电南瑞科技股份有限公司 Regression test case selection method and device
CN112256578B (en) * 2020-10-23 2024-01-19 恒生电子股份有限公司 Management method and system for test cases, electronic equipment and storage medium
CN112256578A (en) * 2020-10-23 2021-01-22 恒生电子股份有限公司 Management method and management terminal of test case, electronic device and storage medium
CN112346898A (en) * 2020-10-28 2021-02-09 交控科技股份有限公司 Test method and system for rail transit system
CN112487140A (en) * 2020-11-27 2021-03-12 平安科技(深圳)有限公司 Question-answer dialogue evaluating method, device, equipment and storage medium
CN112487140B (en) * 2020-11-27 2024-06-07 平安科技(深圳)有限公司 Question-answer dialogue evaluating method, device, equipment and storage medium
CN114595137A (en) * 2020-12-03 2022-06-07 中国联合网络通信集团有限公司 Test case obtaining method and device
CN114595137B (en) * 2020-12-03 2024-05-10 中国联合网络通信集团有限公司 Test case acquisition method and device
CN113434436A (en) * 2021-07-30 2021-09-24 拉扎斯网络科技(上海)有限公司 Test case generation method and device, electronic equipment and storage medium
CN114168472A (en) * 2021-12-09 2022-03-11 惠州Tcl移动通信有限公司 Use case execution method and device, electronic equipment and computer readable storage medium
CN115865809A (en) * 2023-02-02 2023-03-28 爱集微咨询(厦门)有限公司 Data transmission method and device, electronic equipment and readable storage medium
CN116662210A (en) * 2023-07-28 2023-08-29 杭州罗莱迪思科技股份有限公司 Interface regression testing method, device and application
CN116662210B (en) * 2023-07-28 2023-09-29 杭州罗莱迪思科技股份有限公司 Interface regression testing method, device and application

Similar Documents

Publication Publication Date Title
CN109344048A (en) A kind of test method, storage medium and server
CN102236672B (en) A kind of data lead-in method and device
CN105580032B (en) For reducing instable method and system when upgrading software
US9558230B2 (en) Data quality assessment
CN108491254A (en) A kind of dispatching method and device of data warehouse
CN103473076A (en) Issuing method and issuing system for code version
CN107741903A (en) Application compatibility method of testing, device, computer equipment and storage medium
CN110377524B (en) Method, device, system and medium for testing report system
CN112418691A (en) Construction method of policy intelligent matching system for enterprise service
CN112183782A (en) Fault work order processing method and equipment
CN109117172A (en) A kind of method and device of the terminal versions number identification of target terminal
CN109828906A (en) UI automated testing method, device, electronic equipment and storage medium
CN110688536A (en) Label prediction method, device, equipment and storage medium
CN110262975A (en) Test data management method, device, equipment and computer readable storage medium
CN110221933A (en) Aacode defect assists restorative procedure and system
CN108345979B (en) Service testing method and device
CN112153378A (en) Method and system for testing video auditing capability
CN109859035A (en) A kind of data processing method of application product functional test, apparatus and system
US20100153155A1 (en) Method and system for identifying software applications for offshore testing
US8463799B2 (en) System and method for consolidating search engine results
CN115840560A (en) Management system for software development process
CN117236304A (en) Method for realizing Excel general import based on template configuration
CN116308826A (en) Insurance product online method, apparatus, equipment and storage medium
US10339037B1 (en) Recommendation engine for recommending prioritized performance test workloads based on release risk profiles
CN111144429A (en) Object classification method and system, computer system and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190215