CN109308254B - Test method, test device and test equipment - Google Patents

Test method, test device and test equipment Download PDF

Info

Publication number
CN109308254B
CN109308254B CN201710628743.7A CN201710628743A CN109308254B CN 109308254 B CN109308254 B CN 109308254B CN 201710628743 A CN201710628743 A CN 201710628743A CN 109308254 B CN109308254 B CN 109308254B
Authority
CN
China
Prior art keywords
test
test case
page
code
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710628743.7A
Other languages
Chinese (zh)
Other versions
CN109308254A (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.)
Alibaba Singapore Holdings Pte Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710628743.7A priority Critical patent/CN109308254B/en
Publication of CN109308254A publication Critical patent/CN109308254A/en
Application granted granted Critical
Publication of CN109308254B publication Critical patent/CN109308254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

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)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a test method, a test device and test equipment, wherein the method comprises the following steps: acquiring a first test case; inquiring a mapping table to obtain a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code; and testing by using the test code. According to the technical scheme, the test codes can be automatically generated, and testers do not need to manually write the test codes, so that the workload of the testers is reduced, a large amount of repeated work of the testers is avoided, the testing efficiency is improved, the testing workload is reduced, and the time for manually writing the test codes is saved.

Description

Test method, test device and test equipment
Technical Field
The present application relates to the field of internet, and in particular, to a testing method, device and testing apparatus.
Background
Automated testing is a process that translates human-driven test behavior into machine execution. Typically, after a test case is designed and reviewed, the test is performed step by a tester according to the procedures described in the test case, resulting in a comparison of the actual results with the expected results. In the process, in order to save manpower, time or hardware resources and improve the testing efficiency, the concept of automatic testing is introduced. The automatic test can automatically complete the function test and the performance test by using an automatic test tool so as to reduce the work of testers. The functional test includes testing whether all functions (such as payment process, registration process, and the like) are available, whether a bug phenomenon occurs, and the like, and the performance test includes verifying performance indexes of a Central Processing Unit (CPU), a memory, a network, electric quantity, and flow.
In the current automated testing process, in order to implement the automated testing, the following processes are involved: a tester compiles a test case of natural language; and the tester writes test codes according to the test case. The test code can then be utilized to perform an automated test procedure to implement automated testing.
However, the processes of "the tester compiles the test case" and "the tester compiles the test code" are all manually completed by the tester, so that the workload is large, and the efficiency of the automatic test is very low.
Disclosure of Invention
The present application provides a testing method, the method comprising:
acquiring a first test case;
inquiring a mapping table to obtain a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code;
and testing by using the test code.
The application provides a test method, which comprises the following steps:
acquiring user access data, and determining a second test case according to the user access data;
converting the second test case into a test code;
and recording the corresponding relation between the second test case and the test code in a mapping table.
The present application provides a testing method, the method comprising:
acquiring a third test case and a test code corresponding to the third test case;
and recording the corresponding relation between the third test case and the test code in a mapping table.
The application provides a testing device, the device includes:
the acquisition module is used for acquiring a first test case, inquiring a mapping table and acquiring a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code;
and the test module is used for testing by utilizing the test code.
The application provides a testing device, the device includes:
the determining module is used for acquiring user access data and determining a second test case according to the user access data;
the conversion module is used for converting the second test case into a test code;
and the recording module is used for recording the corresponding relation between the second test case and the test code in the mapping table.
The present application provides a test device, the device includes:
the acquisition module is used for acquiring a third test case and a test code corresponding to the third test case;
and the recording module is used for recording the corresponding relation between the third test case and the test code in the mapping table.
The present application provides a test apparatus, the test apparatus includes: the processor is used for acquiring a first test case; inquiring a mapping table to obtain a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code; and testing by using the test code.
The present application provides a test apparatus, the test apparatus includes: the processor is used for acquiring user access data and determining a second test case according to the user access data; and converting the second test case into a test code, and recording the corresponding relation between the second test case and the test code in a mapping table.
The present application provides a test apparatus, the test apparatus includes: the processor is used for acquiring a third test case and a test code corresponding to the third test case; and recording the corresponding relation between the third test case and the test code in a mapping table.
Based on the above technical scheme, in the embodiment of the application, after the test case is obtained, the test code corresponding to the test case can be obtained by querying the mapping table, and the test code is used for testing. The mode can automatically generate the test codes without manually compiling the test codes by testers, so that the workload of the testers is reduced, a large amount of repeated work of the testers is avoided, the testing efficiency is improved, the testing workload is reduced, and the time for manually compiling the test codes is saved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1A is an example of a test case in one embodiment of the present application;
FIG. 1B is an example of test code in one embodiment of the present application;
FIGS. 2A-2C are flow diagrams of a testing method in one embodiment of the present application;
FIG. 3 is a block diagram of a test apparatus in one embodiment of the present application;
FIG. 4 is a block diagram of a test apparatus according to another embodiment of the present application;
fig. 5 is a block diagram of a test apparatus according to another embodiment of the present application.
Detailed Description
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the present application provides a testing method, which may be applied to a testing device, where the testing device may be a PC (Personal Computer), a notebook Computer, a mobile terminal, a terminal device, a server, a data platform, or an e-commerce platform, and the type of the testing device is not limited.
In one example, the test equipment is used for performing a test (e.g., an automated test, which is described later by taking the test as an example), and in order to complete the test, a test case and a test code are used.
The test case may include, but is not limited to: a test case compiled based on a text form; or, a test case is compiled based on a voice form; or a test case written based on a graphical form. Of course, the test case may be in other forms, which is not limited in this respect.
As shown in fig. 1A, for an example of a test case written based on a text form, the content of the test case written based on a voice form and the test case written based on a graphic form is similar to that of fig. 1A, and the difference is that: the test cases in fig. 1A are written in text form, and the test cases are written in voice form, and the test cases are written in graphic form.
Referring to fig. 1A, a test case is edited using a natural language and can be understood by a tester, but a test device cannot directly perform a test based on the test case, and needs to convert the test case into a test code, and then the test device can perform the test based on the test code.
The test code may also be referred to as a test script, which is a code obtained according to a test case, and the test device can perform a test based on the test code. Referring to FIG. 1B, an example of test code is shown. The test code shown in fig. 1B corresponds to the test case shown in fig. 1A.
In the conventional manner, for a test method, a tester is required to manually write a test case, and manually write test code, and then, execute the test code. Under the mode, the workload of a tester is large, and the testing efficiency is low.
In view of the above, each test case is a set of operations corresponding to test codes one by one, considering that the test cases and the test codes have relevance. Therefore, in the embodiment of the present application, the test code corresponding to the test case may be obtained by querying the mapping table (used for recording the corresponding relationship between the test case and the test code), and then the test is performed by using the test code. Specifically, in the test method, the test case can be converted into the test code, that is, the test case is compiled according to human language (including but not limited to text form, voice form, graphic form, etc.), the test code is automatically generated, a tester does not need to manually compile the test code, a large amount of manual repeated work is avoided, and the test workload is remarkably reduced.
In the embodiment of the application, in order to complete the test, a mapping table needs to be generated, and the mapping table is used for recording the corresponding relation between the test case and the test code. Then, a test code is inquired based on the mapping table, and the test is carried out by using the test code. For the process of generating the mapping table, see fig. 2A and fig. 2B, and for the process of querying the test code based on the mapping table, see fig. 2C.
Referring to fig. 2A, to generate an example of a mapping table, the method may include the steps of:
and step 211, acquiring user access data, and determining a second test case according to the user access data. For convenience of distinguishing, the test case in the mapping table generating process may be referred to as a second test case.
In one example, during the process of accessing the network by the user, user access data (also referred to as basic source data) is generated, each entity can store the user access data, and the test equipment can acquire the user access data from the entity. The entity providing the user access data to the test device may include, but is not limited to, one or any combination of the following: an entity providing User access data to the test device is not limited as long as the test device can acquire the User access data from the entity, such as an ADPS (automatic data processing system), a database, a UT (User Terminal), a Crash log, a WDM (User path), a server, and the like.
In one example, the user access data may include, but is not limited to: the page information, the control information and the operation information together form a real use path (namely a network access path) of the user. Of course, the user access data may also include other contents, such as country, region, time (busy hour/idle hour), crowd characteristics (gender, age, preference, occupation type), activities (motivation, clue, daily activities), industry, etc., and the contents of the user access data are not limited, and the following description will take the example that the user access data includes page information, control information, and operation information as an example.
In one example, the second test case may also include, but is not limited to: the page information, the control information and the operation information, based on which, the process for "determining the second test case according to the user access data" may include, but is not limited to, the following ways: analyzing the page information, the control information and the operation information from the user access data, and determining a second test case according to the analyzed page information, the analyzed control information and the analyzed operation information, wherein the second test case can comprise the analyzed page information, the analyzed control information and the analyzed operation information.
For example, if the page information "home page", the control information "transactions (Deals)", and the operation information "click" are analyzed from the user access data, the second test case is determined to be "home page, transaction, click". For another example, when the page information "transaction list (deal list)", the control information "scroll view (scrollView)", and the operation information "slide" are analyzed from the user access data, the second test case is determined to be "transaction list, scroll view, slide". For another example, when the page information "transaction list", the control information "table (cell)" and the operation information "click" are analyzed from the user access data, the second test case is determined to be "transaction list, table, click". For another example, when the page information "transaction details (deals detail)", the control information "button (button)", and the operation information "click" are analyzed from the user access data, it is determined that the second test case is "transaction details, button, click". For another example, the page information "search", the control information "search (search)", the operation information "input" are analyzed from the user access data: and when string, determining that the second test case is 'searching, searching and string inputting'. For another example, when the page information "search", the control information "enter", and the operation information "wait" are analyzed from the user access data, the second test case is determined to be "search, enter, and wait". For another example, when the page information "shopping cart", the control information "product a", and the operation information "presence" are analyzed from the user access data, the second test case is determined to be "shopping cart, product a, presence". For another example, when the page information "order list", the control information "first list", and the operation information "click" are analyzed from the user access data, the second test case is determined to be "order list, first list, click". For another example, when the page information "search list", the control information "first product", and the operation information "long press" are analyzed from the user access data, the second test case is determined to be "search list, first product, long press". For another example, when the page information "home page", the control information "commodity list", and the operation information "drag" are analyzed from the user access data, the second test case is determined to be "home page, commodity list, drag".
Of course, the above only shows a few examples of the second test case, and the practical application is not limited to this, and the second test case may be determined in the above manner for each acquired user access data.
In the above process, in order to analyze the page information, the control information, and the operation information from the user access data, a data mining method and other methods may be used to analyze the content of the page information, the control information, the operation information, and the like from the online user access data.
Step 212, the second test case is converted into a test code.
The process for "converting the second test case into test code" may include, but is not limited to:
and determining the test type and the test parameter corresponding to the second test case, inquiring a conversion strategy corresponding to the test type, and converting the test parameter into a test code through the conversion strategy.
For the process of "determining the test type corresponding to the second test case", the test type may be determined according to the page information of the second test case, for example, when the page information is a "home page", the test type may be a home page type, and when the page information is a "shopping cart", the test type may be a shopping cart type.
For the process of "determining test parameters corresponding to the second test case", the page information of the second test case may include page parameters, such as www.xxx.com, which indicates that the home address is www.xxx.com; such as www.xxx.com/aaa/bbb, which indicates that the transaction list address is www.xxx.com/aaa/bbb. The control information for the second test case may include control parameters, such as for a "scroll view" control parameters may include: scrolling speed, scrolling direction (e.g., scrolling in a vertical direction or scrolling in a horizontal direction), scrolling height, scrolling layout, etc. The operation information of the second test case may include operation parameters, such as the operation parameters for "slipping" may include: coordinates before sliding (X, Y-axis coordinates), coordinates after sliding (X, Y-axis coordinates), sliding time (time from the start of the touch action to the exit of the touch action), sliding speed, and the like.
In summary, the page parameters, the control parameters, and the operation parameters may be determined as the test parameters.
For the process of "inquiring the conversion policy corresponding to the test type and converting the test parameter into the test code through the conversion policy", a corresponding conversion policy can be configured for each test type, for example, a conversion policy a is configured for a "home page type", and a conversion policy B is configured for a "shopping cart type". The conversion strategy A is used for converting the test parameters of the 'home page type' into test codes, and the content of the conversion strategy A is not limited as long as the test parameters of the 'home page type' can be converted into the test codes; the conversion policy B is used to convert the test parameters of the "shopping cart type" into the test codes, and the content of the conversion policy B is not limited as long as the test parameters of the "shopping cart type" can be converted into the test codes. Based on this, the test parameters of the "home page type" can be converted into test codes by the conversion policy a, and the test parameters of the "shopping cart type" can be converted into test codes by the conversion policy B.
And secondly, determining a page type and a page parameter corresponding to the page information, inquiring a page conversion strategy corresponding to the page type, and converting the page parameter into a page subcode through the page conversion strategy. The control type and the control parameter corresponding to the control information can be determined, the control conversion strategy corresponding to the control type is inquired, and the control parameter is converted into the control subcode through the control conversion strategy. The operation type and the operation parameter corresponding to the operation information can be determined, the operation conversion strategy corresponding to the operation type is inquired, and the operation parameter is converted into the operation subcode through the operation conversion strategy. Further, the page subcode, the control subcode and the operation subcode can be combined into a test code.
For the process of "determining the page type corresponding to the page information", when the page information is the "top page", the page type may be the top page type, and when the page information is the "shopping cart", the page type may be the shopping cart type. For the "determine page parameters corresponding to the page information" process, the page information of the second test case may include page parameters, such as www.xxx.com, which indicates that the home address is www.xxx.com; such as www.xxx.com/aaa/bbb, which indicates that the transaction list address is www.xxx.com/aaa/bbb.
For the process of "querying the page conversion policy corresponding to the page type and converting the page parameter into the page subcode through the page conversion policy", the test device may obtain and record a corresponding relationship between the page type and the page conversion policy, for example, a corresponding page conversion policy is configured for each page type, and the test device may store the corresponding relationship between the page type and the page conversion policy in the database. For example, the page conversion policy 1 is configured for the "home page type", and the page conversion policy 2 is configured for the "shopping cart type". The page conversion strategy 1 is used for converting the page parameters of the 'home page type' into page subcodes, and the content of the page conversion strategy 1 is not limited as long as the page parameters of the 'home page type' can be converted into the page subcodes; the page conversion policy 2 is used to convert the page parameter of the "shopping cart type" into the page subcode, and the content of the page conversion policy 2 is not limited as long as the page parameter of the "shopping cart type" can be converted into the page subcode. Based on this, after the page parameter is obtained, if the page parameter is a page parameter of a "home page type", the page parameter of the "home page type" may be converted into a page subcode through the page conversion policy 1, or if the page parameter is a page parameter of a "shopping cart type", the page parameter of the "shopping cart type" may be converted into a page subcode through the page conversion policy 2.
Each page type may correspond to a page translation policy, for example, an example of the page translation policy 1 for the "top page type" may be rrrrrrr: RRRRR, "rrrrrrr" denotes a fixed part, i.e., a part that is independent of the page parameter, and rrrrrrr denotes a variable part, i.e., a part that is dependent on the page parameter. For example, when the page parameter is www.xxx.com, then page translation policy 1 may translate the page parameter into the page subcode RRRRR: www.xxx.com; when the page parameter is www.yyy.com, then page translation policy 1 may translate the page parameter into the page subcode RRRRR: www.yyy.com, and so on.
For the process of determining the control type corresponding to the control information, when the control information is the "scroll view", the control type may be the scroll view type, and when the control information is the "button", the control type may be the button type. For the process of "determining control parameters corresponding to the control information", the control information of the second test case may include the control parameters, for example, the control parameters for "scroll view" may include: scrolling speed, scrolling direction (e.g., scrolling in a vertical direction or scrolling in a horizontal direction), scrolling height, scrolling layout, etc.
For the process of "inquiring the control conversion strategy corresponding to the control type and converting the control parameter into the control subcode through the control conversion strategy", the test equipment may obtain and record the corresponding relationship between the control type and the control conversion strategy, for example, if the control conversion strategy corresponding to each control type is configured, the test equipment may store the corresponding relationship between the control type and the control conversion strategy in the database. For example, control transition policy 1 is configured for "scroll view type" and control transition policy 2 is configured for "button type". The control conversion strategy 1 is used for converting the control parameter of the 'scroll view type' into a control subcode, and the content of the control conversion strategy 1 is not limited as long as the control parameter of the 'scroll view type' can be converted into the control subcode; the control conversion strategy 2 is used for converting the control parameter of the button type into the control subcode, and the content of the control conversion strategy 2 is not limited as long as the control parameter of the button type can be converted into the control subcode. Based on this, after obtaining the control parameter, if the control parameter is a control parameter of a "scroll view type", the control parameter of the "scroll view type" may be converted into a control subcode through the control conversion policy 1, or if the control parameter is a control parameter of a "button type", the control parameter of the "button type" may be converted into a control subcode through the control conversion policy 2.
Each control type may correspond to a control transition policy, for example, an example of the control transition policy 1 for the "scroll view type" may be TTTTT: TTTTT, "ttttttt" denotes a fixed part, i.e., a part that is independent of control parameters, and ttttttt denotes a variable part, i.e., a part that is dependent on control parameters. For example, when a control parameter is abcd, then control translation policy 1 may translate the control parameter into a control subcode tttt: abcd, which represents a scroll speed, a scroll direction, a scroll height, a scroll layout, and the like; when the control parameter is efgh, the control conversion policy 1 may convert the control parameter into a control subcode TTTTT: efgh, efgh denotes scroll speed, scroll direction, scroll height, scroll layout, etc., and so on.
For the process of "determining the operation type corresponding to the operation information", when the operation information is "slide", the operation type may be a slide type, and when the operation information is "click", the operation type may be a click type. For the process of "determining the operation parameter corresponding to the operation information", the operation information of the second test case includes the operation parameter, for example, the operation parameter for "sliding" may include: coordinates before the slide, coordinates after the slide, a slide time (time from the start of the touch action to the departure of the touch action), a slide speed, and the like.
For the process of "querying the operation conversion policy corresponding to the operation type and converting the operation parameter into the operation subcode through the operation conversion policy", the test device may obtain and record a corresponding relationship between the operation type and the operation conversion policy, for example, a corresponding operation conversion policy may be configured for each operation type, and the test device may store the corresponding relationship between the operation type and the operation conversion policy in the database. For example, the operation conversion policy 1 is configured for the "slide type", and the operation conversion policy 2 is configured for the "click type". The operation conversion policy 1 is used to convert the operation parameter of the "sliding type" into an operation subcode, and the content of the operation conversion policy 1 is not limited as long as the operation parameter of the "sliding type" can be converted into the operation subcode; the operation conversion policy 2 is used to convert the operation parameter of the "click type" into the operation subcode, and the content of the operation conversion policy 2 is not limited as long as the operation parameter of the "click type" can be converted into the operation subcode. Based on this, after obtaining the operation parameter, if the operation parameter is an operation parameter of "slide type", the operation parameter of "slide type" may be converted into an operation subcode by the operation conversion policy 1, or if the operation parameter is an operation parameter of "click type", the operation parameter of "click type" may be converted into an operation subcode by the operation conversion policy 2.
Each operation type may correspond to an operation conversion policy, for example, an operation conversion policy 1 for a "sliding type" is kkkkkkkkk: kkkkkkkkk "denotes a fixed part, i.e. a part which is independent of the operating parameter, and kkkkkkkkkkkkkkkkk denotes a variable part, i.e. a part which is dependent on the operating parameter. If the operation parameter is lmn, then operation transformation policy 1 may transform the operation parameter into an operation subcode KKKKKKK: lmn, lmn denotes coordinates before sliding, coordinates after sliding, sliding time, sliding speed, and the like; when the operation parameter is xyz, then operation transformation policy 1 may transform the operation parameter into an operation subcode kkkkkkkkk: xyz, xyz denotes coordinates before sliding, coordinates after sliding, sliding time, sliding speed, and the like, and so on.
After the above processing, the page subcode, the control subcode and the operation subcode can be obtained, and then the page subcode, the control subcode and the operation subcode can be combined into a test code.
Step 213, recording the corresponding relationship between the second test case and the test code in the mapping table.
In one example, for the process of "recording the correspondence between the second test case and the test code in the mapping table", the following ways may be included, but are not limited to: in the first mode, the corresponding relation between the second test case (including page information, control information and operation information) and the test code (including page subcodes, control subcodes and operation subcodes) is recorded in the mapping table. And recording the corresponding relation between the page information (including the page parameters) and the page subcodes, the corresponding relation between the control information (including the control parameters) and the control subcodes, and the corresponding relation between the operation information (including the operation parameters) and the operation subcodes in the mapping table.
Referring to fig. 2B, to generate another example of a mapping table, the method may include the steps of:
step 221, a third test case and a test code corresponding to the third test case are obtained. For convenience of distinguishing, the test case in the generation process of the mapping table may be referred to as a third test case.
In the historical database, a large number of test cases and test codes written by a tester can be stored, and the test equipment can acquire a test case (hereinafter referred to as a third test case) written by the tester from the historical database and acquire a test code corresponding to the third test case from the historical database.
Step 222, recording the corresponding relationship between the third test case and the test code in a mapping table.
In one example, the process of "recording the correspondence between the third test case and the test code in the mapping table" may include, but is not limited to, the following ways: and the test equipment determines a first characteristic value corresponding to the third test case and records the corresponding relation between the first characteristic value and the test code in a mapping table. Or, the test device determines a first feature value corresponding to the third test case and a second feature value corresponding to the test code, records a corresponding relationship between the first feature value and the second feature value in a mapping table, and records a corresponding relationship between the second feature value and the test code in the mapping table.
In an example, for a process of determining, by the test device, the first feature value corresponding to the third test case, "a first parsing policy may be configured on the test device, where the first parsing policy is used to parse the first feature value from the third test case, and the first parsing policy is not limited to this, as long as the first feature value can be parsed from the third test case, and the first feature value may be an operation in the third test case.
For example, the first feature value may include a feature value of a configuration rule class and a feature value of an operation rule class.
The feature value of the configuration rule class may include one or any combination of the following: name of test case: for representing the name of the test case. Creation time: the method is used for representing the generation time of the test case. Brief description of test cases: the method is used for summarizing test cases, such as entries, test data, login states and the like. Core detection points: the core detection points are used for representing the test cases so as to highlight the emphasis of the test cases. The execution steps are as follows: i.e. specific execution steps, which can be further divided into types (writing languages for distinguishing test codes, such as iOS App, Android App, WebSite, etc.), language information, country information, currency information, login status information, comments, etc. Of course, the above processes only give a few examples of the first feature value of the configuration rule class, and the content of the first feature value of the configuration rule class is not limited.
The characteristic value of the operation rule class may include one or any combination of the following: clicking a control [ control name ] of a certain name; go to a page of a certain name [ page name ]; judging whether a control with a certain name exists in the control name; input string (×) in input box [ name ]; selecting the number in the list to wait for [ ] seconds; calling a certain method [ method name ], parameters (parameter one, parameter two and parameter three); introducing a certain file, namely a file path [ file address ]; dragging an element [ element name ]; long press of an element [ element name ]; starting to monitor the request between the client and the server; stopping monitoring the request between the client and the server; encapsulating into a [ function ] function; the file is introduced with a file name. Of course, the above procedures only give a few examples of the first feature value of the operation rule class, and the content of the first feature value of the operation rule class is not limited.
For the process of determining, by the test device, the second feature value corresponding to the test code, a second parsing policy may be configured on the test device, where the second parsing policy is used to parse the second feature value from the test code, and the content of the second parsing policy is not limited as long as the second feature value can be parsed from the test code, and the second feature value may be an operation in the test code. The second feature value may also include a feature value of a configuration rule class and a feature value of an operation rule class, which are not described herein again.
The flows shown in fig. 2A and fig. 2B above provide two ways of generating a mapping table, and based on the mapping table, the flow of the testing method provided in the embodiment of the present application can be shown in fig. 2C.
Step 231, obtain the first test case. For convenience of distinguishing, the test case in the test process after the mapping table is generated may be referred to as a first test case.
For the flow shown in fig. 2A, the process of obtaining the first test case may include: the tester writes a first test case and provides the first test case to the test equipment. Or, the test equipment may also select a part of second test cases from the set of second test cases according to the service requirement, and combine the selected second test cases into the first test case. For example, the test device may pick a second test case 1 (e.g., "home page, deal, click"), a second test case 2 (e.g., "deal list, scroll view, slide"), a second test case 3 (e.g., "deal list, table, click"), a second test case 4 (e.g., "deal details, button, click"), and combine the selected second test case 1, second test case 2, second test case 3, and second test case 4 into the first test case.
For the flow shown in fig. 2B, the process of obtaining the first test case may include: the tester writes a first test case and provides the first test case to the test equipment.
In one example, the second test case and the third test case may be one test case, and the first test case may be a combination of a plurality of test cases. Furthermore, for convenience of description, the first test case, the second test case, and the third test case are all used as one test case for explanation.
Step 232, the mapping table is queried to obtain the test code corresponding to the first test case.
The mapping table is used to record the corresponding relationship between the test case and the test code, for example, the flow shown in fig. 2A/2B is adopted, and the corresponding relationship between the test case and the test code is recorded in the mapping table.
In an example, the process of obtaining the test code corresponding to the first test case by querying the mapping table may further include, but is not limited to, the following:
in the first case, when the mapping table is generated by using the process shown in fig. 2A, if the corresponding relationship between the second test case (including the page information, the control information, and the operation information) and the test code (including the page subcode, the control subcode, and the operation subcode) is recorded in the mapping table, then: the second test case matched with the first test case can be found directly through the first test case query mapping table, and the test code corresponding to the second test case is the test code corresponding to the first test case.
If the corresponding relation between the page information (including the page parameters) and the page sub-code, the corresponding relation between the control information (including the control parameters) and the control sub-code, and the corresponding relation between the operation information (including the operation parameters) and the operation sub-code are recorded in the mapping table, then: page information, control information and operation information corresponding to the first test case can be determined; then, a mapping table is queried through page information corresponding to the first test case, and a page sub-code corresponding to the page information is obtained; inquiring a mapping table through control information corresponding to the first test case to obtain a control subcode corresponding to the control information; inquiring a mapping table through the operation information corresponding to the first test case to obtain an operation subcode corresponding to the operation information; then, the test equipment can combine the obtained page subcode, control subcode and operation subcode into a test code.
In an example, for a process of "determining page information, control information, and operation information corresponding to a first test case", the process of determining page information, control information, and operation information corresponding to a second test case is similar to that in the flow illustrated in fig. 2A, and is not repeated herein. In addition, because the mapping table records the corresponding relationship between the page information and the page subcode, when the mapping table is queried through the page information corresponding to the first test case, the page subcode corresponding to the page information can be obtained. Because the mapping table records the corresponding relation between the control information and the control subcodes, the control subcodes corresponding to the control information can be obtained when the mapping table is queried through the control information corresponding to the first test case. Since the mapping table records the corresponding relationship between the operation information and the operation subcode, when the mapping table is queried by the operation information corresponding to the first test case, the operation subcode corresponding to the operation information can be obtained.
In case two, when the mapping table is generated by using the flow shown in fig. 2B, if the mapping table records the corresponding relationship between the first feature value corresponding to the third test case and the test code, then: a third feature value corresponding to the first test case may be determined, and a mapping table may be queried according to the third feature value to obtain a test code corresponding to the third feature value. For example, a first feature value matching the third feature value is found from the mapping table, and a test code corresponding to the first feature value, that is, a test code corresponding to the third feature value.
If the corresponding relation between the first characteristic value and the second characteristic value is recorded in the mapping table, and the corresponding relation between the second characteristic value and the test code is recorded in the mapping table, then: a third eigenvalue corresponding to the first test case may be determined, a mapping table may be queried according to the third eigenvalue, a second eigenvalue corresponding to the third eigenvalue is obtained, and then a test code corresponding to the second eigenvalue may be obtained by querying the mapping table according to the second eigenvalue. For example, a first feature value matching the third feature value is found from the mapping table, and a second feature value corresponding to the first feature value, that is, a second feature value corresponding to the third feature value, is found from the mapping table, and then a test code corresponding to the second feature value, that is, a test code corresponding to the third feature value, is found from the mapping table, that is, a test code corresponding to the first test case is obtained.
For the process of determining the third eigenvalue corresponding to the first test case, the process of determining the first eigenvalue corresponding to the third test case is similar to the process of determining the first eigenvalue corresponding to the third test case in the flow shown in fig. 2B, and details are not repeated here.
And step 233, testing by using the obtained test code.
After the test code is obtained, the test code can be used for testing, such as function test, special test, regression test, and the like, and the test process is not limited.
Based on the above technical scheme, in the embodiment of the application, after the test case is obtained, the test code corresponding to the test case can be obtained by querying the mapping table, and the test code is used for testing. The mode can automatically generate the test codes without manually compiling the test codes by testers, so that the workload of the testers is reduced, a large amount of repeated work of the testers is avoided, the testing efficiency is improved, the testing workload is reduced, and the time for manually compiling the test codes is saved.
In the above embodiment, the languages of the test case and the test code may be selected according to actual needs, and the languages of the test case and the test code are not limited, and may be the same or different.
In the above embodiment, the test case and the test code may be a test case and a test code for a web end, may be a test case and a test code for an iOS system, and may also be a test case and a test code for an android system, and the types of the test case and the test code are not limited.
Based on the technical scheme, the writing efficiency can be improved, so that a tester puts more time into the design of the test case, and does not need to put more time into the writing process of the test code. In addition, the compiling of the test codes is not performed after the functions or products are developed, but is performed in the development stage in advance, the test codes can be obtained under the condition that the test codes are not required to be rewritten, and a large amount of time for manually compiling the test codes is saved. In addition, the real use path (user access data) of the user on the line can be mined in a data mining mode, a test case is generated according to the user access data, and then the test case is converted into a test code, so that the automatic generation of the test code is realized.
Based on the technical scheme, the expansibility of the test codes is strong, and the generation of a large number of test codes due to the change of a test framework or the difference of writing languages is avoided. The method can be suitable for multi-language scenes; the method is suitable for converting various wireless languages (such as ios, android and the like); the method is suitable for multi-national language scenes; the compiling mode of the test case is not limited to natural language, and can be voice, graph, user habit result of machine learning and the like; the language of the test case can be set at will, such as English, Russian, and Korea, without language limitation.
Ease of use of test code: the problem that testers need to have a programming language base and have high programming cost is solved, and the testers do not need to master complex programming languages (such as Object-c, Java, JavaScript and the like). Testing code normalization: the template is compiled by unified test cases, the style is unified, and the readability of the test cases is improved. The test flow is simplified: the test case compiling and the test code compiling are combined, and the test case is deposited to be used as a reference and automatic execution template in manual testing. The test case is convenient to maintain: the method can quickly adapt to the change of the requirement, and only the test case of the natural language needs to be maintained if the requirement has the change. Solving the problem of hysteresis of the test code: the acquisition of the test code can be advanced to a development stage, the test code is written together with the test sample, and the generated test code can be automatically triggered to execute.
Based on the technical scheme, the on-line user behavior data is analyzed, and the automatic execution combination and frequency are given, so that different test cases can be flexibly executed according to the scenes of countries, time and the like instead of compiling the test cases by the user, and the behavior habits of the on-line user can be well combined.
Based on the same application concept as the method, an embodiment of the present application further provides a testing apparatus, as shown in fig. 3, which is a structural diagram of the testing apparatus provided by the present application, and the apparatus includes:
an obtaining module 301, configured to obtain a first test case, query a mapping table, and obtain a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code;
a testing module 302, configured to perform a test using the test code.
In one example, the test device further comprises (not represented in the figures):
the determining module is used for acquiring user access data and determining a second test case according to the user access data; wherein the user accessing data comprises: page information, control information and operation information; the second test case comprises: the page information, the control information and the operation information; the conversion module is used for converting the second test case into a test code; and the recording module is used for recording the corresponding relation between the second test case and the converted test codes in the mapping table.
The conversion module is specifically configured to, in a process of converting the second test case into a test code, determine a page type and a page parameter corresponding to the page information, query a page conversion policy corresponding to the page type, and convert the page parameter into a page subcode through the page conversion policy; determining a control type and a control parameter corresponding to the control information, inquiring a control conversion strategy corresponding to the control type, and converting the control parameter into a control subcode through the control conversion strategy; determining an operation type and an operation parameter corresponding to the operation information, inquiring an operation conversion strategy corresponding to the operation type, and converting the operation parameter into an operation subcode through the operation conversion strategy; combining the page subcode, the control subcode and the operation subcode into a test code; the recording module is specifically configured to record, in a mapping table, a correspondence between the page information and the page subcode, a correspondence between the control information and the control subcode, and a correspondence between the operation information and the operation subcode in a process of recording a correspondence between the second test case and the converted test code in the mapping table.
In an example, the obtaining module 301 is specifically configured to determine page information, control information, and operation information corresponding to the first test case in a process of querying a mapping table to obtain a test code corresponding to the first test case; then, a mapping table is queried through page information corresponding to the first test case to obtain a corresponding page sub-code; then, inquiring a mapping table through control information corresponding to the first test case to obtain a corresponding control subcode; then, querying a mapping table through the operation information corresponding to the first test case to obtain a corresponding operation subcode; and then combining the obtained page sub-code, the control sub-code and the operation sub-code into a test code.
In an example, the obtaining module 301 is further configured to obtain a third test case and a test code corresponding to the third test case; the determining module is further used for determining a first characteristic value corresponding to the third test case; the recording module is further used for recording the corresponding relation between the first characteristic value and the test code in a mapping table; or, the obtaining module 301 is further configured to obtain a third test case and a test code corresponding to the third test case; the determining module is further configured to determine a first feature value corresponding to the third test case and a second feature value corresponding to the test code; the recording module is further configured to record a corresponding relationship between the first characteristic value and the second characteristic value in the mapping table, and record a corresponding relationship between the second characteristic value and the test code in the mapping table.
Based on the same application concept as the method, an embodiment of the present application further provides a testing apparatus, as shown in fig. 4, which is a structural diagram of the testing apparatus provided by the present application, and the apparatus includes:
the determining module 401 is configured to collect user access data, and determine a second test case according to the user access data; a conversion module 402, configured to convert the second test case into a test code; a recording module 403, configured to record a corresponding relationship between the second test case and the test code in a mapping table.
In one example, the user access data includes: page information, control information and operation information; the second test case comprises: the page information, the control information and the operation information; the conversion module 402 is specifically configured to, in a process of converting the second test case into a test code, determine a page type and a page parameter corresponding to the page information, query a page conversion policy corresponding to the page type, and convert the page parameter into a page sub-code through the page conversion policy; determining a control type and a control parameter corresponding to the control information, inquiring a control conversion strategy corresponding to the control type, and converting the control parameter into a control subcode through the control conversion strategy; determining an operation type and an operation parameter corresponding to the operation information, inquiring an operation conversion strategy corresponding to the operation type, and converting the operation parameter into an operation subcode through the operation conversion strategy; combining the page subcode, the control subcode and the operation subcode into a test code; the recording module 403 is specifically configured to record, in the process of recording the corresponding relationship between the second test case and the test code in the mapping table, the corresponding relationship between the page information and the page subcode, the corresponding relationship between the control information and the control subcode, and the corresponding relationship between the operation information and the operation subcode.
Based on the same application concept as the method, an embodiment of the present application further provides a testing apparatus, as shown in fig. 5, which is a structural diagram of the testing apparatus provided by the present application, and the apparatus includes: an obtaining module 501, configured to obtain a third test case and a test code corresponding to the third test case; a recording module 502, configured to record a corresponding relationship between the third test case and the test code in a mapping table.
The recording module 502 is specifically configured to determine a first feature value corresponding to a third test case in a process of recording a corresponding relationship between the third test case and the test code in a mapping table, and record a corresponding relationship between the first feature value and the test code in the mapping table; or,
determining a first characteristic value corresponding to the third test case and a second characteristic value corresponding to the test code; and recording the corresponding relation between the first characteristic value and the second characteristic value in a mapping table, and recording the corresponding relation between the second characteristic value and the test code in the mapping table.
Based on the same application concept as the method, the embodiment of the application also provides a test device, wherein the test device comprises a processor and a memory; wherein: the processor is used for acquiring a first test case; inquiring a mapping table to obtain a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code; and testing by using the test code.
Based on the same application concept as the method, the embodiment of the application also provides a test device, which comprises a processor and a memory; wherein: the processor is used for acquiring user access data and determining a second test case according to the user access data; and converting the second test case into a test code, and recording the corresponding relation between the second test case and the test code in a mapping table.
Based on the same application concept as the method, the embodiment of the application also provides a test device, wherein the test device comprises a processor and a memory; wherein: the processor is used for acquiring a third test case and a test code corresponding to the third test case; and recording the corresponding relation between the third test case and the test code in a mapping table.
Based on the same application concept as the method, the embodiment of the present application further provides a machine-readable storage medium, which can be applied to a testing device, where the machine-readable storage medium has stored thereon several computer instructions, and when executed, the computer instructions perform the following processes: acquiring a first test case; inquiring a mapping table to obtain a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code; and testing by using the test code.
Based on the same application concept as the method, the embodiment of the present application further provides a machine-readable storage medium, which can be applied to a testing device, where the machine-readable storage medium has stored thereon several computer instructions, and when executed, the computer instructions perform the following processes: acquiring user access data, and determining a second test case according to the user access data; and converting the second test case into a test code, and recording the corresponding relation between the second test case and the test code in a mapping table.
Based on the same application concept as the method, the embodiment of the present application further provides a machine-readable storage medium, which can be applied to a testing device, where the machine-readable storage medium has stored thereon several computer instructions, and when executed, the computer instructions perform the following processes: acquiring a third test case and a test code corresponding to the third test case; and recording the corresponding relation between the third test case and the test code in a mapping table.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (21)

