CN116680160A - Test case generation method and related device - Google Patents

Test case generation method and related device Download PDF

Info

Publication number
CN116680160A
CN116680160A CN202210170118.3A CN202210170118A CN116680160A CN 116680160 A CN116680160 A CN 116680160A CN 202210170118 A CN202210170118 A CN 202210170118A CN 116680160 A CN116680160 A CN 116680160A
Authority
CN
China
Prior art keywords
test case
test
information
case
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210170118.3A
Other languages
Chinese (zh)
Inventor
徐新杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210170118.3A priority Critical patent/CN116680160A/en
Publication of CN116680160A publication Critical patent/CN116680160A/en
Pending legal-status Critical Current

Links

Classifications

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

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 application discloses a test case generation method which can be applied to the field of cloud computing. And after the first test case is acquired, generating characteristic information of the first test case according to the first test case. And then, searching a second test case with consistent characteristic information from the characteristic database according to the characteristic information of the first test case. Because the second test case has configured the corresponding first test resource, and the characteristic information of the first test case is consistent with the characteristic information of the second test case. Therefore, the first test case can directly multiplex the first test resource, so that the time for configuring the test resource for the first test case is saved, and the efficiency of generating the test case is effectively improved.

Description

Test case generation method and related device
Technical Field
The present application relates to the field of computers, and in particular, to a test case generating method and related apparatus.
Background
Intelligent devices are popular, and the variety and quantity of software carried by the devices are also increasing. Before the software is released, various functions of the software need to be tested, and test cases are used. Test Case (Test Case) refers to the description of a specific software product for testing tasks, and reflects testing schemes, methods, technologies and strategies. The content of the method comprises a test target, a test environment, input data, a test step, an expected result, a test script and the like, and finally a document is formed.
Currently, a test case set is usually generated, and the test case set comprises one or more test cases, wherein each test case corresponds to one test scene. In actual execution, the corresponding test resources need to be constructed and bound manually.
As software functions increase, so too does the number of test cases needed. Thus, there are also increasing test resources that need to be manually constructed and bound. The cost of constructing the test cases is higher and higher, and the efficiency of constructing the test cases is reduced.
Disclosure of Invention
The application provides a test case generation method. And after the first test case is acquired, generating characteristic information of the first test case according to the first test case. And then, searching a second test case with consistent characteristic information from the characteristic database according to the characteristic information of the first test case. Because the second test case has configured the corresponding first test resource, and the characteristic information of the first test case is consistent with the characteristic information of the second test case. Therefore, the first test case can directly multiplex the first test resource, so that the time for configuring the test resource for the first test case is saved, and the efficiency of generating the test case is effectively improved.
In view of the foregoing, an aspect of the present application provides a test case generating method, including:
acquiring a first test case;
generating characteristic information of the first test case according to the first test case;
determining a second test case from a feature database according to the feature information of the first test case, wherein the feature database stores the feature information of one or more test cases, the feature information of the first test case is consistent with the feature information of the second test case, and test resources associated with the second test case are first test resources;
and associating the first test case with the first test resource, and multiplexing the first test resource.
Another aspect of the present application provides a test case generating apparatus, including:
the receiving and transmitting module is used for acquiring a first test case;
the processing module is used for generating characteristic information of the first test case according to the first test case;
the processing module is further used for determining a second test case from a feature database according to the feature information of the first test case, wherein the feature database stores the feature information of one or more test cases, the feature information of the first test case is consistent with the feature information of the second test case, and test resources associated with the second test case are first test resources;
The processing module is further used for associating the first test case with the first test resource and multiplexing the first test resource.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module is also used for extracting the characteristic information of one or more short sentences in the first test case;
the processing module is also used for determining identification information corresponding to one or more short sentences according to the characteristic information of the one or more short sentences;
the processing module is further used for generating characteristic information of the first test case according to the first information, wherein the first information comprises one or more of the following information:
identification information corresponding to one or more phrases, identification information corresponding to the name of the first test case, or identification information corresponding to the type of the first test case.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module is also used for carrying out connection processing on the first information to generate a first character string, wherein the first character string comprises the first information;
the processing module is further used for carrying out hash calculation on the first character string and generating characteristic information of the first test case.
In one possible design, in another implementation of another aspect of the embodiments of the present application, the character string length of the feature information of the first test case is less than the character string length of the first character string.
In one possible design, in another implementation of another aspect of the embodiments of the present application, the one or more phrases include one or more of the following:
the operating step of the first test case, a precondition for the operating step of the first test case, or an expected result of the first test case.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module is further configured to perform connection processing on the first information according to the following sequence, and generate a first character string, where the sequence includes: the method comprises the steps of name of a first test case, type of the first test case, operation steps of the first test case, and preconditions of the operation steps of the first test case, wherein the operation steps of the first test case are arranged according to the sequence indicated in the first test case.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the types of the first test case include: a validation behavior type or a validation rule type.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the receiving and transmitting module is further used for acquiring first requirement document information, wherein the first requirement document information comprises one or more short sentences of natural language;
the processing module is also used for converting the first requirement document information into first requirement data which is structured data;
the processing module is also used for generating a system use case corresponding to the first demand data according to the first demand data;
the processing module is further used for generating a first test case according to the system case corresponding to the first demand data.
In one possible design, in another implementation of another aspect of the embodiments of the present application, the system use case includes one or more of the following information: system use case executives, service-related preconditions sets, post-conditioning sets and service paths,
wherein the service path comprises a basic path and an extended path, the basic path is a core service flow, the extended path is an extended flow of the core service flow, the service path comprises a plurality of service steps, the service steps have constraint conditions corresponding to the service steps,
Constraints include one or more of the following information: field lists, business rules, non-functional requirements, and design constraints.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module is also used for carrying out semantic analysis on one or more test cases and determining test resources corresponding to the one or more test cases;
the processing module is further used for constructing a test case set according to one or more test cases and test resources corresponding to the one or more test cases, wherein the test case set comprises one or more test cases and an association relation of the test resources corresponding to the one or more test cases;
and the processing module is also used for forming a characteristic database according to one or more test case sets.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module is also used for carrying out semantic analysis on the first test case by adopting the neural network model and extracting the characteristic information of one or more short sentences in the first test case.
Another aspect of the present application provides a computer apparatus comprising: a memory, a processor, and a bus system;
Wherein the memory is used for storing programs;
the processor is used for executing the program in the memory, and the processor is used for executing the method according to the aspects according to the instructions in the program code;
the bus system is used to connect the memory and the processor to communicate the memory and the processor.
Another aspect of the application provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the methods of the above aspects.
In another aspect of the application, a computer program product or computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the methods provided in the above aspects.
From the above technical solutions, the embodiment of the present application has the following advantages:
and after the first test case is acquired, generating characteristic information of the first test case according to the first test case. And then, searching a second test case with consistent characteristic information from the characteristic database according to the characteristic information of the first test case. Because the second test case has configured the corresponding first test resource, and the characteristic information of the first test case is consistent with the characteristic information of the second test case. Therefore, the first test case can directly multiplex the first test resource, so that the time for configuring the test resource for the first test case is saved, and the efficiency of generating the test case is effectively improved.
Drawings
FIG. 1a is a schematic diagram of a scenario of a test case generating method according to the present application;
fig. 1b is a schematic diagram of another application scenario according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an embodiment of a test case generating method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another embodiment of a test case generating method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another embodiment of a test case generating method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another embodiment of a test case generating method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a feature database according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a setting interface of the information of the requirement document in the embodiment of the application;
FIG. 8 is a schematic diagram of another configuration interface for the information of the desired document according to an embodiment of the present application;
FIG. 9 is a diagram of first demand data according to an embodiment of the application;
FIG. 10 is a schematic diagram of an editing interface for demand document information in an embodiment of the present application;
FIG. 11 is a schematic diagram of an uploading entry of the required document information in an embodiment of the present application;
FIG. 12 is a schematic diagram of validity check of the information of the required document according to the embodiment of the present application;
FIG. 13 is a schematic diagram of the system according to an embodiment of the present application;
FIG. 14 is a schematic diagram showing the composition of a test case according to an embodiment of the present application;
FIG. 15 is a schematic diagram of a flow chart for generating feature information of a first test case according to an embodiment of the present application;
FIG. 16 is a schematic diagram of a test case generating apparatus according to an embodiment of the present application;
FIG. 17 is a schematic diagram of a server according to an embodiment of the present application;
fig. 18 is a block diagram showing a part of the structure of a mobile phone related to a terminal device provided by an embodiment of the present application.
Detailed Description
The embodiment of the application provides a test case generation method. And after the first test case is acquired, generating characteristic information of the first test case according to the first test case. And then, searching a second test case with consistent characteristic information from the characteristic database according to the characteristic information of the first test case. Because the second test case has configured the corresponding first test resource, and the characteristic information of the first test case is consistent with the characteristic information of the second test case. Therefore, the first test case can directly multiplex the first test resource, so that the time for configuring the test resource for the first test case is saved, and the efficiency of generating the test case is effectively improved.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "includes" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the application provides a test case generation method and a related device. The embodiment of the application can be applied to various scenes such as cloud technology, artificial intelligence, intelligent traffic, auxiliary driving and the like. The test case generating method can be used in a test case generating device. The test case generating device and the testing device may be integrated in a computer device, which may be a server or a terminal. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform. Wherein the server may be a node in a blockchain. The terminal can be a mobile phone, a tablet personal computer, a notebook computer, an intelligent television, wearable intelligent equipment, a personal computer (Personal Computer, PC), intelligent voice interaction equipment, intelligent household appliances, a vehicle-mounted terminal and other equipment.
Referring to fig. 1a, fig. 1a is a schematic view of a scenario of a test case generating method according to the present application. As shown in fig. 1a, after the computer device a obtains the first test case, feature information of the first test case is determined. And then, determining a second test case from a feature database of the computer equipment B according to the feature information of the first test case, wherein the test resource corresponding to the second test case is the first test resource, and the feature information of the first test case is consistent with the feature information of the second test case. Then, multiplexing the first test resources for the first test case. It will be appreciated that the computer device B may be one computer device, or may be a computer device cluster formed by a plurality of computer devices, or may be a cloud server, which is not limited herein.
It should be noted that, the schematic view of the scenario generated by the test case shown in fig. 1a is only an example, and the scenario generated by the test case described in the embodiment of the present application is for more clearly describing the technical solution of the present application, and does not constitute a limitation on the technical solution provided by the present application. As known by those skilled in the art, with the evolution of test case generation and the appearance of new service scenes, the technical scheme provided by the application is also applicable to similar technical problems.
Referring to fig. 1b, fig. 1b is a schematic view of another application scenario according to an embodiment of the present application. The application scenario illustrated in fig. 1b comprises: test case generation device, demand management system and characteristic database. The test case generating device is applied with the test case generating method provided by the application. The demand management system is a management information system, and may employ a Browser-Server (BS) architecture. In particular, the demand management system may receive a variety of instructions or data from a user, including: querying the requirement document information, adding the requirement document information, modifying the requirement document information and deleting the requirement document information. The demand management system may perform semantic analysis on the demand document information or the test case and extract relevant feature information, and then the demand management system may save the feature information to a feature database. Feature information of the required document information and feature information of the test case are stored in the feature database. The test case generating device can acquire related data from the demand management system and the feature database and generate a new test case.
It can be understood that the test case generating device and the feature database belong to a background service provided by the computer equipment. The test case generating device, the demand management system and the feature database may be implemented by the same computer device, or may be implemented cooperatively by a plurality of computer devices, which is not limited herein.
Before describing the embodiments of the present application, some technical concepts related to the embodiments of the present application are first described:
1. test Case (Test Case):
test Case (Test Case) refers to the description of a specific software product for testing tasks, and reflects testing schemes, methods, technologies and strategies. The content of the test object comprises a document formed by a test object, a test environment, input data, a test step, an expected result, a test script and the like. A test case may also be understood as a set of test inputs, execution conditions, and expected results tailored for a particular goal to verify that a particular software requirement is met.
After the application program software is written by a program writer, various functions of the software need to be tested so as to ensure that the functions of the software product are normal. Specifically, the software product is tested, and test cases are required to be adopted for testing.
The test cases may specifically include: the name of the use case, the precondition to be satisfied corresponding to the use case, the specific execution step of the use case and the expected test result corresponding to the use case. It will be appreciated that the test cases may also be presented and stored in a variety of formats, such as text documents.
For ease of understanding, referring to table 1, table 1 illustrates some test cases:
TABLE 1
2. System use case.
The system use case is a model which is obtained by adopting unified modeling language ((Unified Modeling Language, UML) modeling based on the demand data and used for describing a user and a system interaction method, wherein the modeling process can comprise business modeling and conceptual modeling, UML modeling is a modeling language, and is used for using model elements to assemble a model of the whole system, and the model elements comprise classes, correlations among the classes, and examples of the classes in the system to mutually cooperate to realize dynamic behaviors of the system, and the like.
Each test case provides at least one test scenario that illustrates how the system interacts with the target user or other system to achieve a specific business objective.
The requirement data of the target product can be expressed in the form of a product requirement document (Product Requirements Document, PRD) of the target product, or can be expressed in the form of Json format data corresponding to the product requirement document. The Json format refers to a JS object numbered musical notation (JavaScript Object Notation, json), and is a lightweight data exchange format. It stores and represents data in a text format that is completely independent of the programming language. The simple and clear hierarchical structure makes the data exchange language ideal, easy for people to read and write, easy for machine to analyze and generate, and effectively improves network transmission efficiency.
Specifically, the description of the product demand by the product demand document includes a strategy and tactics of the product, wherein the strategy of the product includes: product location, target market, target customers, competitors, etc., tactics of the product include: the structure, core business flow, specific use case description, function and content description of the product.
The following describes the above-described embodiments in detail. Referring to fig. 2, fig. 2 is a schematic diagram of an embodiment of a test case generating method according to an embodiment of the present application. The embodiment of the application provides a test case generation method, which comprises the following steps:
201. and acquiring a first test case.
In this embodiment, the first test case generating device obtains a first test case, where the first test case may be a test case that is newly generated by the test case generating device according to the requirement document information input by the user, and the first test case may also be a test case of the to-be-configured test resource obtained by the test case generating device, which is not limited herein.
202. And generating characteristic information corresponding to the first test case according to the first test case.
In this embodiment, after the test case generating device obtains the first test case, the test case generating device analyzes the first test case to generate feature information corresponding to the first test case. The feature information may identify features of the first test case so that the test case generating device searches for whether a corresponding second test case exists in the feature database based on the feature information. The specific analysis method comprises the following steps: semantic analysis based on neural networks, or manual recognition, without limitation.
For example, the feature information corresponding to the first test case may be a part of text extracted from the first test case, for example: whether the result of the judgment of all payment modes of the user according to whether the payment modes are available or not is one of all results or not, whether a feedback exists in a banking system or not, and whether the feedback exists in the direct-connection merchant system or not is judged, and the direct-connection merchant system requests to collect money. A set of identification information corresponding to the first test case may also be used, for example: "6673,7253,9071,9108,5740,5822,5923,5970". It may also be a processed set of strings corresponding to the first test case, for example: "60966400682272308955", embodiments of the present application are not limited in this regard.
203. And determining a second test case from the feature database according to the feature information of the first test case, wherein the feature information of the second test case is consistent with the feature information of the first test case, and the test resources associated with the second test case are first test resources.
In this embodiment, after the test case generating device generates the feature information corresponding to the first test case, the second test case is determined from the feature database according to the feature information of the first test case. The characteristic information of the second test case is consistent with the characteristic information of the first test case, and the test resource associated with the second test case is the first test resource. The feature database stores feature information of one or more test cases. Optionally, the feature database further stores test resources corresponding to the test cases, where the test resources are test resources configured by the test cases. For ease of understanding, referring to table 2, table 2 illustrates feature information of test cases stored in a feature database.
TABLE 2
Test case Feature information Testing resources
Test case a 60966400682272308955 Test resource a
Test case b 60511987165161847612 Test resource b
Test case c 35464843134688941557 Test resource c
Test case d 19813795417897451357 Test resource d
Specifically, after the test case generating device obtains the feature information 60966400682272308955 corresponding to the first test case, the test case generating device searches whether the feature information is consistent in the feature database according to the feature information, and then the test case generating device determines that the test case corresponding to the consistent feature information is the second test case. Taking table 2 as an example, the test case generating device determines that a test case a is a second test case, and a test resource a corresponding to the test case a is a first test resource.
In another implementation manner, after the test case generating device determines the second test case in the feature database, the first test resource may be determined according to the association relationship between the second test case and the corresponding test resource.
The feature database according to the embodiment of the present application is described below. For ease of understanding, please refer to fig. 6, fig. 6 is a schematic diagram illustrating a structure of a feature database according to an embodiment of the present application. One or more test case sets, such as test case set A through test case set N illustrated in FIG. 6, are stored in the feature database. Each test case set includes one or more test cases, e.g., test case set a illustrated in fig. 6 includes: test case a through test case N, test case set N includes: test case aa to test case nn.
Optionally, after the test case generating device obtains one or more test cases, semantic analysis is performed on the one or more test cases, so as to determine test resources corresponding to the one or more test cases; then, the test case generating device constructs a test case set according to one or more test cases and test resources corresponding to the one or more test cases, wherein the test case set comprises one or more test cases and an association relation of the test resources corresponding to the one or more test cases; the feature database is composed from one or more test case sets.
204. And associating the first test case with the first test resource, and multiplexing the first test resource.
In this embodiment, after determining the second test case, the test case generating device may consider that the first test case may use the first test resource corresponding to the second test case, and the test case generating device associates the first test case with the first test resource, so that the first test case multiplexes the first test resource.
Illustratively, the first test case is: the "request user to replace payment method" will be described as an example. The operation steps of the test case comprise: "1. Direct-connected merchant system requests acquisition of receipt voucher (ID: 1)
[ System ] verifying the validity of order request information (ID: 2)
[ System ] process the order request (id: 5)
2. Direct-connected merchant system request cash collection (ID: 7)
[ System ] verifying the validity of the collection request information (ID: 8)
3. System verification of user feedback results in confirmation of payment and verification requires user submission of payment password authorization (ID: 14)
4. System verification of the result of user feedback as authorized payment and verification of the need to request a bank system deduction (ID: 16)
System sets the current payment method to be unavailable and records the reason (ID: 18a 1) of the unavailability.
The preconditions for the operation steps of the test case include: "4.1 System" verification of the feedback from the banking system as failed and requires guiding the user to change the payment means (ID: 18 a)
{ whether the result of the bank system feedback is successful in deduction: no }, no
{ whether there is feedback in banking system }
4.2 System requesting the user to change the payment means (ID: 18a 2)
{ whether the system has set the order information, the merchant specified by the merchant number disables the payment system from using the change transaction: no }, no
{ whether the payment account of the user has opened a payment service: yes }).
The expected results for this test case include: "1.1 [ System ] feedback receipt (ID: 6)
2.1 [ System ] request the user to confirm the receipt information (ID: 13)
3.1 [ System ] request the user to submit a payment cryptographically authorized payment (id: 15)
4.1 [ System ] requests the user to change the payment means (ID: 18a 2) ".
In order to verify a test scenario corresponding to each test case, test resources that need to be configured for the first test case include: 1. a user account with a payment function opened; 2. a common merchant account; 3. a testability API, which is called to construct the condition that the digital certificate is not installed on the client; 4. a testability application program interface (Application Programming Interface, API) that is invoked to construct a transaction amount exceeding the change balance; 5. a testability API, calling the API to construct the overyear accumulated limit of the change with the real name certificate; 6. and calling the testability API to construct an error with insufficient bank feedback amount.
One possible implementation is: pasting a resource path of the first test resource in the test resource configuration of the first test case, so that the first test case multiplexes the first test resource.
In the embodiment of the application, after the test case generating device acquires the first test case, the characteristic information of the first test case is generated according to the first test case. And then, searching a second test case with consistent characteristic information from the characteristic database according to the characteristic information of the first test case. Because the second test case has configured the corresponding first test resource, and the characteristic information of the first test case is consistent with the characteristic information of the second test case. Therefore, the first test case can directly reuse the existing first test resources, so that the time for configuring the test resources for the first test case is saved, and the efficiency of generating the test case is effectively improved. By automatically analyzing the test cases corresponding to the same test scene, experience of a tester and understanding of the test cases are not relied on, and accuracy of test resource allocation is improved.
In the foregoing embodiment, referring to fig. 3, fig. 3 is a schematic diagram illustrating another embodiment of a test case generating method according to an embodiment of the present application. In the test case generation method provided by the embodiment of the application, the feature information of the first test case is generated according to the first test case, and the method specifically comprises the following steps:
301. and extracting characteristic information of one or more phrases in the first test case.
In this embodiment, after the test case generating device obtains the first test case, the test case generating device extracts feature information of one or more phrases in the first test case. The extracted feature information of one or more phrases may correspond to all of the phrases in the first test case, or may correspond to some of the phrases in the first test case.
Illustratively, the feature information of one or more phrases in the first test case extracted by the test case generating device includes:
"1. Whether the result of all payment methods of the user is one of all results according to the rule of whether the payment methods are available or not, no
2. Whether the result of the feedback from the banking system is insufficient balance or credit card line (error code 88430113): is
3. Whether the result fed back by the bank system is that the deduction is successful or not
4. Whether the bank system has feedback or not
5. The business category of the merchant designated by the merchant number is within the business category range of prohibiting the payment of change set by the system, no
6. Order information specifying whether the payment means contains no_balance
7. Results of the change annual limit rule of the payment account with the real name certificate-whether the calculated result of the change according to the minimum to-be-paid amount calculation rule is > the change annual accumulated payment amount of the payment account with the real name certificate is
8. Whether the result of the current transaction disabling change pass rule is one of all results or not
9. Whether the client of the current device installs the digital certificate of the user's payment account or not
10. The merchant specified by the merchant number prohibits the user from using the change transaction, whether or not
11. The merchant designated by the application ID prohibits the user from using the change transaction, whether or not
12. Whether the payment account of the user is opened with change is
13. Whether the state of change of the payment account of the user is in maintenance or not, no
14. Whether the calculated result of the change according to the calculation rule of the minimum amount to be paid is larger than the change balance of the payment account of the user is
15. Direct-connected merchant system request to acquire receipt document
16. Direct-connected merchant system request cash collection
17. Request user to confirm receipt information [ system ] verify that the result fed back by the user is confirmation payment, and verify that the user is required to submit payment password authorization
18. The system requests the user to submit a payment password to authorize payment and verifies that the result fed back by the user is authorized payment and verifies that a bank system deduction needs to be requested.
302. And determining identification information corresponding to the one or more short sentences according to the characteristic information of the one or more short sentences.
In this embodiment, after the test case generating device determines the feature information of one or more phrases in the first test case, the test case generating device further determines identification information corresponding to the one or more phrases. Specifically, each short sentence has unique identification information, and the test case generating device searches the identification information corresponding to the characteristic information of the short sentence in the characteristic database according to the characteristic information of one or more short sentences in the first test case.
Illustratively, 18 phrases are extracted in step 301, and 18 corresponding identification information is determined in the feature database according to the feature information of the 18 phrases in step 302. For example: "6673,7253,9071,9108,5740,5822,5923,5970,6096,6400,6822,7230,8955,9717,7871,7684,7710,7860".
303. And generating characteristic information of the first test case according to the first information.
In this embodiment, the test case generating device may generate the feature information of the first test case according to the first information after determining the identification information of one or more phrases in the first test case. Specifically, the first information includes one or more of the following: identification information corresponding to one or more phrases, identification information corresponding to the name of the first test case, or identification information corresponding to the type of the first test case. The name of each test case has corresponding identification information, which may be a set of character strings. The test cases have different types, and each type has unique corresponding identification information, and the identification information can also be a group of character strings.
In the embodiment of the application, a method for generating the characteristic information of the first test case is illustrated, specifically, the characteristic information of the first test case is determined according to various identification information related to the first test case, so that the relevance of the characteristic information and the first test case can be effectively improved, the accuracy of the second test case is further improved, and the accuracy and the efficiency of configuring test resources for the test case are improved.
Referring to fig. 4 in combination with the foregoing embodiments, fig. 4 is a schematic diagram illustrating another embodiment of a test case generating method according to an embodiment of the present application. In the test case generation method provided by the embodiment of the application, the feature information of the first test case is generated according to the first information, and the method comprises the following steps:
401. and performing connection processing on the first information to generate a first character string.
In this embodiment, after acquiring the first information, the test case generating device performs connection processing on the first information to generate the first string. The first information comprises: the identification information corresponding to one or more phrases, the identification information corresponding to the name of the first test case, and the identification information corresponding to the type of the first test case are examples. For example, the identification information corresponding to the one or more phrases is: "6673,7253,9071,9108,5740,5822,5923,5970,6096,6400,6822,7230,8955,9717,7871,7684,7710,7860"; the identification information corresponding to the name of the first test case is 894781179921058; the identification information corresponding to the type of the first test case is "01".
The test case generating device connects the identification information together according to a certain sequence, and the character string generated after connection is called a first character string. Illustratively, the first string is: "66737253907191085740582259235970609664006822723089559717787176847710786089478117992105801".
The sequence may be: 1. identification information corresponding to one or more short sentences, 2 identification information corresponding to the names of the first test cases, 3 identification information corresponding to the types of the first test cases. The sequence may also be: 1. identification information corresponding to the name of the first test case, 2 identification information corresponding to the type of the first test case, 3 identification information corresponding to one or more short sentences. The embodiments of the present application are not limited in this regard.
When the first test case comprises a plurality of phrases, the arrangement sequence of the identification information corresponding to one or more phrases in the sequence is ordered according to the sequence of the phrases in the first test case.
402. And carrying out hash calculation on the first character string to generate the characteristic information of the first test case.
In this embodiment, after the test case generating device generates the first character string, the test case generating device performs hash calculation on the first character string. And then taking the result of the hash calculation as the characteristic information of the first test case. The character string length of the characteristic information of the first test case is smaller than that of the first character string.
The hash algorithm adopted in the hash calculation is a common hash algorithm, and the function of the hash algorithm is to map a long string of information into a unique shorter string, so that the hash algorithm is convenient to store and compare. The algorithm adopted by the hash calculation is not limited in the embodiment of the application.
Illustratively, the first string is: "66737253907191085740582259235970609664006822723089559717787176847710786089478117992105801". The hash value obtained by carrying out hash calculation by adopting the md2 algorithm is 'b 9bc39afafdb60a1de14bddff389c 384'. And taking the hash value as the characteristic information of the first test case.
For example, referring to fig. 15, fig. 15 is a schematic flow chart of generating feature information of a first test case according to an embodiment of the present application. After the test case generating device acquires the first test case, extracting features of the first test case to acquire identification information (the identification information comprises an operation step or a pre-condition) corresponding to one or more phrases, and identifying information corresponding to the name of the first test case and identifying information corresponding to the type of the first test case. And then the test case generating device performs connection processing on the identification information to obtain a first character string. Secondly, the test case generating device performs hash calculation on the first character string, and the obtained hash value is used as characteristic information of the first test case.
In the embodiment of the application, the test case generating device converts the first character string with larger character string length into the unique corresponding hash value through hash calculation, and then uses the hash value as the characteristic information of the first test case, thereby facilitating subsequent storage and comparison calculation.
In combination with the foregoing embodiment, a further embodiment of the test case generating method provided by the embodiment of the present application includes: the one or more phrases include one or more of the following: the operating step of the first test case, a precondition for the operating step of the first test case, or an expected result of the first test case.
For example, referring to fig. 14, fig. 14 is a schematic diagram illustrating a test case according to an embodiment of the application. Specifically, the name of the test case is: the identification information corresponding to the name of the test case is "0001".
The operation steps of the test case comprise: "1. Direct-connected merchant system requests acquisition of receipt voucher (ID: 1)
[ System ] verifying the validity of order request information (ID: 2)
[ System ] process the order request (id: 5)
2. Direct-connected merchant system request cash collection (ID: 7)
[ System ] verifying the validity of the collection request information (ID: 8)
3. System verification of user feedback results in confirmation of payment and verification requires user submission of payment password authorization (ID: 14)
4. System verification of the result of user feedback as authorized payment and verification of the need to request a bank system deduction (ID: 16)
System sets the current payment method to be unavailable and records the reason (ID: 18a 1) of the unavailability.
The preconditions for the operation steps of the test case include: "4.1 System" verification of the feedback from the banking system as failed and requires guiding the user to change the payment means (ID: 18 a)
{ whether the result of the bank system feedback is successful in deduction: no }, no
{ whether there is feedback in banking system }
4.2 System requesting the user to change the payment means (ID: 18a 2)
{ whether the system has set the order information, the merchant specified by the merchant number disables the payment system from using the change transaction: no }, no
{ whether the payment account of the user has opened a payment service: yes }).
The expected results for this test case include: "1.1 [ System ] feedback receipt (ID: 6)
2.1 [ System ] request the user to confirm the receipt information (ID: 13)
3.1 [ System ] request the user to submit a payment cryptographically authorized payment (id: 15)
4.1 [ System ] requests the user to change the payment means (ID: 18a 2) ".
The one or more phrases have unique corresponding identification information. For example: the phrase "4.1 [ system ]) requests the user to change the payment means" has the identification information of "18a2".
In combination with the foregoing embodiment, a further embodiment of the test case generating method provided by the embodiment of the present application includes: performing connection processing on the first information to generate a first character string, including:
The first information is subjected to connection processing according to the following sequence, and a first character string is generated, wherein the sequence comprises: the method comprises the steps of name of a first test case, type of the first test case, operation steps of the first test case, and preconditions of the operation steps of the first test case, wherein the operation steps of the first test case are arranged according to the sequence indicated in the first test case.
Specifically, the test case generating device determines the arrangement order of the first information, and then performs connection processing on the first information according to the arrangement order of the first information. Taking fig. 14 as an example for explanation, the first information includes: "000118a18a212578141618a16131518a2".
In combination with the foregoing embodiment, a further embodiment of the test case generating method provided by the embodiment of the present application includes: the types of the first test case include: a validation behavior type or a validation rule type. Specifically, for different types, there are different identification information, such as: the identification information of the verification behavior type is "01", and the identification information of the verification rule type is "02".
Referring to fig. 5 in combination with the foregoing embodiments, fig. 5 is a schematic diagram illustrating another embodiment of a test case generating method according to an embodiment of the present application. The test case generation method provided by the embodiment of the application further comprises the following steps:
501. First demand document information is acquired.
In this embodiment, first, the test case generating device acquires first required document information from a user or other computer equipment. For easy understanding, please refer to fig. 11, fig. 11 is a schematic diagram illustrating an uploading entry of the required document information in an embodiment of the present application. In fig. 11, the first requirement document information uploaded by the user is "jsapi. It is to be appreciated that one first requirement document information can correspond to one or more test cases.
The format of the demand document information may be a text document, for example: doc or docx format files. One or more natural language sentences are recorded in the demand document information. The meaning of the statement is demand data written in natural language.
Optionally, after the test case generating device acquires the first requirement document information, the validity of the first requirement document information is checked. For example, as shown in fig. 12, fig. 12 is a schematic diagram illustrating validity check of the required document information in the embodiment of the present application. After passing the validity check of each sentence in the first required document information, step 502 is entered.
502. And converting the first requirement document information into first requirement data.
In this embodiment, after the test case generating device acquires the first requirement document information, the first requirement document information is converted into the first requirement data. The first demand data is structured data, such as: a file in Json format.
The following description, taken in conjunction with the accompanying drawings, illustrates by way of example: referring to fig. 7, fig. 7 is a schematic diagram of a setting interface of the required document information according to an embodiment of the application. Fig. 7 illustrates a path step of how the required document information is set. Illustratively, the first requirement document information is entitled "payment facilitation registered user-payment", and the target system of the first requirement document information is "payment system". The name of the system use case corresponding to the first requirement document information is "payment simplified registered user-payment". The master executor of the system use case is the "payment facilitation registered user". The auxiliary executor of the system use case is a banking system. The detailed steps for the system use case include: the user submits payment information, requests payment, 1a, cancels payment, 1a.1 system goes to 9, 1b, selects to add bank card payment, 1b1 system goes to add new card use case, and goes to 2 after finishing.
Referring to fig. 8, fig. 8 is a schematic diagram of another setting interface for the required document information according to an embodiment of the application. Fig. 8 is a schematic diagram showing a flow of setting related business rules in the demand document information. Specifically, regarding "payment simplified registered user-payment", the business rule in the supplementary constraint is set to "1. User submits payment information, requests payment", "2 a..system" checks the validity of payment information or transaction information "," preferential rule-, etc. After the first requirement document information is set, the first requirement document information is stored in a docx format.
After acquiring the first requirement document information, the test case generating device converts the first requirement document information into first requirement data, wherein the first requirement data is structured data. For ease of understanding, please refer to fig. 9, fig. 9 is a schematic diagram of first requirement data in an embodiment of the present application.
Further, the user may modify the first desired document information. Such as the interface illustrated in fig. 10. FIG. 10 is a schematic diagram of an editing interface for information on a desired document according to an embodiment of the present application.
Alternatively, the user may edit and modify the structured first requirement information, and the specific modification interface may refer to the interface illustrated in fig. 10.
One possible implementation manner is that the setting interface and the editing interface are displayed in a web browser.
503. And generating a system use case corresponding to the first demand data according to the first demand data.
In this embodiment, after the test case generating device generates the first requirement data, the corresponding system case may be generated according to the first requirement data. For ease of understanding, please refer to fig. 13, fig. 13 is a schematic diagram illustrating a system embodiment according to an embodiment of the present application. The system use case includes one or more of the following information: the system case executor (comprising a main executor and an auxiliary executor), a service-related precondition set, a post-condition set and a service path, wherein the service path comprises a basic path and an extended path, the basic path is a core service flow, the extended path is an extended flow of the core service flow, the service path comprises a plurality of service steps, the service steps have constraint conditions corresponding to the service steps, and the constraint conditions comprise one or more of the following information: field lists, business rules, non-functional requirements, and design constraints.
504. And generating a first test case according to the system case corresponding to the first demand data.
In this embodiment, the test case generating device analyzes a system case and generates a corresponding test case.
Further, the test case generating device may generate a plurality of test cases in order to enrich the number of test cases in the feature database. Finally, one or more test case sets are constructed based on the generated plurality of test cases.
In the embodiment of the application, the test case generating device can acquire the demand document in the text document format of the target product, then perform structural conversion on the demand document in the text document format to obtain the structured demand data, and then display the structured demand data in the web browser. The structured demand data presented in the web browser may provide the user with query, add-on, and modify functionality. The user can perform requirement inquiry, requirement modification and requirement newly-increased in the web browser for displaying the structured requirement data. For the newly added or modified requirement, validity check can be further carried out, and when the check is qualified, the structured requirement document can be updated and stored according to the newly added or modified operation. And the subsequent device can analyze the demand data conveniently and generate system use cases. As the computer equipment carries out UML modeling and conversion on the product demand document of the target product and displays the product demand document on the display interface of the computer equipment, the functions of inquiring, writing, adding, deleting and the like of the product demand document are provided for a user. When a user needs to modify or adjust the product, the user does not need to rewrite the product demand document corresponding to the adjusted product, but can directly adjust the product demand data of the target product in the display interface, such as adding, deleting, and the like, thereby greatly facilitating the updating of the product and the testing of the updated product by the user.
In combination with the foregoing embodiment, the test case generating method provided by the embodiment of the present application further includes: and carrying out semantic analysis on the first test case by adopting a neural network model, and extracting characteristic information of one or more phrases in the first test case.
Specifically, when the test case generating device adopts a neural network model (e.g., a machine learning algorithm), a corpus (e.g., one or more phrases) of the test case is analyzed and feature information corresponding to the first test case is determined. When the test case generating device discovers that the characteristic information similar to the characteristic information corresponding to the first test case exists in the characteristic database, the test case generating device considers that the second test case corresponding to the characteristic information in the characteristic database is similar to the first test case in terms of semantics, further determines that the first test case and the second test case describe the same test scene, and can reuse the same test resources.
The test case generating device in the present application for executing the related processing executed by the test case generating device in the foregoing embodiment will be described in detail below. Referring to fig. 16, fig. 16 is a schematic diagram of a test case generating apparatus according to an embodiment of the application. In an embodiment of the present application, a test case generating device 1600 includes:
A transceiver module 1601, configured to obtain a first test case;
the processing module 1602 is configured to generate feature information of the first test case according to the first test case;
the processing module 1602 is further configured to determine a second test case from a feature database according to the feature information of the first test case, where the feature database stores feature information of one or more test cases, the feature information of the first test case is consistent with the feature information of the second test case, and a test resource associated with the second test case is a first test resource;
the processing module 1602 is further configured to associate the first test case with a first test resource, and multiplex the first test resource.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module 1602 is further configured to extract feature information of one or more phrases in the first test case;
the processing module 1602 is further configured to determine identification information corresponding to one or more phrases according to the feature information of the one or more phrases;
the processing module 1602 is further configured to generate feature information of the first test case according to first information, where the first information includes one or more of the following information:
Identification information corresponding to one or more phrases, identification information corresponding to the name of the first test case, or identification information corresponding to the type of the first test case.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module 1602 is further configured to perform connection processing on the first information, and generate a first string, where the first string includes the first information;
the processing module 1602 is further configured to perform hash computation on the first string to generate feature information of the first test case.
In one possible design, in another implementation of another aspect of the embodiments of the present application, the character string length of the feature information of the first test case is less than the character string length of the first character string.
In one possible design, in another implementation of another aspect of the embodiments of the present application, the one or more phrases include one or more of the following:
the operating step of the first test case, a precondition for the operating step of the first test case, or an expected result of the first test case.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
The processing module 1602 is further configured to perform connection processing on the first information in the following order, and generate a first string, where the order includes: the method comprises the steps of name of a first test case, type of the first test case, operation steps of the first test case, and preconditions of the operation steps of the first test case, wherein the operation steps of the first test case are arranged according to the sequence indicated in the first test case.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the types of the first test case include: a validation behavior type or a validation rule type.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the transceiver module 1601 is further configured to obtain first requirement document information, where the first requirement document information includes one or more phrases in natural language;
the processing module 1602 is further configured to convert the first requirement document information into first requirement data, where the first requirement data is structured data;
the processing module 1602 is further configured to generate a system use case corresponding to the first demand data according to the first demand data;
the processing module 1602 is further configured to generate a first test case according to the system case corresponding to the first requirement data.
In one possible design, in another implementation of another aspect of the embodiments of the present application, the system use case includes one or more of the following information: system use case executives, service-related preconditions sets, post-conditioning sets and service paths,
wherein the service path comprises a basic path and an extended path, the basic path is a core service flow, the extended path is an extended flow of the core service flow, the service path comprises a plurality of service steps, the service steps have constraint conditions corresponding to the service steps,
constraints include one or more of the following information: field lists, business rules, non-functional requirements, and design constraints.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module 1602 is further configured to perform semantic analysis on one or more test cases, and determine test resources corresponding to the one or more test cases;
the processing module 1602 is further configured to construct a test case set according to one or more test cases and test resources corresponding to the one or more test cases, where the test case set includes one or more test cases and an association relationship between the one or more test cases and the test resources corresponding to the one or more test cases;
The processing module 1602 is further configured to compose a feature database according to the one or more test case sets.
In one possible design, in another implementation of another aspect of the embodiments of the present application,
the processing module 1602 is further configured to perform semantic analysis on the first test case by using a neural network model, and extract feature information of one or more phrases in the first test case.
Fig. 17 is a schematic diagram of a server structure according to an embodiment of the present application, where the server 700 may have a relatively large difference between configurations or performances, and may include one or more central processing units (central processing units, CPU) 722 (e.g., one or more processors) and a memory 732, and one or more storage media 730 (e.g., one or more mass storage devices) storing application programs 742 or data 744. Wherein memory 732 and storage medium 730 may be transitory or persistent. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Still further, the central processor 722 may be configured to communicate with the storage medium 730 and execute a series of instruction operations on the server 700 in the storage medium 730.
The Server 700 may also include one or more power supplies 726, one or more wired or wireless network interfaces 750, one or more input/output interfaces 758, and/or one or more operating systems 741, such as Windows Server TM ,Mac OS X TM ,Unix TM ,Linux TM ,FreeBSD TM Etc.
The steps performed by the server in the above embodiments may be based on the server structure shown in fig. 17.
Fig. 18 is a schematic structural diagram of a terminal device according to an embodiment of the present application, as shown in fig. 18, for convenience of explanation, only a portion related to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to a method portion of the embodiment of the present application. The terminal device is also called a user terminal, and the terminal device may be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), a Point of Sales (POS), a vehicle computer, etc., and the user terminal includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle terminal, an aircraft, etc. Taking a terminal device as a mobile phone as an example:
fig. 18 is a block diagram showing a part of the structure of a mobile phone related to a terminal device provided by an embodiment of the present application. Referring to fig. 18, the mobile phone includes: radio Frequency (RF) circuitry 810, memory 820, input unit 830, display unit 840, sensor 850, audio circuitry 860, wireless fidelity (wireless fidelity, wiFi) module 870, processor 880, power supply 890, and the like. Those skilled in the art will appreciate that the handset configuration shown in fig. 18 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 18:
the RF circuit 810 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, it is processed by the processor 880; in addition, the data of the design uplink is sent to the base station. Typically, the RF circuitry 810 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, the RF circuitry 810 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global system for mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), email, short message service (Short Messaging Service, SMS), and the like.
The memory 820 may be used to store software programs and modules, and the processor 880 performs various functional applications and data processing of the cellular phone by executing the software programs and modules stored in the memory 820. The memory 820 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 820 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 830 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset. In particular, the input unit 830 may include a touch panel 831 and other input devices 832. The touch panel 831, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 831 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection device according to a predetermined program. Alternatively, the touch panel 831 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 880 and can receive commands from the processor 880 and execute them. In addition, the touch panel 831 may be implemented in various types of resistive, capacitive, infrared, surface acoustic wave, and the like. The input unit 830 may include other input devices 832 in addition to the touch panel 831. In particular, other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 840 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 840 may include a display panel 841, and optionally, the display panel 841 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 831 may overlay the display panel 841, and when the touch panel 831 detects a touch operation thereon or thereabout, the touch operation is transferred to the processor 880 to determine the type of touch event, and the processor 880 then provides a corresponding visual output on the display panel 841 according to the type of touch event. Although in fig. 18, the touch panel 831 and the display panel 841 are implemented as two separate components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 831 and the display panel 841 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 850, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 841 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the handset are not described in detail herein.
Audio circuitry 860, speaker 861, microphone 862 may provide an audio interface between the user and the handset. The audio circuit 860 may transmit the received electrical signal converted from audio data to the speaker 861, and the electrical signal is converted into a sound signal by the speaker 861 to be output; on the other hand, microphone 862 converts the collected sound signals into electrical signals, which are received by audio circuit 860 and converted into audio data, which are processed by audio data output processor 880 for transmission to, for example, another cell phone via RF circuit 810, or which are output to memory 820 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 870, so that wireless broadband Internet access is provided for the user. Although fig. 18 shows a WiFi module 870, it is understood that it does not belong to the necessary constitution of the handset, and can be omitted entirely as needed within the scope of not changing the essence of the invention.
The processor 880 is a control center of the mobile phone, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile phone and processes data by running or executing software programs and/or modules stored in the memory 820 and calling data stored in the memory 820, thereby performing an overall inspection of the mobile phone. In the alternative, processor 880 may include one or more processing units; alternatively, the processor 880 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 880.
The handset further includes a power supply 890 (e.g., a battery) for powering the various components, optionally in logical communication with the processor 880 through a power management system, as well as performing functions such as managing charge, discharge, and power consumption by the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which will not be described herein.
The steps performed by the terminal device in the above-described embodiments may be based on the terminal device structure shown in fig. 18.
Embodiments of the present application also provide a computer-readable storage medium having a computer program stored therein, which when run on a computer, causes the computer to perform the method as described in the foregoing embodiments.
Embodiments of the present application also provide a computer program product comprising a program which, when run on a computer, causes the computer to perform the method described in the previous embodiments.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (15)

