CN108829590A - A kind of method for testing software, apparatus and system - Google Patents

A kind of method for testing software, apparatus and system Download PDF

Info

Publication number
CN108829590A
CN108829590A CN201810549985.1A CN201810549985A CN108829590A CN 108829590 A CN108829590 A CN 108829590A CN 201810549985 A CN201810549985 A CN 201810549985A CN 108829590 A CN108829590 A CN 108829590A
Authority
CN
China
Prior art keywords
data
tested
routing information
condition
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810549985.1A
Other languages
Chinese (zh)
Other versions
CN108829590B (en
Inventor
郑重
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201810549985.1A priority Critical patent/CN108829590B/en
Publication of CN108829590A publication Critical patent/CN108829590A/en
Application granted granted Critical
Publication of CN108829590B publication Critical patent/CN108829590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

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

Abstract

The embodiment of the invention provides a kind of method for testing software, apparatus and system, wherein the system comprises:Case management device, for determining the organizational form and descriptor format of test case, wherein descriptor format includes multiple description fields, and description field includes routing information and executes condition, and routing information includes keyword message;Scheduler is sent to data parser for reading the test case in case management device, and by routing information, and, the data to be tested that data parser is determined according to routing information are obtained, and data to be tested and execution condition are sent to use-case actuator;Digital Resolver for determining reading and writing data mode according to routing information, and uses reading and writing data mode, determines data to be tested according to routing information;Use-case actuator is treated test data and is tested, obtain test result for using execution condition.Present invention may apply to the data tests of various data types.

Description

A kind of method for testing software, apparatus and system
Technical field
The present invention relates to data test technical fields, more particularly to a kind of software testing system, method, apparatus, electronics Equipment and machine readable media.
Background technique
In soft project, software data is an important component of software, and software data is generally comprised within configuration File, program code, interface, which pass, to be participated in the forms such as interface return.And for software data test be software test can not or Scarce a part, it is pre- whether the design that software data test can farthest verify software before software publication meets Phase, if the problems such as there are safety risks.
In software data test, most-often used method includes desk checking and automation verification two ways.
Desk checking usually determines whether data meet expection, this side in such a way that naked eyes compare by tester It is more effective that formula tests a small amount of data, but when needing data volume to be tested very big, the workload of this mode and Efficiency is difficult to meet testing requirement.
It is to use specific language (such as script for needing data to be tested that automation, which verifies most-often used mode, Language) corresponding test script or tool are developed to complete the test of corresponding data.This automatic chemical industry using script edit Tool, than the very fast and test than accurately completing corresponding data.But during a software development, software Demand and the realization logic of code are frequently necessary to iteratively faster, and the corresponding data of software also can and then be changed.This requires Corresponding test script and tool need constantly to safeguard and update.Also, the data or tissue used due to different software The mode of data is not quite similar, and is difficult to find out test of the general test frame of one kind to cover the data of most of type.
Summary of the invention
The embodiment of the present invention is the technical problem to be solved is that a kind of method for testing software is provided, to solve existing test Script and tool need constantly to safeguard and update, and, the more difficult data for covering most of type of existing test frame The problem of test.
Correspondingly, the embodiment of the invention also provides a kind of software testing system, a kind of software testing device, a kind of electronics Equipment and one or more machine readable medias, to guarantee the implementation and application of the above method.
To solve the above-mentioned problems, the invention discloses a kind of software testing systems, including:
Case management device, for determining the organizational form and descriptor format of test case, wherein the descriptor format includes Multiple description fields, the description field include routing information and execute condition, and the routing information includes keyword message;
Scheduler for reading the test case in the case management device, and the routing information is sent to described Data parser, and, obtain the data to be tested that the data parser is determined according to the routing information, and will it is described to Test data and the execution condition are sent to the use-case actuator;
Digital Resolver for determining reading and writing data mode according to the routing information, and uses the reading and writing data side Formula determines data to be tested according to the routing information;
Use-case actuator tests the data to be tested, obtains test knot for using the execution condition Fruit.
Preferably, the scheduler is also used to:
Receive the test result that the use-case actuator is sent, wherein the test result includes error result;
Error prompt information is generated according to the error result;
Show the bomp information.
Preferably, the bomp information includes at least one of the following:File name where the data of error, The routing information of error, specification of error, executes condition at error-value.
Preferably, the description field further includes the first filter condition, and the scheduler is also used to:
The number to be tested that using first filter condition, the data to be tested are screened, and screening is obtained Accordingly and the execution condition is sent to the use-case actuator.
Preferably, the routing information includes file path and data path;
The data parser is also used to:
According to the file path, corresponding reading and writing data mode is determined;
Using the reading and writing data mode, corresponding file data is read from disk, and the file data is stored in In memory cache;
Data to be tested are determined from the file data according to the data path, and the data to be tested are sent Into scheduler.
Preferably, the description field further includes the second filter condition, and second filter condition is included in the path In information, the data parser is also used to:
According to specified character, the data path is divided, obtains keyword group;
For each keyword in the keyword group, judges that the keyword whether there is and meet default judgment rule The second filter condition;
According to second filter condition, corresponding data to be tested are filtered out from the file data.
Preferably, the execution condition includes:Specified call method and the corresponding specified numerical value of the call method.
The invention also discloses a kind of method for testing software, the method includes:
Determine the organizational form and descriptor format of test case, wherein the descriptor format includes multiple description fields, institute It states description field to include routing information and execute condition, the routing information includes keyword message;
Reading and writing data mode is determined according to the routing information for the test case, and uses the reading and writing data Mode determines data to be tested according to the routing information;
Using the execution condition, the data to be tested are tested, obtain test result.
Preferably, the test result includes error result, the method also includes:
Error prompt information is generated according to the error result;
Show the bomp information.
Preferably, the bomp information includes at least one of the following:File name where the data of error, The routing information of error, specification of error, executes condition at error-value.
Preferably, the description field further includes the first filter condition, it is described use the execution condition, to it is described to Test data is tested, and before obtaining test result, further includes:
Using first filter condition, the data to be tested are screened.
Preferably, the routing information includes file path and data path;It is described to use the reading and writing data mode, Data to be tested are determined according to the routing information, including:
According to the file path, corresponding reading and writing data mode is determined;
Using the reading and writing data mode, corresponding file data is read from disk, and the file data is stored in In memory cache;
Data to be tested are determined from the file data according to the data path.
Preferably, the description field further includes the second filter condition, and second filter condition is included in the path It is described to determine data to be tested from the file data according to the data path in information, including:
According to specified character, the data path is divided, obtains keyword group;
For each keyword in the keyword group, judges that the keyword whether there is and meet default judgment rule The second filter condition;
According to second filter condition, corresponding data to be tested are filtered out from the file data.
Preferably, the execution condition includes:Specified call method and the corresponding specified numerical value of the call method.
The invention also discloses a kind of software testing device, described device includes:
Test case determining module, for determining the organizational form and descriptor format of test case, wherein the description lattice Formula includes multiple description fields, and the description field includes routing information and executes condition, and the routing information includes key Word information;
Data determining module to be tested, for determining reading and writing data according to the routing information for the test case Mode, and the reading and writing data mode is used, data to be tested are determined according to the routing information;
Test module tests the data to be tested, obtains test result for using the execution condition.
The invention also discloses a kind of electronic equipment, including:
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, are executed when by one or more of processors When, so that the electronic equipment executes a kind of such as above-mentioned method for testing software.
The invention also discloses one or more machine readable medias, are stored thereon with instruction, when by one or more When managing device execution, so that the processor executes a kind of above-mentioned method for testing software.
Compared with prior art, the embodiment of the present invention includes following advantages:
In embodiments of the present invention, user can describe test case according to scheduled descriptor format, wherein each test Use-case may include the routing information comprising keyword message, and execute condition.For each test case, the present invention is implemented Example can determine corresponding reading and writing data mode according to the routing information, so that the embodiment of the present invention can be adapted for various data The data test of type, and this test will not change because of the realization of software and the type of software, improve automation and survey The scope of application of examination.
In addition, in embodiments of the present invention, routing information may include keyword message, it can be according to the keyword message Data are screened, testing data is obtained.It is corresponded to when the realization logic of demand and code due to software needs to update software Data when, it is only necessary to the corresponding keyword message of the routing information is updated, without the test script and tool to software data It is safeguarded and is updated, save update and maintenance cost.
Further, since the routing information includes keyword message, data are being filtered according to keyword message Afterwards, it is possible to reduce data volumes to be tested are needed, to improve the efficiency of data test.
And the keyword message can be customized by the user, so that testing data is more in line with the personalized of user and needs It asks, improves the precision of test.
Detailed description of the invention
Fig. 1 is a kind of structural block diagram of software testing system embodiment of the embodiment of the present invention;
Fig. 2 is the test case schematic diagram in a kind of software testing system embodiment of the embodiment of the present invention;
Fig. 3 is the bomp schematic diagram in a kind of software testing system embodiment of the embodiment of the present invention;
Fig. 4 is a kind of step flow chart of method for testing software embodiment of the embodiment of the present invention;
Fig. 5 is a kind of structural block diagram of software testing device embodiment of the embodiment of the present invention.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific real Applying mode, the present invention is described in further detail.
Referring to Fig.1, a kind of structural block diagram of software testing system embodiment of the embodiment of the present invention, the software are shown Test macro 10 at least may include:Case management device 101, scheduler 102, data parser 103 and use-case actuator 104。
The case management device 101, for determining the organizational form and descriptor format of test case.
In embodiments of the present invention, user can add and organize use-case, case management device in case management device 101 101 for management of test cases set, it is specified that the organizational form and descriptor format of test case, in the implementation, use-case pipe Managing test case all in device 101 can be described using unified format.
Specifically, case management device 101 defines the storage of use-case file (i.e. inspection rule file, test order file) Form, for example, storing a use-case file with py (python) file.
On the one hand, use-case file defines the organizational form of test case, wherein organizational form refers to one group of test case Using which kind of topology convergence.In the concrete realization, one group of survey can be polymerize in the form of the collection class such as k-v dictionary or array Examination rule (or checking rule).For example, key can be test order when with k-v dictionary to describe one group of test order Serial number, value are a specific test order.
On the other hand, use-case file alsies specify the descriptor format of test case, and format description refers to that a use-case uses Any mode describes.Wherein, each test case can be described using unified format (i.e. Writing method).It, can when realizing To describe a test case in the form of k-v dictionary.
As an example, the descriptor format of each test case may include multiple description fields, for example, description field It can include but is not limited to:Use case description name, routing information path, filter condition filter (filter), condition is executed Condition, etc..
Wherein, name describes test case institute content to be tested, describes the description information of test case.
Path may include file path and data path xpath.Wherein, file path, which describes, needs text to be tested Part information, including file name, file store path etc..Data path describes specifically need in above-mentioned need file to be tested Data to be tested.In embodiments of the present invention, data path may include keyword message, i.e., data path can be using pass The form of key word is described, and further, keyword may include the customized keyword of user, with the mode of keyword come Data path is described, the organizational form for needing the testing data obtained more can be intuitively demonstrated by, to position quickly Testing data.
Filter condition describes the filtering for carrying out data, so that obtaining user thinks data to be tested.
In one embodiment, filter condition may include the second filter condition, which may include In routing information, i.e. the second filter condition is included in path field, such as, if it is desired to obtain data to be tested { " a ": {"b":1,"d":2},"c":{"b":2,"d":3 } in } when all d=3 b value, then the description of path can for " */d=3, B ", wherein d=3 is the second filter condition, and the keyword for the data path expressed by the second filter condition can screen More precisely more meet the data to be tested of user demand out.
In another embodiment, filter condition can also include the first filter condition, the first filter condition independently of Routing information, first filter condition are pre-processed for treating test data.
Condition describes the data to be tested condition to be met, and provides whether common logic judgment, file are deposited In the spread with judgment method.
As an example, execution condition can include but is not limited to:Specified call method and the call method Corresponding specified numerical value.Specifically, the specified call method may include common logic judging method, the logic judgment side Method can satisfy common numerical value logic testing, which can include but is not limited to:>,<,==,!=,>=, <=etc. judgment methods.In addition to this, case management device 101 can also provide customized extension, what user can write oneself Judgment method directly describes in the execution condition of test case.
For example, a test case can be as shown in Figure 2 using the description of k-v dictionary format.In Fig. 2, name field Describing the test case and needing content to be tested is that " article id is necessarily present in fight in the fight of preferential suit table .xlsx In the article id of article table .xlsx ".
Data path is " xpath ":" data/*/combat_item_id ", describing the data for needing to check is data All (* indicates all) corresponding execution of combat_item_id field under field.Then there are the second mistakes under xpath field Filter condition " combat_item_id ".First filter condition filter is independently of the filter condition of data path, describe to The pretreatment mode of test data, for example, the pretreatment mode in Fig. 4 is that data to be tested are processed into tuple2list.
The execution condition of condition field description is:Call method is the method for " being present in ", and call method is corresponding Specified numerical value is " combat_item_data.py:data/*/id".
In addition, checking that rule file alsies specify the mapping of file path and test order, when realizing, k- can be used The form of v corresponds to file path and test order, wherein key indicate need check file path (i.e. data from which In), including filename etc., value is that (i.e. the certain field of some data needs which kind of school carried out corresponding test order It tests).
It should be noted that the use-case file of the embodiment of the present invention is not limited to above-mentioned k-v dictionary format, can also use Other modes indicate description field, for example, being indicated in the form of the data.
The scheduler 102 is sent for reading the test case in the case management device, and by the routing information The extremely data parser, and, the data to be tested that the data parser is determined according to the routing information are obtained, and will The data to be tested and the execution condition are sent to the use-case actuator.
In embodiments of the present invention, scheduler 102 is responsible for scheduling case management device 101, data parser 103 is held with use-case The orderly function of row device 104.
Specifically, scheduler 102 can read the test case in case management device 101 first, case management 101 is called Specified in analytic method test case is parsed, obtain routing information path, the filter condition of file for needing to check Filter, execution condition condition etc..
Then, scheduler 102 can will need the rule checked to be transmitted to data parser 103, for example, path can be believed Breath path passes to data parser 103.103 resolution path information path of data parser, and extracted from corresponding file Data Data to be tested returns to scheduler 102.
In one embodiment, after obtaining the data to be tested that data-analyzing machine 103 determines, scheduler 102 is also used In:Using first filter condition, the data to be tested are screened, and will the obtained data to be tested of screening and The execution condition is sent to the use-case actuator.
After scheduler parses test case, if including the field of the first filter condition in test case, adjust Degree device 102 can treat test data according to the first filter condition and be filtered screening, and the number to be tested that will be obtained after filtering According to the execution condition condition that meets in test case, be sent to use-case actuator 104.If do not wrapped in test case The first filter condition is included, then the execution condition that scheduler 102 will directly can meet in Data Data to be tested and test case Condition is sent to use-case actuator 104.In a preferred embodiment, scheduler 102 is also used to receive use-case and holds The test result that row device 104 is sent.
In the concrete realization, it after use-case actuator 104 receives data to be tested and condition, can call Specific logic judging method or the customized inspection method of user execute inspection, return to test result to scheduler 102.
As an example, which may include correct result (TRUE) or error result (FALSE).
When the test result is correct result, then next test case can be continued to execute.
When the test result is error result, in one embodiment, scheduler 102 is also used to according to the mistake Accidentally result generates error prompt information, and shows the bomp information.
As an example, which can include but is not limited to:File name where the data of error, The routing information of error, error-value, specification of error, execution condition, etc..
In the concrete realization, as shown in Fig. 3 bomp schematic diagram, which can be with message informing format Notify user, in detail specification of error (i.e. inspect-type), error file title and the path of the data of output error, error section Point, error data check the information such as condition (i.e. execution condition).
The Digital Resolver 103 for determining reading and writing data mode according to the routing information, and uses the number According to read-write mode, data to be tested are determined according to the routing information.
In embodiments of the present invention, Digital Resolver 103 can according to routing information, match the routing information it is corresponding to Test data.
In a preferred embodiment of an embodiment of the present invention, data parser 103 is further used for
According to the file path, corresponding reading and writing data mode is determined;Using the reading and writing data mode, from disk Corresponding file data is read, and the file data is stored in memory cache;According to the data path from the file Data to be tested are determined in data, and the data to be tested are sent in scheduler.
In the concrete realization, data parser 103 can be determined and be corresponded to according to the suffix of the file name in file path Reading and writing data mode.
As an example, the embodiment of the present invention can support the data structures such as txt, csv, py, json, xls, and provide The extended method that other formats are supported.Wherein, every kind of data structure uses corresponding reading and writing data mode, for example, xml lattice The data of formula use the read-write mode of xml, and the data of json format are using json read-write mode etc..
After data parser 103 determines reading and writing data mode, it can be read from disk according to the reading and writing data mode Corresponding file data, and according to reading and writing data mode, this document data are stored in memory cache.It needs to use this when next time When the content of file, there is no need to be read and write from disk by IO, but taken out directly from memory, therefore same file Pass through memory cache, it is only necessary to which an IO read-write, next time takes out from memory, to improve the speed of entire test run.
After determining file data, data parser 103 can be according to the keyword of data path, from file data really Fixed corresponding data to be tested.Then, which can be sent directly to scheduler 102 by data parser 103.
In the concrete realization, data parser 103 obtain routing information after, can first determine whether be in the routing information No includes the second filter condition.In one embodiment, data parser 103 can be also used for:It is right according to specified character The data path is divided, and keyword group is obtained;For each keyword in the keyword group, the key is judged Word whether there is the second filter condition for meeting default judgment rule;According to second filter condition, from the file data In filter out corresponding data to be tested.
In the concrete realization, data parser 103 can be split the data path in routing information, specifically, Data path can be split, obtained according to the specified character (such as the separators such as "/" and " ") in data path One keyword group comprising multiple keywords.The keyword in keyword group is traversed, judges whether each keyword contains symbol The second filter condition for closing default judgment rule, for example, the second filter condition can be " d=3 ", " combat_item_id " Deng.
If including the second filter condition in keyword, data parser 103 can be according to the second filter condition to text Number of packages obtains data to be tested, and data to be tested are sent to scheduler 102, and will be to be tested according to screening is filtered Data are stored in memory.In embodiments of the present invention, data parser 103 can be determined with the different types of data of automatic adaptation Corresponding reading and writing data mode improves this hair so that the execution of test case is unrelated with data type in the embodiment of the present invention The scope of application of bright embodiment, so that the embodiment of the present invention can be adapted for various types of data tests.
The use-case actuator 104 is tested the data to be tested, is obtained for using the execution condition Test result.
Specifically, after use-case actuator 104 receives execution condition and data to be tested, can to the condition of execution into Row parsing, determines specified call method and the corresponding specified numerical value of the call method.For example, specific logic can be called Judgment method or the customized inspection method of user are treated test data using the corresponding specified numerical value of the call method and are surveyed Examination checks, obtains test result.
For example, if then specified call method is " being greater than " corresponding method, being adjusted when the condition of execution is [" being greater than ", 1] It is numerical value 1 with the corresponding specified numerical value of method, then data to be tested and the number 1 in execution condition is compared, are obtained Test result, if data to be tested are greater than numerical value 1, test result is correct result;If data to be tested are less than or equal to number Value 1, then test result is error result.
In embodiments of the present invention, it is made of case management device, scheduler, data parser and use-case actuator soft Part test macro, user can configure the organizational form and descriptor format of test case by case management device, and scheduler can be with According to the test case in case management device, dispatch the operation of data parser and use-case actuator, then during the test, Reading and writing data mode can be determined according to routing information, and according to reading and writing data mode from the corresponding store path of routing information It is middle to obtain data to be tested, it then according to the condition of execution, treats test data and is tested, obtain test result.The present invention is real Example is applied due to that can survey in a manner of the different reading and writing data of automatic adaptation with the data of type most of in Coverage Software Testing Examination, and will not change because of the realization of software and the type of software.
Referring to Fig. 4, a kind of step flow chart of method for testing software embodiment of the embodiment of the present invention, the software are shown Test method can be applied in above-mentioned software testing system, can specifically include following steps:
Step 401, the organizational form and descriptor format of test case are determined, wherein the descriptor format includes multiple retouches Field is stated, the description field includes routing information and executes condition, and the routing information includes keyword message;
Step 402, reading and writing data mode is determined according to the routing information for the test case, and described in use Reading and writing data mode determines data to be tested according to the routing information;
Step 403, using the execution condition, the data to be tested are tested, obtain test result.
In a preferred embodiment of an embodiment of the present invention, the test result includes error result, and the method is also Including:
Error prompt information is generated according to the error result;
Show the bomp information.
In a preferred embodiment of an embodiment of the present invention, the bomp information includes but is not limited to:Error The routing information of file name, error where data, specification of error, executes condition at error-value.
In a preferred embodiment of an embodiment of the present invention, the description field further includes the first filter condition, in step Before rapid 403, the embodiment of the present invention can also include the following steps:
Using first filter condition, the data to be tested are screened.
In a preferred embodiment of an embodiment of the present invention, the routing information includes file path and data road Diameter;The step 402 can further include following sub-step:
Sub-step S11 determines corresponding reading and writing data mode according to the file path;
Sub-step S12 reads corresponding file data using the reading and writing data mode from disk, and by the text Number of packages is according in deposit memory cache;
Sub-step S13 determines data to be tested according to the data path from the file data.
In a preferred embodiment of an embodiment of the present invention, the description field further includes the second filter condition, described Second filter condition is included in the routing information, and the sub-step S13 can further include following sub-step:
Sub-step S131 divides the data path according to specified character, obtains keyword group;
Sub-step S132 judges that the keyword whether there is and meets for each keyword in the keyword group Second filter condition of default judgment rule;
Sub-step S133 filters out corresponding number to be tested according to second filter condition from the file data According to.
In a preferred embodiment of an embodiment of the present invention, the execution condition includes but is not limited to:Specified calling Method and the corresponding specified numerical value of the call method.
Specifically, in one embodiment, carrying out globality to the embodiment of the present invention below and illustrating:
1) use-case is described, user describes a test case using same format, for example, using the dictionary format of k-v Test case is described, all test case forms a test use cases, wherein each test case includes:Use case description Name, routing information path, filter condition filter (filter), execution condition condition etc., further, the path Information path includes file path and data path, and the data path may include the second filter condition;
2) according to above-mentioned file path, corresponding file data is positioned, and determines the corresponding reading and writing data of this document data This document data are read into memory by mode according to the reading and writing data mode from disk;
3) data path is parsed, judges whether data path includes the second filter condition;
4) the corresponding data of the second filter condition are matched in file data, it is to be tested to be filtered out from file data Data;
5) whether judge in test case comprising the first filter condition independently of routing information;If including the first filtering 6) condition executes after being then filtered according to the first filter condition to the data to be tested, if not including the first filter condition, It then directly executes 6);
6) the execution condition condition for parsing test case, calls the corresponding called side of execution condition condition Method and the corresponding numerical value of the call method, are compared the data to be tested, obtain test result;If test result is Correct result True then then reads next data;If test result is error result False, then follow the steps 7);
7) error prompt information is generated, corresponding notification message is specifically generated according to test case and error result, in detail Filename where the data of thin output error, the path of data, specific error-value, the information such as bomp.
In embodiments of the present invention, user can describe test case according to scheduled descriptor format, wherein each test Use-case may include the routing information comprising keyword message, and execute condition.For each test case, the present invention is implemented Example can determine corresponding reading and writing data mode according to the routing information, so that the embodiment of the present invention can be adapted for various data The data test of type, and this test will not change because of the realization of software and the type of software, improve automation and survey The scope of application of examination.
In addition, in embodiments of the present invention, routing information may include keyword message, it can be according to the keyword message Data are screened, testing data is obtained.It is corresponded to when the realization logic of demand and code due to software needs to update software Data when, it is only necessary to the corresponding keyword message of the routing information is updated, without the test script and tool to software data It is safeguarded and is updated, save update and maintenance cost.
Further, since the routing information includes keyword message, data are being filtered according to keyword message Afterwards, it is possible to reduce data volumes to be tested are needed, to improve the efficiency of data test.
And the keyword message can be customized by the user, so that testing data is more in line with the personalized of user and needs It asks, improves the precision of test.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, embodiment of that present invention are not limited by the describe sequence of actions, because according to According to the embodiment of the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and the related movement not necessarily present invention is implemented Necessary to example.
Referring to Fig. 5, a kind of structural block diagram of software testing device embodiment of the embodiment of the present invention is shown, it specifically can be with Including following module:
Test case determining module 501, for determining the organizational form and descriptor format of test case, wherein described to retouch Stating format includes multiple description fields, and the description field includes routing information and executes condition, and the routing information includes Keyword message;
Data determining module 502 to be tested, for determining data according to the routing information for the test case Read-write mode, and the reading and writing data mode is used, data to be tested are determined according to the routing information;
Test module 503 tests the data to be tested, obtains test knot for using the execution condition Fruit.
In a preferred embodiment of an embodiment of the present invention, the test result includes error result, and described device is also It may include following module:
Bomp module for generating error prompt information according to the error result, and shows the bomp Information.
In a preferred embodiment of an embodiment of the present invention, the bomp information includes but is not limited to:Error The routing information of file name, error where data, specification of error, executes condition at error-value.
In a preferred embodiment of an embodiment of the present invention, the description field further includes the first filter condition, described Device can also include following module:
Filtering module screens the data to be tested for using first filter condition.
In a preferred embodiment of an embodiment of the present invention, the routing information includes file path and data road Diameter;The data determining module to be tested 502 may include following submodule:
Read-write mode determines submodule, for determining corresponding reading and writing data mode according to the file path;
Submodule is written in data, for reading corresponding file data from disk using the reading and writing data mode, and The file data is stored in memory cache;
Data to be tested determine submodule, for determining number to be tested from the file data according to the data path According to.
In a preferred embodiment of an embodiment of the present invention, the description field further includes the second filter condition, described Second filter condition is included in the routing information, and the data to be tested determine that submodule may include such as lower unit:
Data split cells obtains keyword group for being divided to the data path according to specified character;
Data determining unit, for judging whether the keyword is deposited for each keyword in the keyword group In the second filter condition for meeting default judgment rule;
Data filtering units, for according to second filter condition, filtered out from the file data it is corresponding to Test data.
In a preferred embodiment of an embodiment of the present invention, the execution condition includes but is not limited to:Specified calling Method and the corresponding specified numerical value of the call method.
For device embodiment, since it is substantially similar to above system and embodiment of the method, so the ratio of description Relatively simple, related place illustrates referring to the part of system and method embodiment.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculate Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
A kind of method for testing software provided by the present invention, apparatus and system are described in detail above, herein Apply that a specific example illustrates the principle and implementation of the invention, the explanation of above example is only intended to help Understand method and its core concept of the invention;At the same time, for those skilled in the art, according to the thought of the present invention, There will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as to this The limitation of invention.