1. A method of testing, the method comprising:
acquiring a first test case;
inquiring a mapping table to obtain a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code;
testing by using the test code;
before querying the mapping table to obtain the test code corresponding to the first test case, the method further includes: acquiring user access data, and determining a second test case according to the user access data; converting the second test case into a test code; recording the corresponding relation between the second test case and the converted test codes in a mapping table; the converting the second test case into test code includes: determining a test type and a test parameter corresponding to the second test case, inquiring a conversion strategy corresponding to the test type, and converting the test parameter into a test code through the conversion strategy; wherein the second test case comprises: page information, control information, and operational information.
2. The method of claim 1,
the user accessing data comprises: page information, control information and operation information;
the process of determining the second test case according to the user access data specifically includes:
analyzing page information, control information and operation information from the user access data;
and determining a second test case according to the analyzed page information, the control information and the operation information.
3. The method of claim 1,
the process of converting the second test case into the test code specifically includes:
determining a page type and a page parameter corresponding to the page information, inquiring a page conversion strategy corresponding to the page type, and converting the page parameter into a page subcode through the page conversion strategy;
determining a control type and a control parameter corresponding to the control information, inquiring a control conversion strategy corresponding to the control type, and converting the control parameter into a control subcode through the control conversion strategy;
determining an operation type and an operation parameter corresponding to the operation information, inquiring an operation conversion strategy corresponding to the operation type, and converting the operation parameter into an operation subcode through the operation conversion strategy;
and combining the page sub-code, the control sub-code and the operation sub-code into a test code.
4. The method of claim 3, further comprising:
acquiring and recording a corresponding relation between a page type and a page conversion strategy;
acquiring and recording the corresponding relation between the control type and the control conversion strategy;
and acquiring and recording the corresponding relation between the operation type and the operation conversion strategy.
5. The method according to claim 3, wherein the step of recording the correspondence between the second test case and the converted test code in the mapping table specifically includes:
and recording the corresponding relation between the page information and the page sub-code, the corresponding relation between the control information and the control sub-code and the corresponding relation between the operation information and the operation sub-code in a mapping table.
6. The method according to claim 5, wherein the process of querying the mapping table to obtain the test code corresponding to the first test case specifically includes:
determining page information, control information and operation information corresponding to the first test case;
inquiring a mapping table through page information corresponding to the first test case to obtain a corresponding page sub-code;
inquiring a mapping table through control information corresponding to the first test case to obtain a corresponding control subcode;
querying a mapping table through the operation information corresponding to the first test case to obtain a corresponding operation subcode;
and combining the obtained page subcodes, control subcodes and operation subcodes into a test code.
7. The method of claim 1, wherein before querying the mapping table to obtain the test code corresponding to the first test case, the method further comprises:
acquiring a third test case and a test code corresponding to the third test case;
determining a first characteristic value corresponding to the third test case;
and recording the corresponding relation between the first characteristic value and the test code in a mapping table.
8. The method of claim 1, wherein before querying the mapping table to obtain the test code corresponding to the first test case, the method further comprises:
acquiring a third test case and a test code corresponding to the third test case, and determining a first characteristic value corresponding to the third test case and a second characteristic value corresponding to the test code;
and recording the corresponding relation between the first characteristic value and the second characteristic value in a mapping table, and recording the corresponding relation between the second characteristic value and the test code in the mapping table.
9. The method according to claim 7 or 8, wherein the step of querying the mapping table to obtain the test code corresponding to the first test case comprises:
and determining a third characteristic value corresponding to the first test case, and querying the mapping table through the third characteristic value to obtain a test code corresponding to the third characteristic value.
10. The method of any one of claims 1, 2, 7, and 8,
each test case specifically includes: a test case compiled based on a text form; or, a test case is compiled based on a voice form; or a test case written based on a graphical form.
11. A method of testing, the method comprising:
acquiring user access data, and determining a second test case according to the user access data;
converting the second test case into a test code; the converting the second test case into test code includes: determining a test type and a test parameter corresponding to the second test case, inquiring a conversion strategy corresponding to the test type, and converting the test parameter into a test code through the conversion strategy; wherein the second test case comprises: page information, control information and operation information;
and recording the corresponding relation between the second test case and the test code in a mapping table.
12. The method of claim 11,
the user access data comprises: page information, control information and operation information;
the process of converting the second test case into the test code specifically includes:
determining a page type and a page parameter corresponding to the page information, inquiring a page conversion strategy corresponding to the page type, and converting the page parameter into a page subcode through the page conversion strategy;
determining a control type and a control parameter corresponding to the control information, inquiring a control conversion strategy corresponding to the control type, and converting the control parameter into a control subcode through the control conversion strategy;
determining an operation type and an operation parameter corresponding to the operation information, inquiring an operation conversion strategy corresponding to the operation type, and converting the operation parameter into an operation subcode through the operation conversion strategy;
and combining the page subcode, the control subcode and the operation subcode into a test code.
13. The method according to claim 12, wherein the process of recording the correspondence between the second test case and the test code in the mapping table specifically includes:
and recording the corresponding relation between the page information and the page sub-code, the corresponding relation between the control information and the control sub-code and the corresponding relation between the operation information and the operation sub-code in a mapping table.
14. A test apparatus, the apparatus comprising:
the acquisition module is used for acquiring a first test case, inquiring a mapping table and acquiring a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code;
the test module is used for testing by utilizing the test code;
wherein, still include: the determining module is used for acquiring user access data and determining a second test case according to the user access data; wherein the user accessing data comprises: page information, control information and operation information; the second test case comprises: the page information, the control information and the operation information;
the conversion module is used for converting the second test case into a test code; the method is specifically used for: determining a test type and a test parameter corresponding to the second test case, inquiring a conversion strategy corresponding to the test type, and converting the test parameter into a test code through the conversion strategy;
and the recording module is used for recording the corresponding relation between the second test case and the test code in the mapping table.
15. The apparatus of claim 14,
the conversion module is specifically configured to, in a process of converting the second test case into a test code, determine a page type and a page parameter corresponding to the page information, query a page conversion policy corresponding to the page type, and convert the page parameter into a page subcode through the page conversion policy; determining a control type and a control parameter corresponding to the control information, inquiring a control conversion strategy corresponding to the control type, and converting the control parameter into a control subcode through the control conversion strategy; determining an operation type and an operation parameter corresponding to the operation information, inquiring an operation conversion strategy corresponding to the operation type, and converting the operation parameter into an operation subcode through the operation conversion strategy; combining the page subcode, the control subcode and the operation subcode into a test code;
the recording module is specifically configured to record, in a mapping table, a correspondence between the page information and the page subcode, a correspondence between the control information and the control subcode, and a correspondence between the operation information and the operation subcode in a process of recording a correspondence between the second test case and the test code in the mapping table.
16. The apparatus of claim 15,
the obtaining module is specifically configured to determine page information, control information, and operation information corresponding to the first test case in a process of querying a mapping table to obtain a test code corresponding to the first test case; inquiring a mapping table through page information corresponding to the first test case to obtain a corresponding page sub-code; inquiring a mapping table through control information corresponding to the first test case to obtain a corresponding control subcode; querying a mapping table through the operation information corresponding to the first test case to obtain a corresponding operation subcode; and combining the obtained page subcodes, control subcodes and operation subcodes into a test code.
17. The apparatus of claim 14,
the obtaining module is further configured to obtain a third test case and a test code corresponding to the third test case; the determining module is further used for determining a first characteristic value corresponding to the third test case; the recording module is further used for recording the corresponding relation between the first characteristic value and the test code in a mapping table;
or, the obtaining module is further configured to obtain a third test case and a test code corresponding to the third test case; the determining module is further configured to determine a first feature value corresponding to the third test case and a second feature value corresponding to the test code; the recording module is further configured to record a corresponding relationship between the first characteristic value and the second characteristic value in the mapping table, and record a corresponding relationship between the second characteristic value and the test code in the mapping table.
18. A test apparatus, the apparatus comprising:
the determining module is used for acquiring user access data and determining a second test case according to the user access data;
the conversion module is used for converting the second test case into a test code; the method is specifically used for: determining a test type and a test parameter corresponding to the second test case, inquiring a conversion strategy corresponding to the test type, and converting the test parameter into a test code through the conversion strategy; wherein the second test case comprises: page information, control information and operation information;
and the recording module is used for recording the corresponding relation between the second test case and the test code in the mapping table.
19. The apparatus of claim 18,
the user accessing data comprises: page information, control information and operation information;
the conversion module is specifically configured to, in a process of converting the second test case into a test code, determine a page type and a page parameter corresponding to the page information, query a page conversion policy corresponding to the page type, and convert the page parameter into a page subcode through the page conversion policy; determining a control type and a control parameter corresponding to the control information, inquiring a control conversion strategy corresponding to the control type, and converting the control parameter into a control subcode through the control conversion strategy; determining an operation type and an operation parameter corresponding to the operation information, inquiring an operation conversion strategy corresponding to the operation type, and converting the operation parameter into an operation subcode through the operation conversion strategy; combining the page subcode, the control subcode and the operation subcode into a test code;
the recording module is specifically configured to record, in a mapping table, a correspondence between the page information and the page subcode, a correspondence between the control information and the control subcode, and a correspondence between the operation information and the operation subcode in a process of recording a correspondence between a second test case and the test code in the mapping table.
20. A test apparatus, characterized in that the test apparatus comprises:
the processor is used for acquiring a first test case;
inquiring a mapping table to obtain a test code corresponding to the first test case; the mapping table is used for recording the corresponding relation between the test case and the test code;
testing by using the test code;
acquiring user access data before querying a mapping table to obtain a test code corresponding to the first test case, and determining a second test case according to the user access data; converting the second test case into a test code; recording the corresponding relation between the second test case and the converted test codes in a mapping table; the converting the second test case into test code includes: determining a test type and a test parameter corresponding to the second test case, inquiring a conversion strategy corresponding to the test type, and converting the test parameter into a test code through the conversion strategy; wherein the second test case comprises: page information, control information, and operational information.
21. A test apparatus, characterized in that the test apparatus comprises:
the processor is used for acquiring user access data and determining a second test case according to the user access data; converting the second test case into a test code, and recording the corresponding relation between the second test case and the test code in a mapping table; wherein the converting the second test case into a test code comprises: determining a test type and a test parameter corresponding to the second test case, querying a conversion strategy corresponding to the test type, and converting the test parameter into a test code through the conversion strategy; wherein the second test case comprises: page information, control information, and operational information.
CN201710628743.7A 2017-07-28 2017-07-28 Test method, test device and test equipment Active CN109308254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710628743.7A CN109308254B (en) 2017-07-28 2017-07-28 Test method, test device and test equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710628743.7A CN109308254B (en) 2017-07-28 2017-07-28 Test method, test device and test equipment