1. A test case generation method, comprising:
acquiring a first test case;
generating characteristic information of the first test case according to the first test case;
determining a second test case from a feature database according to the feature information of the first test case, wherein the feature database stores the feature information of one or more test cases, the feature information of the first test case is consistent with the feature information of the second test case, and test resources associated with the second test case are first test resources;
and associating the first test case with the first test resource, and multiplexing the first test resource.
2. The method of claim 1, wherein generating feature information for the first test case from the first test case comprises:
extracting characteristic information of one or more phrases in the first test case;
determining identification information corresponding to the one or more phrases according to the characteristic information of the one or more phrases;
generating characteristic information of the first test case according to first information, wherein the first information comprises one or more of the following information:
Identification information corresponding to the one or more phrases, identification information corresponding to the name of the first test case, or identification information corresponding to the type of the first test case.
3. The method of claim 2, wherein generating feature information for the first test case based on the first information comprises:
performing connection processing on the first information to generate a first character string, wherein the first character string comprises the first information;
and carrying out hash calculation on the first character string to generate the characteristic information of the first test case.
4. The method of claim 3, wherein the character string length of the feature information of the first test case is less than the character string length of the first character string.
5. The method of any one of claims 2-4, wherein the one or more phrases include one or more of:
the operation step of the first test case, the precondition of the operation step of the first test case, or the expected result of the first test case.
6. The method according to any one of claims 3-5, wherein performing a connection process on the first information to generate the first string includes:
Performing connection processing on the first information to generate the first character string according to the following sequence, wherein the sequence comprises: the name of the first test case, the type of the first test case and the operation steps of the first test case, and the preconditions of the operation steps of the first test case, wherein the operation steps of the first test case are arranged according to the sequence indicated in the first test case.
7. The method of any of claims 2-6, wherein the type of the first test case comprises: a validation behavior type or a validation rule type.
8. The method of any of claims 1-7, wherein obtaining the first test case comprises:
acquiring first requirement document information, wherein the first requirement document information comprises one or more short sentences of natural language;
converting the first requirement document information into first requirement data, wherein the first requirement data is structured data;
generating a system use case corresponding to the first demand data according to the first demand data;
and generating the first test case according to the system case corresponding to the first demand data.
9. The method of claim 8, wherein the system use case includes one or more of the following information: system use case executives, service-related preconditions sets, post-conditioning sets and service paths,
wherein the service path comprises a basic path and an extended path, the basic path is a core service flow, the extended path is an extended flow of the core service flow, the service path comprises a plurality of service steps, the service steps have constraint conditions corresponding to the service steps,
the constraint includes one or more of the following information: field lists, business rules, non-functional requirements, and design constraints.
10. The method of any of claims 1-9, wherein prior to obtaining the first test case, the method further comprises:
carrying out semantic analysis on the one or more test cases, and determining test resources corresponding to the one or more test cases;
constructing a test case set according to the one or more test cases and the test resources corresponding to the one or more test cases, wherein the test case set comprises the one or more test cases and the association relation of the test resources corresponding to the one or more test cases;
And forming the characteristic database according to the one or more test case sets.
11. The method of any of claims 2-10, wherein extracting feature information of the one or more phrases in the first test case comprises:
and carrying out semantic analysis on the first test case by adopting a neural network model, and extracting characteristic information of the one or more short sentences in the first test case.
12. A test case generating apparatus, comprising:
the receiving and transmitting module is used for acquiring a first test case;
the processing module is used for generating characteristic information of the first test case according to the first test case;
the processing module is further configured to determine a second test case from a feature database according to the feature information of the first test case, where the feature database includes one or more test cases, the feature information of the first test case is consistent with the feature information of the second test case, and a test resource associated with the second test case is a first test resource;
the processing module is further configured to associate the first test case with the first test resource, and multiplex the first test resource.
13. A computer device, comprising: a memory, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor being for executing a program in the memory, the processor being for executing the method of any one of claims 1 to 11 according to instructions in program code;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
14. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 11.
15. A computer program product comprising a computer program and instructions which, when executed by a processor, implement the method of any one of claims 1 to 11.
CN202210170118.3A 2022-02-23 2022-02-23 Test case generation method and related device Pending CN116680160A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210170118.3A CN116680160A (en) 2022-02-23 2022-02-23 Test case generation method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210170118.3A CN116680160A (en) 2022-02-23 2022-02-23 Test case generation method and related device