Claims (17)

1. a kind of software testing system, which is characterized in that including:
Case management device, for determining the organizational form and descriptor format of test case, wherein the descriptor format includes multiple Description field, the description field include routing information and execute condition, and the routing information includes keyword message;
Scheduler is sent to the data for reading the test case in the case management device, and by the routing information Resolver, and, the data to be tested that the data parser is determined according to the routing information are obtained, and will be described to be tested Data and the execution condition are sent to the use-case actuator;
Digital Resolver for determining reading and writing data mode according to the routing information, and uses the reading and writing data mode, Data to be tested are determined according to the routing information;
Use-case actuator tests the data to be tested, obtains test result for using the execution condition.
2. system according to claim 1, which is characterized in that the scheduler is also used to:
Receive the test result that the use-case actuator is sent, wherein the test result includes error result;
Error prompt information is generated according to the error result;
Show the bomp information.
3. system according to claim 2, which is characterized in that the bomp information includes at least one in following Kind:The routing information of file name, error where the data of error, specification of error, executes condition at error-value.
4. system according to claim 1-3, which is characterized in that the description field further includes the first filtering rod Part, the scheduler are also used to:
Using first filter condition, the data to be tested are screened, and by the obtained data to be tested of screening with And the execution condition is sent to the use-case actuator.
5. system according to claim 1-3, which is characterized in that the routing information include file path and Data path;
The data parser is also used to:
According to the file path, corresponding reading and writing data mode is determined;
Using the reading and writing data mode, corresponding file data is read from disk, and the file data is stored in memory In caching;
Data to be tested are determined from the file data according to the data path, and the data to be tested are sent to tune It spends in device.
6. system according to claim 5, which is characterized in that the description field further includes the second filter condition, described Second filter condition is included in the routing information, and the data parser is also used to:
According to specified character, the data path is divided, obtains keyword group;
For each keyword in the keyword group, judges that the keyword whether there is and meet the of default judgment rule Two filter conditions;
According to second filter condition, corresponding data to be tested are filtered out from the file data.
7. system according to claim 1-3, which is characterized in that the execution condition includes:Specified calling Method and the corresponding specified numerical value of the call method.
8. a kind of method for testing software, which is characterized in that the method includes:
Determine the organizational form and descriptor format of test case, wherein the descriptor format includes multiple description fields, described to retouch It states field to include routing information and execute condition, the routing information includes keyword message;
Reading and writing data mode is determined according to the routing information for the test case, and uses the reading and writing data side Formula determines data to be tested according to the routing information;
Using the execution condition, the data to be tested are tested, obtain test result.
9. according to the method described in claim 8, the method is also it is characterized in that, the test result includes error result Including:
Error prompt information is generated according to the error result;
Show the bomp information.
10. according to the method described in claim 9, it is characterized in that, the bomp information includes at least one in following Kind:The routing information of file name, error where the data of error, specification of error, executes condition at error-value.
11. according to the described in any item methods of claim 8-10, which is characterized in that the description field further includes the first filtering Condition uses the execution condition described, tests the data to be tested, before obtaining test result, further include:
Using first filter condition, the data to be tested are screened.
12. according to the described in any item methods of claim 8-10, which is characterized in that the routing information include file path with And data path;It is described to use the reading and writing data mode, data to be tested are determined according to the routing information, including:
According to the file path, corresponding reading and writing data mode is determined;
Using the reading and writing data mode, corresponding file data is read from disk, and the file data is stored in memory In caching;
Data to be tested are determined from the file data according to the data path.
13. according to the method for claim 12, which is characterized in that the description field further includes the second filter condition, institute The second filter condition is stated included in the routing information, it is described determined from the file data according to the data path to Test data, including:
According to specified character, the data path is divided, obtains keyword group;
For each keyword in the keyword group, judges that the keyword whether there is and meet the of default judgment rule Two filter conditions;
According to second filter condition, corresponding data to be tested are filtered out from the file data.
14. according to the described in any item methods of claim 8-10, which is characterized in that the execution condition includes:Specified tune With method and the corresponding specified numerical value of the call method.
15. a kind of software testing device, which is characterized in that described device includes:
Test case determining module, for determining the organizational form and descriptor format of test case, wherein the descriptor format packet Multiple description fields are included, the description field includes routing information and executes condition, and the routing information includes keyword letter Breath;
Data determining module to be tested, for determining reading and writing data side according to the routing information for the test case Formula, and the reading and writing data mode is used, data to be tested are determined according to the routing information;
Test module tests the data to be tested, obtains test result for using the execution condition.
16. a kind of electronic equipment, which is characterized in that including:
One or more processors;With
One or more machine readable medias of instruction are stored thereon with, when being executed by one or more of processors, are made Obtain a kind of method for testing software that the electronic equipment executes such as claim 8-14 one or more.
17. one or more machine readable medias, are stored thereon with instruction, when executed by one or more processors, so that The processor executes a kind of method for testing software such as claim 8-14 one or more.
CN201810549985.1A 2018-05-31 2018-05-31 Software testing method, device and system Active CN108829590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810549985.1A CN108829590B (en) 2018-05-31 2018-05-31 Software testing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810549985.1A CN108829590B (en) 2018-05-31 2018-05-31 Software testing method, device and system