Publications (2)

Publication Number Publication Date
CN109308254A CN109308254A (en) 2019-02-05
CN109308254B true CN109308254B (en) 2022-06-03

Family

ID=65205058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710628743.7A Active CN109308254B (en) 2017-07-28 2017-07-28 Test method, test device and test equipment

Country Status (1)

Country Link
CN (1) CN109308254B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069397A (en) * 2019-03-15 2019-07-30 深圳壹账通智能科技有限公司 Function test method, device, computer equipment and storage medium
CN110569196A (en) * 2019-09-11 2019-12-13 宝付网络科技(上海)有限公司 Regression testing system
CN112783754A (en) * 2019-11-07 2021-05-11 北京沃东天骏信息技术有限公司 Method and device for testing page
CN111400181A (en) * 2020-03-13 2020-07-10 北京金山云网络技术有限公司 Object testing method and device and server
CN111666217B (en) * 2020-06-05 2023-06-20 百度在线网络技术(北京)有限公司 Method and apparatus for testing code
CN112835802A (en) * 2021-02-09 2021-05-25 深圳市晨北科技有限公司 Equipment testing method, device, equipment and storage medium
CN112732589A (en) * 2021-02-19 2021-04-30 京东数科海益信息科技有限公司 Control testing method, device, equipment and storage medium
CN115203057B (en) * 2022-08-16 2023-03-28 北京永洪商智科技有限公司 Low code test automation method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567193A (en) * 2010-12-09 2012-07-11 北京新媒传信科技有限公司 Method and system for converting test case to automated testing script
CN102779091A (en) * 2012-06-18 2012-11-14 中兴通讯股份有限公司 Test transformation method and test transformation device
JP2013029999A (en) * 2011-07-28 2013-02-07 Ntt Comware Corp Test code generation device, test code generation method, and test code generation program
CN103186460A (en) * 2011-12-30 2013-07-03 金蝶软件(中国)有限公司 Method, device and system for generating script of test case
CN103441900A (en) * 2013-08-27 2013-12-11 上海新炬网络技术有限公司 Centralization cross-platform automated testing system and control method thereof
CN104298595A (en) * 2014-09-29 2015-01-21 百视通网络电视技术发展有限责任公司 Automatic testing method and testing system
CN104794048A (en) * 2014-01-17 2015-07-22 阿里巴巴集团控股有限公司 Automatic UI testing method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557413A (en) * 2015-09-25 2017-04-05 伊姆西公司 Based on the method and apparatus that code coverage obtains test case

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567193A (en) * 2010-12-09 2012-07-11 北京新媒传信科技有限公司 Method and system for converting test case to automated testing script
JP2013029999A (en) * 2011-07-28 2013-02-07 Ntt Comware Corp Test code generation device, test code generation method, and test code generation program
CN103186460A (en) * 2011-12-30 2013-07-03 金蝶软件(中国)有限公司 Method, device and system for generating script of test case
CN102779091A (en) * 2012-06-18 2012-11-14 中兴通讯股份有限公司 Test transformation method and test transformation device
CN103441900A (en) * 2013-08-27 2013-12-11 上海新炬网络技术有限公司 Centralization cross-platform automated testing system and control method thereof
CN104794048A (en) * 2014-01-17 2015-07-22 阿里巴巴集团控股有限公司 Automatic UI testing method and system
CN104298595A (en) * 2014-09-29 2015-01-21 百视通网络电视技术发展有限责任公司 Automatic testing method and testing system

Also Published As

Publication number Publication date
CN109308254A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN109308254B (en) Test method, test device and test equipment
Fantechi et al. Applications of linguistic techniques for use case analysis
CN112394942B (en) Distributed software development compiling method and software development platform based on cloud computing
CN111176996A (en) Test case generation method and device, computer equipment and storage medium
CN112015430A (en) JavaScript code translation method and device, computer equipment and storage medium
CN106550038B (en) Data configuration diagnosis system and method of digital control system
CN110955428A (en) Page display method and device, electronic equipment and medium
CN109840192B (en) Method and device for automatic testing
CN110580189A (en) method and device for generating front-end page, computer equipment and storage medium
CN111666201A (en) Regression testing method, device, medium and electronic equipment
CN110990274A (en) Data processing method, device and system for generating test case
CN114610286A (en) Development document generation method and device, computer equipment and storage medium
CN115438740A (en) Multi-source data convergence and fusion method and system
CN107066302A (en) Defect inspection method, device and service terminal
CN112231197A (en) Page testing method and device and storage medium
CN113419711A (en) Page guiding method and device, electronic equipment and storage medium
CN117389538A (en) Page component content development method, device, equipment and storage medium
CN115629762A (en) JSON data processing method and device, electronic equipment and storage medium
JPWO2016147219A1 (en) Text visualization system, text visualization method, and program
CN115390835A (en) Method and device for constructing small program labeling search box
CN112181407B (en) Service realization processing method, device, system, electronic equipment and storage medium
CN113886259A (en) Non-flow popup automatic processing method and system for bank counter system and electronic device
Hung et al. Recovering workflows from multi tiered e-commerce systems
CN110347577B (en) Page testing method, device and equipment thereof
Matter Big data analytics: a guide to data science practitioners making the transition to big data

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240205

Address after: # 01-21, Lai Zan Da Building 1, 51 Belarusian Road, Singapore

Patentee after: Alibaba Singapore Holdings Ltd.

Country or region after: Singapore

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: ALIBABA GROUP HOLDING Ltd.

Country or region before: United Kingdom