Publications (1)

Publication Number Publication Date
CN116680160A true CN116680160A (en) 2023-09-01

Family

ID=87786015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210170118.3A Pending CN116680160A (en) 2022-02-23 2022-02-23 Test case generation method and related device

Country Status (1)

Country Link
CN (1) CN116680160A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756050A (en) * 2023-08-17 2023-09-15 北京凯锐远景科技有限公司 MBSE-based inertial product use case analysis method, system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756050A (en) * 2023-08-17 2023-09-15 北京凯锐远景科技有限公司 MBSE-based inertial product use case analysis method, system and storage medium

Similar Documents

Publication Publication Date Title
CN107146606B (en) Developer voice action system
US20230409349A1 (en) Systems and methods for proactively providing recommendations to a user of a computing device
CN103049563B (en) Server, accounting voucher generate system and accounting voucher generates method
US20220294797A1 (en) Website verification platform
US20170249934A1 (en) Electronic device and method for operating the same
US11720825B2 (en) Framework for multi-tenant data science experiments at-scale
CN102930010A (en) Sequencing of entity attribute and relation
CN111931102A (en) Method, device and system for constructing page
US20240015224A1 (en) Determining processing weights of rule variables for rule processing optimization
CN110020358A (en) Method and apparatus for generating dynamic page
CN116680160A (en) Test case generation method and related device
CN109087109B (en) Mobile payment confirmation method, device, system and storage medium
KR20210007155A (en) Network server to manage user subscription and method of operating thereof
KR20130064447A (en) Method and appratus for providing search results using similarity between inclinations of users and device
CN111813816B (en) Data processing method, device, computer readable storage medium and computer equipment
US20230179536A1 (en) Systems and methods for adaptive multi-system operations with smart routing protocols
CN111625737B (en) Label display method, device, equipment and storage medium
CN115203194A (en) Metadata information generation method, related device, equipment and storage medium
KR100645529B1 (en) Log management system capable of log processing and method using the same
CN116931881A (en) Business process execution method and device, storage medium and electronic equipment
US20190205837A1 (en) Bot framework for autonomous data sources
KR102624044B1 (en) Method of application generation based on template and server implementing thereof
CN103593286B (en) Software verification method based on self adaptation igniting
CN114327372B (en) Quality requirement configuration method, device, equipment and medium
CN117312124A (en) Test case acquisition method and related device

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