Publications (2)

Publication Number Publication Date
CN108829590A true CN108829590A (en) 2018-11-16
CN108829590B CN108829590B (en) 2021-11-16

Family

ID=64145804

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810549985.1A Active CN108829590B (en) 2018-05-31 2018-05-31 Software testing method, device and system

Country Status (1)

Country Link
CN (1) CN108829590B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096428A (en) * 2019-03-18 2019-08-06 平安普惠企业管理有限公司 The method and device of data screening, electronic equipment before intelligence test script is run
CN112597742A (en) * 2020-12-02 2021-04-02 长春光华微电子设备工程中心有限公司 Method for realizing self-defined test path of wafer probe station

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174240A (en) * 2006-11-03 2008-05-07 凌阳科技股份有限公司 Software testing management method and system thereof
CN104598376A (en) * 2014-12-30 2015-05-06 中国科学院计算机网络信息中心 Data driving layered automation test system and method
US20180011780A1 (en) * 2016-07-08 2018-01-11 Accenture Global Solutions Limited Web application test script generation to test software functionality

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101174240A (en) * 2006-11-03 2008-05-07 凌阳科技股份有限公司 Software testing management method and system thereof
CN104598376A (en) * 2014-12-30 2015-05-06 中国科学院计算机网络信息中心 Data driving layered automation test system and method
US20180011780A1 (en) * 2016-07-08 2018-01-11 Accenture Global Solutions Limited Web application test script generation to test software functionality

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JINGFAN TANG等: "Towards adaptive framework of keyword driven automation testing", 《2008 IEEE INTERNATIONAL CONFERENCE ON AUTOMATION AND LOGISTICS》 *
陈颖超: "基于Web的测试用例管理及生成***", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096428A (en) * 2019-03-18 2019-08-06 平安普惠企业管理有限公司 The method and device of data screening, electronic equipment before intelligence test script is run
CN112597742A (en) * 2020-12-02 2021-04-02 长春光华微电子设备工程中心有限公司 Method for realizing self-defined test path of wafer probe station

Also Published As

Publication number Publication date
CN108829590B (en) 2021-11-16

Similar Documents

Publication Publication Date Title
CN109189750B (en) Operation method, data analysis system and the storage medium of data analysis workflow
US6941546B2 (en) Method and apparatus for testing a software component using an abstraction matrix
US9734044B2 (en) Automatic test case generation
JP5659238B2 (en) Source code conversion method and source code conversion program
US7844942B2 (en) System and method for model driven transformation filtering
CN106156355A (en) Log processing method and device
CN105426164B (en) A kind of method of calibration and browser of data
CN104424087A (en) Web page element positioning method, apparatus and system
US20130007519A1 (en) Test Framework Extension for Testing Logic on a Modeled User Interface
US20140237554A1 (en) Unified platform for big data processing
US20140245067A1 (en) Using linked data to determine package quality
CN108255689A (en) A kind of Apache Spark application automation tuning methods based on historic task analysis
CN108829590A (en) A kind of method for testing software, apparatus and system
CN107577527A (en) Task generation and scheduling method and device
CN110737631A (en) data analysis method and device based on Flink engine
US20170270438A1 (en) Method and Apparatus for Repairing Policies
CN103164335B (en) The method and system of inspection unit test mass
WO2019134297A1 (en) Method and device for detecting configuration pair naming duplicate, storage medium, and smart device
CN107193842B (en) Service positioning method and device for platform system
CN108776665A (en) A kind of data processing method and device
CN111435327B (en) Log record processing method, device and system
Mayer et al. On the applicability of workflow management systems for the preservation of business processes
CN116128424A (en) Data file quality inspection method and device
US11461217B2 (en) Transferring data from a source complex variable to a target complex variable
KR101728786B1 (en) Component-based dynamic image display system and method using the svg file format

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant