Online test case testing method, equipment and storage medium
By sorting out the use case outline and establishing a use case library, the use case writing and testing visualization is solved, and the problem of low use case testing efficiency in the existing technology is improved, and the delivery efficiency is improved and the use case loss is prevented.
Patent Information
- Application Number
- CN202211025882.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-25
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2042-08-25
AI Technical Summary
Existing use case testing methods are difficult to quickly detect problems during use case writing and testing, resulting in inefficient delivery.
By sorting out the use case outline of the product to be tested, setting the outline level and use case scenarios of the test cases in a hierarchical manner, establishing a use case library, receiving test case writing requests from the user side, displaying the adaptive use case writing interface, generating primary test cases, and conducting test acceptance. Finally archived to the use case library.
It realizes visualization and rapid positioning of use case writing, improves the standardization of use case writing, avoids duplicate testing, improves delivery efficiency, and prevents the loss of use cases due to frequent version iterations.
Smart Images

Figure CN115454828B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software testing, and in particular to an online use case testing method, device and storage medium. Background Art
[0002] With the rapid development of the software industry, various types of software have emerged one after another. In order to meet customer needs and ensure the quality of software, software development and testing are required, and the core of software development and testing is the writing and testing of use cases. The writing of use cases mostly depends on the professional level and experience of the writers. The use cases designed from the human dimension vary greatly. In the process of self-testing, testing and acceptance of use cases, it is difficult to quickly find problems and the links where problems occur, resulting in low product delivery efficiency.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present invention is to provide an online use case testing method, device and storage medium, aiming to solve the technical problem that the existing use case testing method is difficult to quickly find problems during the use case writing and testing process, resulting in low delivery efficiency.
[0005] To achieve the above object, the present invention provides an online use case testing method, the online use case testing method comprising:
[0006] Sorting out the use case outline of the product to be tested, and setting the outline level and use case scenarios of the test cases in a hierarchical manner based on the outline items of the use case outline;
[0007] Establishing a use case library for the product to be tested according to the outline level and use case scenarios;
[0008] Receive a test case writing request initiated by a user end, and display an adapted test case writing interface according to the test case writing request; the test case elements of the test case writing interface include: one or more of the test case number, the module to which it belongs, the test case title, the version identifier, the test point, the input data, the operation steps and the expected result;
[0009] Receiving writing information input by a user terminal based on the use case writing interface, and writing the use case elements in the use case writing interface according to the writing information to generate a primary test case;
[0010] The primary test cases are tested and accepted, a final version of the test cases is generated, and the final version of the test cases is archived in the test case library.
[0011] Optionally, the step of combing the use case outline of the product to be tested and hierarchically setting the outline levels and use case scenarios of the test cases based on the outline items of the use case outline includes:
[0012] According to the business type of the product to be tested, the use case outline is sorted out and divided into different business modules;
[0013] Establishing a first-level outline under each of the business modules according to the functional type of the product to be tested;
[0014] Establishing a secondary outline under each of the primary outlines according to the use case scenario type of the product to be tested; the primary outline and the secondary outline serve as outline items;
[0015] The use case scenario of the product to be tested is set in the adapted secondary outline, and a scenario overview is added to the use case scenario as a scenario test point.
[0016] Optionally, the step of establishing a use case library of the product to be tested according to the outline level and the use case scenario includes:
[0017] Setting a use case library directory according to the outline level of the use case outline, and establishing an association relationship between the use case library directory and the use case outline;
[0018] Adding a use case test point to the test case of the product to be tested, and identifying a target scenario test point of a target use case scenario consistent with the use case test point in the secondary outline according to the association relationship;
[0019] Determine the scene position of the target scene test point in the secondary outline, and identify the position corresponding to the scene position in the use case library directory as the use case position;
[0020] The test cases of the product to be tested are set at the test case positions, and a test case library of the product to be tested is established.
[0021] Optionally, the use case writing interface includes a new use case writing interface and an optimized use case writing interface, the test case writing request encapsulates an application scenario and a required test point, and the step of displaying an adapted use case writing interface according to the test case writing request includes:
[0022] If the application scenario of the test case writing request is a pure new test scenario, a new case writing interface is displayed;
[0023] If the application scenario of the test case writing request is an optimized test scenario, the required test points in the test case writing request are extracted and analyzed, the target case test points consistent with the required test points are screened, the test cases corresponding to the target case test points are copied, a case copy is generated, the use case element information of the use case copy is identified, the use case element information is input into a preset optimized case writing interface, and the optimized case writing interface is displayed.
[0024] Optionally, the step of receiving writing information input by a user terminal based on the use case writing interface, and writing the use case elements in the use case writing interface according to the writing information to generate a primary test case includes:
[0025] If the use case writing interface is a new use case writing interface, extracting and analyzing the use case elements in the writing information input by the user end to write the use case and generate a primary test case;
[0026] If the use case writing interface is an optimized use case writing interface, the use case elements in the writing information input by the user are extracted and analyzed to perform use case writing, generate primary test cases, and gray out the test cases in the use case library except the use case copy.
[0027] Optionally, after the step of generating a primary test case, the step further includes:
[0028] Receive a use case review request initiated by a user terminal, and display an adapted use case review interface according to the use case review request; the review elements of the use case review interface include: review role, review result, review opinion and required test scenario;
[0029] Receiving review information input by a user, inputting the review information into a review element of the use case review interface, updating the use case review interface and displaying the updated use case review interface;
[0030] According to the review opinions in the updated use case review interface, the primary test case is improved, and the must-test scenarios in the primary test case are determined.
[0031] Optionally, after the step of improving the primary test case according to the review information and determining the must-test scenarios in the primary test case, the method further includes:
[0032] Receive a development self-test request initiated by a user terminal, and display an adapted development self-test interface; the self-test elements of the development self-test interface include: required test scenarios and self-test results;
[0033] Perform development self-test on the preset product according to the development self-test request and the required test scenarios in the primary test case;
[0034] If the product passes the development self-test of the required test scenario, mark the required test scenario as passed, and output the result of the development self-test to the development self-test interface;
[0035] If the product fails the development self-test of the mandatory test scenario, the mandatory test scenario is marked as failed, and the result of the development self-test is output to the development self-test interface; the product is corrected according to the result of the development self-test to generate a corrected product, and the development self-test is performed on the corrected product.
[0036] Optionally, the step of performing test acceptance according to the primary test case, generating a final version of the test case, and archiving the final version of the test case into the test case library includes:
[0037] Receive a test acceptance request initiated by a user terminal, and display an adapted test acceptance interface; the acceptance elements of the test acceptance interface include: use case scenarios and acceptance results;
[0038] Performing test acceptance on the product according to the test acceptance request and the use case scenarios in the primary test cases;
[0039] If the product passes the test acceptance of the use case scenario, the use case scenario is marked as accepted, and the result of the test acceptance is output to the test acceptance interface;
[0040] If the product fails the test acceptance of the use case scenario, the use case scenario is marked as failed, and the result of the test acceptance is output to the test acceptance interface; the product is repaired according to the result of the test acceptance, a repaired product is generated, and the test acceptance is performed on the repaired product;
[0041] When all the use case scenarios are marked as passed, the final version of the use case is generated.
[0042] The present invention also provides an online use case testing device, which includes: a memory, a processor, and an online use case testing program stored in the memory and executable on the processor, wherein the online use case testing program is configured to implement the steps of the above-mentioned online use case testing method.
[0043] The present invention also provides a storage medium, which is a computer-readable storage medium. An online use case testing program is stored on the computer-readable storage medium. The online use case testing program is executed by a processor to implement the steps of the above-mentioned online use case testing method.
[0044] The present invention discloses an online use case testing method, device and storage medium. The method combs the use case outline of a product to be tested, hierarchically sets the outline level and use case scenario of the test case based on the outline items of the use case outline, and makes the structure of the use case clearer. Then, according to the outline level and use case scenario, a use case library of the product to be tested is established. Through the mutual association between the use case outline and the use case library, visualization of test case writing and rapid positioning of test cases are achieved. Then, a test case writing request initiated by a user end is received, and according to the test case writing request, an adapted use case writing interface is displayed, and according to the writing information received by the use case writing interface and the use case in the use case writing interface, the test case is located. Elements are used to write use cases and generate primary test cases, which further realizes the visualization of use case writing and helps to improve the standardization of use case writing. Then, the primary test cases are reviewed, and development self-tests and test acceptance are carried out according to the primary test cases. The test content and test results are displayed in real time in the corresponding interface, which realizes the visualization of the use case testing process and avoids the occurrence of repeated testing due to the cumbersome use case testing process and the difficulty in quickly finding problems, further improves the delivery efficiency, and then generates the final version of the use case, and archives the final version of the use case in the use case library, which avoids the loss of use cases due to frequent version iterations, and further realizes the visualization of the use case writing and testing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of the structure of an online use case testing device for a hardware operating environment involved in an embodiment of the present invention;
[0046] Figure 2 A flowchart of an online use case testing method according to an embodiment of the present invention;
[0047] Figure 3 A schematic diagram of a use case outline of an online use case testing method according to an embodiment of the present invention;
[0048] Figure 4 A schematic diagram of a use case library of an online use case testing method according to an embodiment of the present invention;
[0049] Figure 5 A schematic diagram of a use case writing interface for an online use case testing method according to an embodiment of the present invention;
[0050] Figure 6 for Figure 2 A detailed flow chart of step S30 in an embodiment;
[0051] Figure 7 A schematic diagram of a use case review interface of an online use case testing method according to an embodiment of the present invention;
[0052] Figure 8 for Figure 2 A detailed flow chart of an embodiment of step S50 in FIG.
[0053] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0054] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0055] Reference Figure 1 , Figure 1 The present invention is a schematic diagram of the structure of an online use case testing device for the hardware operating environment involved in the embodiment of the present invention.
[0056] like Figure 1 As shown, the online use case test device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0057] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the online use case testing device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0058] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and an online use case test program.
[0059] exist Figure 1In the online use case test device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the online use case test device of the present invention can be set in the online use case test device, and the online use case test device calls the online use case test program stored in the memory 1005 through the processor 1001, and performs the following operations:
[0060] Sorting out the use case outline of the product to be tested, and setting the outline level and use case scenarios of the test cases in a hierarchical manner based on the outline items of the use case outline;
[0061] Establishing a use case library for the product to be tested according to the outline level and use case scenarios;
[0062] Receive a test case writing request initiated by a user end, and display an adapted test case writing interface according to the test case writing request; the test case elements of the test case writing interface include: one or more of the test case number, the module to which it belongs, the test case title, the version identifier, the test point, the input data, the operation steps and the expected result;
[0063] Receiving writing information input by a user terminal based on the use case writing interface, and writing the use case elements in the use case writing interface according to the writing information to generate a primary test case;
[0064] Test acceptance is performed based on the primary test cases, a final version of the test cases is generated, and the final version of the test cases is archived in the test case library.
[0065] Further, the steps of combing the use case outline of the product to be tested and hierarchically setting the outline levels and use case scenarios of the test cases based on the outline items of the use case outline include:
[0066] According to the business type of the product to be tested, the use case outline is sorted out and divided into different business modules;
[0067] Establishing a first-level outline under each of the business modules according to the functional type of the product to be tested;
[0068] Establishing a secondary outline under each of the primary outlines according to the use case scenario type of the product to be tested; the primary outline and the secondary outline serve as outline items;
[0069] The use case scenario of the product to be tested is set in the adapted secondary outline, and a scenario overview is added to the use case scenario as a scenario test point.
[0070] Furthermore, according to the outline level and the use case scenario, the step of establishing the use case library of the product to be tested includes:
[0071] Setting a use case library directory according to the outline level of the use case outline, and establishing an association relationship between the use case library directory and the use case outline;
[0072] Adding a use case test point to the test case of the product to be tested, and identifying a target scenario test point of a target use case scenario consistent with the use case test point in the secondary outline according to the association relationship;
[0073] Determine the scene position of the target scene test point in the secondary outline, and identify the position corresponding to the scene position in the use case library directory as the use case position;
[0074] The test cases of the product to be tested are set at the test case positions, and a test case library of the product to be tested is established.
[0075] Furthermore, the use case writing interface includes a new use case writing interface and an optimized use case writing interface, the test case writing request encapsulates the application scenario and the required test point, and the step of displaying the adapted use case writing interface according to the test case writing request includes:
[0076] If the application scenario of the test case writing request is a pure new test scenario, a new case writing interface is displayed;
[0077] If the application scenario of the test case writing request is an optimized test scenario, the required test points in the test case writing request are extracted and analyzed, the target case test points consistent with the required test points are screened, the test cases corresponding to the target case test points are copied, a case copy is generated, the use case element information of the use case copy is identified, the use case element information is input into a preset optimized case writing interface, and the optimized case writing interface is displayed.
[0078] Furthermore, the step of receiving the writing information input by the user terminal based on the use case writing interface and writing the use case elements in the use case writing interface according to the writing information to generate the primary test case includes:
[0079] If the use case writing interface is a new use case writing interface, extracting and analyzing the use case elements in the writing information input by the user end to write the use case and generate a primary test case;
[0080] If the use case writing interface is an optimized use case writing interface, the use case elements in the writing information input by the user are extracted and analyzed to perform use case writing, generate primary test cases, and gray out the test cases in the use case library except the use case copy.
[0081] Further, the processor 1001 may call the online use case test program stored in the memory 1005, and further perform the following operations:
[0082] After the step of generating the primary test case, the method further includes:
[0083] Receive a use case review request initiated by a user terminal, and display an adapted use case review interface according to the use case review request; the review elements of the use case review interface include: review role, review result, review opinion and required test scenario;
[0084] Receiving review information input by a user, inputting the review information into a review element of the use case review interface, updating the use case review interface and displaying the updated use case review interface;
[0085] According to the review opinions in the updated use case review interface, the primary test case is improved, and the must-test scenarios in the primary test case are determined.
[0086] Further, the processor 1001 may call the online use case test program stored in the memory 1005, and further perform the following operations:
[0087] After the step of improving the primary test case according to the review information and determining the required test scenarios in the primary test case, the method further includes:
[0088] Receive a development self-test request initiated by a user terminal, and display an adapted development self-test interface; the self-test elements of the development self-test interface include: required test scenarios and self-test results;
[0089] Perform development self-test on the preset product according to the development self-test request and the required test scenarios in the primary test case;
[0090] If the product passes the development self-test of the required test scenario, mark the required test scenario as passed, and output the result of the development self-test to the development self-test interface;
[0091] If the product fails the development self-test of the mandatory test scenario, the mandatory test scenario is marked as failed, and the result of the development self-test is output to the development self-test interface; the product is corrected according to the result of the development self-test to generate a corrected product, and the development self-test is performed on the corrected product.
[0092] Furthermore, the step of performing test acceptance according to the primary test case, generating a final version of the test case, and archiving the final version of the test case into the test case library includes:
[0093] Receive a test acceptance request initiated by a user terminal, and display an adapted test acceptance interface; the acceptance elements of the test acceptance interface include: use case scenarios and acceptance results;
[0094] Performing test acceptance on the product according to the test acceptance request and the use case scenarios in the primary test cases;
[0095] If the product passes the test acceptance of the use case scenario, the use case scenario is marked as accepted, and the result of the test acceptance is output to the test acceptance interface;
[0096] If the product fails the test acceptance of the use case scenario, the use case scenario is marked as failed, and the result of the test acceptance is output to the test acceptance interface; the product is repaired according to the result of the test acceptance, a repaired product is generated, and the test acceptance is performed on the repaired product;
[0097] When all the use case scenarios are marked as passed, the final version of the use case is generated.
[0098] The embodiment of the present invention provides an online test case method, referring to Figure 2 In a first embodiment of the online use case testing method, the online use case testing method includes:
[0099] Step S10, combing the use case outline of the product to be tested, and setting the outline levels and use case scenarios of the test cases in a hierarchical manner based on the outline items of the use case outline.
[0100] In this embodiment, it should be noted that the executor of the online use case testing method is a network device. The network device can be connected to the user device through but not limited to the Internet, local area network, and physical connection, receive information input by the user device to write test cases, test the test cases and output the test results and the final version of the test cases in real time, so as to realize the visualization of the use case writing and testing process.
[0101] User devices are terminals that can connect to the Internet, such as mobile phones, laptops, desktop computers, and smart bracelets; user devices and network devices are connected to each other through but not limited to the Internet, local area networks, and physical connections; users of user devices include writers, testers, reviewers, etc.
[0102] The network device can be a traditional server or a cloud server, etc., and is not limited here.
[0103] To help understand the above technical solution, the following is a specific use case outline diagram for auxiliary explanation. Figure 3 , Figure 3 The column in the is the specific outline item, and Figure 3 The CPC contains 5 outline items, from left to right: organizational structure item, login and logout item, navigation framework item, login, report and logout item, and information item at the top of the navigation menu; Figure 3 The module, first-level outline and second-level outline are three different outline levels; the module is the business module, and the organizational structure is the specific business type; the login and logout and navigation framework in the first-level outline are specific function types; the login, reporting, logout, navigation menu and top information in the second-level outline are specific scenario types.
[0104] Combing the use case outline of the product to be tested, the product to be tested is the different software products that need to be tested; the use case outline is the key points of the system arrangement that is established according to the business type, function type, scenario type, etc. of the product to be tested, which is convenient for the management, search and use of the use case. According to the business type to which the software product belongs, the use case outline is combed and divided into different business modules; the business type is the type of classification based on the different transactions that the software product needs to handle, which can be the organizational structure class, system configuration class, log record class, etc., which is not limited in this embodiment. On the basis of the business module, a first-level outline is established according to the different function types of the product to be tested, and the function types include but are not limited to login and logout, navigation framework, organization, role, etc. On the basis of the first-level outline, a second-level outline is established according to the use case scenario type of the product to be tested, and the use case scenario is all test scenarios written based on the needs of the product to be tested, and the use case scenario types include but are not limited to login, reporting, logout, etc. All use case scenarios of the product to be tested are set in the adapted second-level outline, thereby completing the combing and establishment of the use case outline.
[0105] The use case scenarios are all test scenarios written based on the requirements of the product to be tested.
[0106] A test case is a description of how a system responds to external requests in software engineering or system engineering. It is a technique for obtaining requirements by using scenarios. Each test case contains one or more use case scenarios.
[0107] In this embodiment, the outline level and outline items of the corresponding use case outline are sorted out according to the business type, function type and use case scenario type of the product to be tested, and all use case scenarios of the product to be tested are set in the adapted secondary outline to complete the establishment of the use case outline. By sorting out and establishing the product use case outline, the hierarchy of the use case structure involved in the product is made clearer, the subsequent use case writing and testing process is made more intuitive, and the visualization of the use case writing and testing process is further realized.
[0108] Optionally, the step S10 of combing the use case outline of the product to be tested and hierarchically setting the outline levels and use case scenarios of the test cases based on the outline items of the use case outline includes:
[0109] Step S11, sorting out the use case outline and dividing it into different business modules according to the business type of the product to be tested.
[0110] In some embodiments, reference Figure 3 , according to the business type of the product to be tested, the use case outline is sorted and divided into different business modules, and the business type is divided according to the different types of transactions that the software product needs to handle. For example, the business type of the product to be tested includes: organizational structure class, system configuration class and log record class, then according to the business type of the product to be tested, the business modules of the use case outline are divided into: organizational structure module, system configuration module and log record module.
[0111] Step S12, establishing a first-level outline under each of the business modules according to the functional type of the product to be tested.
[0112] In some embodiments, reference Figure 3 , according to the business type of the product to be tested, it is sorted and divided into different business modules. On the basis of the business module, a first-level outline is established according to the functional type of the product to be tested, and the functional type is all the different functions included in the product to be tested. For example, if the business type of the product to be tested is the organizational structure type, and the functional type includes: login and logout function, navigation framework function, organization function and role function, then in the organizational structure module, the use case outline is further sorted into a login and logout first-level outline, a navigation framework first-level outline, an organization first-level outline and a role first-level outline.
[0113] Step S13, establishing a secondary outline under each of the primary outlines according to the use case scenario type of the product to be tested; the primary outline and the secondary outline serve as outline items.
[0114] In some embodiments, reference Figure 3 , according to the business type of the product to be tested, sort out and divide it into different business modules. On the basis of the business module, establish a first-level outline according to the functional type of the product to be tested. On the basis of the first-level outline, establish a second-level outline according to the use case scenario type of the product to be tested. The use case scenario is all the test scenarios written based on the requirements of the product to be tested. For example, the business type of the product to be tested is the organizational structure type, the functional type is login and logout, and the use case scenario types of the product to be tested include: login, reporting and logout, then the login and logout first-level outline in the organizational structure module is further divided into: login second-level outline, reporting second-level outline and logout second-level outline.
[0115] Step S14, setting the use case scenario of the product to be tested in the adapted secondary outline, and adding a scenario overview to the use case scenario as a scenario test point.
[0116] In some embodiments, reference Figure 3 , after sorting out the outline levels and outline items of the use case outline of the product to be tested, set the use case scenario of the product to be tested in the adapted secondary outline. For example, the use case scenario of the product to be tested is startup login, which belongs to the login category, then the use case scenario of startup login is set under the organizational structure module of the use case outline, in the login secondary outline in the login and logout primary outline, and add a scenario overview to the startup login use case scenario, for example, add a scenario overview: Yungou environment startup site initialization progress wizard, use the scenario overview as the scenario test point, and complete the establishment of the use case outline. The test point is the smallest granularity of the test point description after the functional decomposition of the tested scenario or use case, that is, the core inspection point. The test point includes the scenario test point, use case test point, requirement test point, etc. mentioned in the embodiments of the present invention.
[0117] In this embodiment, the outline level and outline items of the corresponding use case outline are sorted out according to the business type, function type and use case scenario type of the product to be tested, and all use case scenarios of the product to be tested are set in the appropriate secondary outline to complete the establishment of the use case outline. By sorting out and establishing the product use case outline, the hierarchy of the use case structure involved in the product is made clearer, the subsequent use case writing process is made more intuitive, and the visualization of the use case writing process is further realized.
[0118] Step S20: establishing a use case library of the product to be tested according to the outline level and use case scenarios.
[0119] In some embodiments, a corresponding use case library directory is set according to the outline level in the combed use case outline, and the use case library directory is the name of the use case listed in a certain order for reference; the use case library directory is associated with the use case outline to achieve the mutual association between the use case library directory items and the outline items of the use case outline, and the corresponding test case can be quickly located through the outline. Based on the use case library directory, the test case of the product to be tested is set in an adapted position, thereby establishing a use case library for the product to be tested.
[0120] A test case is a description of how a system responds to external requests in software engineering or system engineering. It is a technique for obtaining requirements by using scenarios. Each test case contains one or more use case scenarios.
[0121] In this embodiment, a corresponding use case library is established according to the use case outline, and an association relationship is established between the use case outline and the use case library directory to achieve the mutual association between the use case outline and the use case library. The corresponding test case can be quickly located through the use case outline, making the use case writing process more convenient and intuitive, and further realizing the visualization of the use case writing process.
[0122] Optionally, the step S20 of establishing a use case library of the product to be tested according to the outline level and the use case scenario includes:
[0123] Step S21, setting a use case library directory according to the outline level of the use case outline, and establishing an association relationship between the use case library directory and the use case outline.
[0124] To help understand the above technical solutions, the following is a specific use case library diagram for auxiliary explanation. Figure 4 , Figure 4 The organizational structure use cases, system configuration use cases, and logging use cases in the first column are the first-level directories in the use case library directory; the login and logout use cases, navigation framework use cases, role use cases, template use cases, and organization user use cases in the second column are the second-level directories in the use case library directory; the login use cases, reporting use cases, and logout use cases in the third column are the third-level directories in the use case library directory.
[0125] The corresponding use case library directory is set according to the outline level in the combed use case outline. For example, if the module of the use case outline has an organizational structure module, then the first-level directory of the organizational structure use case is set in the first-level directory in the corresponding use case library directory. The use case library directory is the name of the use case listed in a certain order for reference. Then, the use case library directory is associated with the use case outline, the module in the use case outline is associated with the first-level directory in the use case library, the first-level outline in the use case outline is associated with the second-level directory in the use case library, and the second-level outline in the use case outline is associated with the third-level directory in the use case library, so as to realize the mutual association between the use case library and the use case outline. For example, the organizational structure module in the use case outline is associated with the first-level directory of the organizational structure use case in the use case library, and the first-level outline of login and logout in the use case outline is associated with the second-level directory of login and logout use cases in the use case library.
[0126] Step S22, adding a use case test point to the test case of the product to be tested, and identifying a target scenario test point of a target use case scenario consistent with the use case test point in the secondary outline according to the association relationship.
[0127] In some embodiments, a use case test point is added to the test case of the product to be tested, and a target scenario test point of the target use case scenario that is consistent with the use case test point in the secondary outline of the use case outline is identified based on the association relationship, and the position of the test case in the use case library is determined based on the position of the target scenario test point, thereby completing the establishment of the use case library. For example, the use case test point of the test case is: Yungou Environment Starts Site Initialization Progress Wizard, and based on the association relationship between the use case outline and the use case library directory, the scenario test point of the login use case scenario in the login secondary outline in the login and logout primary outline under the organizational structure module of the use case outline is identified as: Yungou Environment Starts Site Initialization Progress Wizard, which is consistent with the use case test point, and the login use case scenario is the target use case scenario.
[0128] Step S23, determining the scene position of the target scene test point in the secondary outline, and identifying the position corresponding to the scene position in the use case library directory as the use case position.
[0129] In some embodiments, according to the association relationship between the use case outline and the use case library directory, the target scenario test point of the target use case scenario that is consistent with the use case test point in the secondary outline of the use case outline is identified, so as to determine the scenario position of the target test point in the secondary outline, and the scenario position is the position of a certain use case scenario in a certain secondary outline in the use case outline; and then the position corresponding to the scenario position in the use case library directory is identified as the use case position, and the use case position is the position of a certain test case in a certain third-level directory in the use case library. For example, the use case test point of the test case is: Yungou Environment Starts Site Initialization Progress Wizard, according to the association relationship between the use case outline and the use case library directory, the use case outline organizational structure module is identified, in the login and logout primary outline, the scenario test point of the login use case scenario in the login secondary outline is: Yungou Environment Starts Site Initialization Progress Wizard, which is consistent with the use case test point, and then the organizational structure use case in the use case library directory is identified, and the login use case position in the login and logout use case is the use case position.
[0130] Step S24, setting the test case of the product to be tested at the test case location, and establishing a test case library of the product to be tested.
[0131] In some embodiments, through the association relationship between the use case outline and the use case library directory, the use case position of the test case in the use case library directory is identified and determined, and all test cases are classified and set in the corresponding use case positions, thereby realizing the establishment of the use case library of the product to be tested.
[0132] In this embodiment, the use case library directory is set according to the outline level of the use case outline, and the association relationship between the use case library directory and the use case outline is established to realize the mutual association between the use case outline and the use case library, and then add the use case test point to the test case of the product to be tested, identify the scenario test point consistent with the use case test point through the association relationship, and determine the location of the scenario test point and the location in the use case library directory as the use case location, and then set all test cases in the corresponding use case location in different categories to realize the establishment of the use case library of the product to be tested. The use case outline can quickly locate the corresponding test case, and the establishment of the use case library makes the use case structure hierarchy clearer, facilitates the centralized maintenance of the use case version, and makes the use case search and writing process more convenient and intuitive, further realizing the visualization of the use case writing process.
[0133] Step S30, receiving a test case writing request initiated by the user end, and displaying an adapted test case writing interface according to the test case writing request; the use case elements of the use case writing interface include: one or more of the use case number, module, use case title, version identifier, test point, input data, operation steps and expected results.
[0134] In some embodiments, the network device receives a test case writing request initiated by the user end, and displays an adapted test case writing interface according to the test case writing request. The test case writing interface includes a new test case writing interface and an optimized test case writing interface, and the test case writing request includes an application scenario and a required test point. The initiation of the test case writing request can be through, but not limited to, inputting in the corresponding input box, single-clicking to select, double-clicking to select, checking, etc.
[0135] Application scenarios are types of scenarios written for use cases, including pure new test scenarios and optimized test scenarios.
[0136] If the application scenario in the use case writing request is a pure new test scenario, indicating that there is no corresponding historical version of the test case in the use case library, then the new use case writing interface is displayed; if the application scenario of the test case writing request is an optimized test scenario, indicating that there is a corresponding historical version of the test case in the use case library, the test case can be written according to the historical version of the test case to simplify the use case writing process. The network device extracts and analyzes the required test points in the test case writing request, screens the target use case test points that are consistent with the required test points, copies the test cases corresponding to the target use case test points, generates a use case copy, identifies the use case element information of the use case copy, inputs the use case element information into the preset optimized use case writing interface, and displays the optimized use case writing interface. The use case elements of the use case writing interface include: one or more of the use case number, module, use case title, version identifier, test point, input data, operation steps, and expected results.
[0137] The use case elements of the use case writing interface refer to the necessary parts that constitute a use case.
[0138] To help understand the above technical solutions, the following is a specific use case interface diagram for auxiliary explanation. Figure 5 , where the use case number can be a string of characters or a string of numbers or a string of characters and numbers, etc.; the module to which it belongs can be the test category or the tested requirement, the tested module, the tested unit, etc. to which the current test case belongs; the use case title can be the focus or focus of the use case described in general language, etc.; the version identifier can be a version number composed of numbers or characters or numbers and characters; the test point is the core inspection point of the use case, which can be a use case test point, a scenario test point, a requirement test point, etc.; the input data is the external data that needs to be input during the execution of the test case, and the input data can be input manually, imported from a file, etc.; the operation steps are the operation steps required to execute the current test case, which can include entry, input, pop-up, etc.; the expected result is the expected output result of the current use case, which can be the content of the return value, the response result of the interface, the rule compliance of the output result, etc. This embodiment only describes some implementable methods for the above use case elements, and does not limit the interpretation of the above use case elements.
[0139] In this embodiment, by receiving a test case writing request initiated by a user terminal, identifying the application scenario and required test points in the test case writing request, analyzing and displaying an adapted use case writing interface, and through the setting of the use case writing interface, the test case writing process is standardized, reducing the dependence on the experience or professional knowledge of the writers, and making the test case writing process standardized and standardized, thereby improving the quality of the use cases. The display of the use case writing interface visualizes the use case writing process, avoiding omissions in the use case writing due to the lack of skills and experience of the use case writers, and the occurrence of situations where omissions are difficult to find, thereby improving the use case writing efficiency and further improving the product delivery efficiency.
[0140] Step S40, receiving writing information input by the user end based on the use case writing interface, and writing the use case elements in the use case writing interface according to the writing information to generate a primary test case.
[0141] In some embodiments, a network device receives a test case writing request initiated by a user terminal, displays an adapted use case writing interface according to the test case writing request, and writes the use case elements in the use case writing interface according to the writing information received from the user terminal. If the use case writing interface is a new use case writing interface, indicating that there is no corresponding historical version of the test case in the use case library, the use case elements in the writing information input by the user terminal are extracted and analyzed for use case writing to generate a primary test case; if the use case writing interface is an optimized use case writing interface, indicating that there is a corresponding historical version of the test case in the use case library, the use case elements in the writing information input by the user terminal are extracted and analyzed for use case writing to generate a primary test case, and the test cases in the use case library except the use case copy are grayed out. Graying out means disabling the selected test case, thereby avoiding testing useless use cases and wasting testing time.
[0142] The writing information is one or more items included in the use case elements of the use case writing interface. The user terminal inputs the writing information in a manner including but not limited to inputting in the corresponding input box, single-clicking to select, double-clicking to select, checking, etc.
[0143] In this embodiment, the network device receives the writing information input by the user end, extracts and analyzes the use case elements in the writing information, and then writes the use case to generate the primary test case. The setting of the use case writing interface normalizes and standardizes the writing process of the test case, reduces the technical and experience requirements for the use case writers, and the display of the use case writing interface realizes the visualization of the use case writing, which can reduce the omissions in the use case writing process, help the use case writers quickly find the problems in the use case writing process, and gray out the non-use case copies, avoiding the problem of long testing time caused by developing and executing all use cases, and further improving the delivery efficiency of the product.
[0144] Step S50, performing test acceptance according to the primary test case, generating a final version of the test case, and archiving the final version of the test case into the test case library.
[0145] In some embodiments, a case review is performed on the generated primary test cases, and development self-testing and test acceptance are performed based on the primary test cases, and each step of the case test process and its results are displayed in the corresponding interface. When all the test acceptances are passed, a final version of the case is generated, and the final version of the case is archived in the use case library. If the application scenario of the writing request for the final version is a purely new test scenario, indicating that there is no corresponding historical version of the test case in the use case library, the final version of the case is copied to the use case library, and a new association relationship is added to the use case outline.
[0146] In one feasible manner, if the application scenario of the writing request for the final version is an optimized test scenario, indicating that a corresponding historical version of the test case exists in the use case library, then based on the use case title and version identifier of the use case copy at the time of writing, the corresponding use case title and upgraded version identifier are added to the final version of the use case, the final version of the use case is placed in the use case library position where the use case copy is located, and based on the association relationship between the use case copy and the use case outline, an association relationship between the final version of the use case and the use case outline is established.
[0147] Use case review refers to the testing process of identifying and improving test cases through different review roles. The review roles of use case review include but are not limited to: PO (Product Owner), principal, SM (Scrum Master), architect, etc.
[0148] Development self-testing refers to the process of testing products based on the mandatory test scenarios in the test cases. The mandatory test scenarios refer to the scenarios that must be tested and verified after the use case review based on all use case scenarios.
[0149] Product refers to the software, program, etc. that needs to be tested.
[0150] Test acceptance refers to the process of testing the product based on all the use case scenarios in the test case.
[0151] In this embodiment, by conducting a case review on the generated primary test cases, and conducting development self-testing and test acceptance according to the primary test cases, and displaying each step of the case test process and its results in the corresponding interface, the case test process is visualized, which is conducive to testers to quickly find problems during the case test process, avoid useless or repeated tests of the case, improve the quality and efficiency of the review, self-testing and acceptance process of the test cases, and further improve the delivery efficiency of the product. Then, when all the test acceptances are passed, the final version of the case is generated, and the final version of the case is archived in the case library, so as to avoid the case from being lost due to the cumbersome test iteration process and the end of the iteration, and facilitate users to quickly understand the product history design and case maintenance.
[0152] Further, in another embodiment of the online use case testing method of the present invention, referring to Figure 6 The step of receiving a test case writing request initiated by a user terminal and displaying an adapted test case writing interface according to the test case writing request comprises:
[0153] Step S31: If the application scenario of the test case writing request is a pure new test scenario, a new case writing interface is displayed.
[0154] In some embodiments, the network device receives a test case writing request initiated by a user terminal, and displays an adapted use case writing interface according to the test case writing request. The use case writing request includes an application scenario and a required test point. The initiation of the use case writing request can be through, but not limited to, inputting in the corresponding input box, single-clicking to select, double-clicking to select, checking, etc. If the application scenario in the use case writing request is a purely new test scenario, indicating that there is no corresponding historical version of the test case in the use case library, then the new use case writing interface is displayed. For example, a writer initiates a test case writing request at the user terminal, wherein the application scenario writer of the test case writing request selects a purely new test scenario by single-clicking, then the new use case writing interface is displayed at the user terminal.
[0155] Application scenarios are types of scenarios written for use cases, including pure new test scenarios and optimized test scenarios.
[0156] Step S32: If the application scenario of the test case writing request is an optimized test scenario, extract and analyze the required test points in the test case writing request, screen the target case test points that are consistent with the required test points, copy the test cases corresponding to the target case test points, generate a case copy, identify the case element information of the case copy, input the case element information into a preset optimized case writing interface, and display the optimized case writing interface.
[0157] In some embodiments, the network device receives a test case writing request initiated by a user terminal, and displays an adapted use case writing interface according to the test case writing request. If the application scenario of the test case writing request is an optimized test scenario, it indicates that there is a corresponding historical version of the test case in the use case library, and the test case can be written according to the historical version of the test case to simplify the use case writing process. The network device analyzes the use case writing request input by the user terminal, extracts the required test points in the use case writing request, and screens the target use case test points in the use case library that are consistent with the required test points, copies the test cases corresponding to the target use case test points, generates a use case copy, identifies the use case element information contained in the use case copy, and inputs the identified use case element information into the preset optimized use case writing interface, and displays the optimized use case writing interface.
[0158] For example, the writer initiates a test case writing request on the user side, where the application scenario of the test case writing request is a pure new test scenario, and the required test point enters the Yungou environment startup site initialization progress wizard. The network device analyzes and screens out the use case test points of the login use case under the organizational structure use case and the login and logout use case in the use case library, which are consistent with the required test points. The login use case is copied to generate a login use case copy, the use case element information contained in the login use case copy is identified, and the identified use case element information is input into the preset optimized use case writing interface to display the optimized use case writing interface.
[0159] In this embodiment, by receiving and analyzing the application scenarios and required test points contained in the test case writing request initiated by the user end, the adapted use case writing interface is displayed. By setting the differentiated use case writing interface, not only the use case writing process is simplified, the requirements for the skills and experience of the use case writers are reduced, but also the use case writing process is standardized. The display of the use case writing interface realizes the visualization of the case writing process, and the use case writers can quickly find writing problems, further improving the writing efficiency of the use case.
[0160] Step S33: if the use case writing interface is a new use case writing interface, extract and analyze the use case elements in the writing information input by the user end to write the use case and generate a primary test case.
[0161] In some embodiments, based on the pure new test scenario in the use case writing request input by the user end, a new use case writing interface is displayed, and the writer inputs the use case elements according to the new use case writing interface. When the writer completes the input of all the use case elements, the network device analyzes and writes the use case elements to generate a primary test case.
[0162] Step S34, if the use case writing interface is an optimized use case writing interface, extract and analyze the use case elements in the writing information input by the user end to write the use case, generate primary test cases, and gray out the test cases in the use case library except the use case copy.
[0163] In some embodiments, an optimized use case writing interface is displayed based on the optimized test scenario in the use case writing request input by the user end, and the writing personnel adjust the use case elements displayed on the optimized use case writing interface. The adjustment includes but is not limited to deletion, addition, modification order, etc. Use cases are written according to the adjusted use case elements of the optimized use case writing interface to generate primary test cases. At the same time, test cases in the case library except for the use case copy are grayed out, so that the subsequent use case testing process will not waste testing on irrelevant test cases, thereby further improving the product delivery efficiency.
[0164] In this embodiment, the network device receives the writing information input by the user end, extracts and analyzes the use case elements in the writing information, and then writes the use case to generate the primary test case. The differentiated use case writing interface is set up to make the use case writing process more convenient and quick, and also make the test case writing process more standardized, avoiding the use case writing errors caused by the lack of skills and experience of the use case writers. The display of the use case writing interface realizes the visualization of the use case writing, which can reduce the omissions in the use case writing process, help the use case writers quickly find the problems in the use case writing process, and gray out the non-use case copies, avoiding the problem of long time caused by the development and execution of all use cases, and further improve the delivery efficiency of the product.
[0165] Step S35, receiving a use case review request initiated by the user end, and displaying an adapted use case review interface according to the use case review request; the review elements of the use case review interface include: review role, review result, review opinion and required test scenario.
[0166] To help understand the above technical solutions, the following is a specific use case review interface diagram for auxiliary explanation. Figure 7 , receiving a use case review request initiated by the user end, and displaying an adapted use case review interface according to the use case review request. The review elements of the use case review interface include: review role, review result, review opinion and required test scenario. Figure 7 The review role, review result, review opinion and mandatory test scenario in the review elements are each in a separate column, and the corresponding review result, review opinion and mandatory test scenario obtained after each specific review role reviews the use case is in a row.
[0167] The use case review request includes but is not limited to the selection of the review role, the selection of the review content, etc. The initiation method of the use case review request includes but is not limited to inputting in the corresponding input box, single-clicking to select, double-clicking to select, checking, etc.
[0168] Review elements refer to the necessary parts that constitute the use case review, among which the review roles may be: PO, principal, SM, architect, etc.; the review results may be passed, modified, failed, etc.; the review opinions may be specific test case modification methods, contents, etc.; the required test scenarios may be the use case scenarios included in the test cases or other scenarios that are not written into the test cases. This embodiment only describes some feasible ways to implement the above review elements, and does not limit the interpretation of the above review elements.
[0169] Step S36, receiving the review information input by the user, inputting the review information into the review element of the use case review interface, updating the use case review interface and displaying the updated use case review interface.
[0170] In some embodiments, the user selects a review role in the use case review interface, inputs the review results, review opinions, and must-test scenarios obtained after the review role reviews the use case from his or her professional perspective, the network device receives the review information, inputs the review information into the corresponding review elements of the use case review interface, thereby updating the use case review interface, and then displays the updated use case review interface. For example, after the review role PO reviews the use case from a delivery perspective, the review result is: modification; review opinions: navigation should take effect the next time the user logs in, performance testing needs to verify the display of all application lists in the production environment, introduce modules, set attribution to see if there are performance issues, and add core scenarios to the use case; must-test scenarios: user scenario testing. After the above review information is input, the network device inputs the review information into the corresponding review elements of the use case review interface after receiving the review information, thereby updating the use case review interface, and displaying the updated use case review interface, refer to Figure 7 .
[0171] The review information includes the review results, review opinions and required test scenarios obtained by each review role after reviewing the test cases based on their respective professional perspectives.
[0172] Step S37, according to the review opinions in the updated use case review interface, the primary test case is improved, and the must-test scenarios in the primary test case are determined.
[0173] In some embodiments, the network device receives the review information input by the user terminal, inputs the review information into the corresponding review element column of the use case review interface, thereby updating the use case review interface, and then displays the updated use case review interface. According to the review opinions in the updated use case review interface, the primary test case is improved, and the must-test scenarios in the primary test case are determined to facilitate the subsequent development self-test of the test case. The improvement of the primary test case includes but is not limited to the addition, deletion or replacement of the test order of the use case scenario.
[0174] In this embodiment, by receiving a use case review request initiated by the user end, an adapted use case review interface is displayed, so that the tester can conduct a use case review meeting according to the use case review interface, realize the visualization of the use case testing process, and give corresponding review opinions according to the review role, improve the primary test cases, and determine the mandatory test scenarios for development self-testing, which is conducive to the development of the self-testing link, avoids the omission of use case scenarios or mandatory test scenarios, and further improves the product delivery efficiency.
[0175] Optionally, after the step S37 of improving the primary test case according to the review opinions in the updated use case review interface and determining the must-test scenarios in the primary test case, the following steps may be performed:
[0176] Step S371, receiving a development self-test request initiated by the user end, and displaying an adapted development self-test interface; the self-test elements of the development self-test interface include: required test scenarios and self-test results.
[0177] In some embodiments, the network device receives a self-test request initiated by a user terminal, and displays an adapted development self-test interface according to the self-test request; the self-test elements of the development self-test interface include: required test scenarios and self-test results.
[0178] The self-test request includes all mandatory test scenarios for self-testing during the development of primary test cases; mandatory test scenarios are scenarios that must be tested and verified based on the development of all use case scenarios after the use case review; self-test results are the results obtained after the product to be tested is tested according to the mandatory test scenarios in the primary test cases, which may be passed or failed or the reasons for failure, etc., which are not limited in this embodiment.
[0179] Step S372: Perform development self-test on the preset product according to the development self-test request and the required test scenarios in the primary test case.
[0180] In some embodiments, the network device performs development self-test on a preset product based on a development self-test request and a mandatory test scenario in the development self-test request. If the product passes the development self-test of the mandatory test scenario, indicating that the product performs normally in the mandatory test scenario, the mandatory test scenario is marked as self-test passed, and the development self-test pass result is output to the development self-test interface; if the product fails the development self-test of the mandatory test scenario, indicating that there is an abnormality in the execution of the product in the mandatory test scenario, the mandatory test scenario is marked as self-test failed, and the development self-test failed result is output to the development self-test interface for the tester to correct the product.
[0181] Step S373: If the product passes the development self-test of the mandatory test scenario, the mandatory test scenario is marked as self-test passed, and the result of the development self-test is output to the development self-test interface.
[0182] In some embodiments, the network device performs development self-test on the product based on the development self-test request and the mandatory test scenarios in the development self-test request. If the product passes the development self-test of the mandatory test scenario, indicating that the product performs normally in the mandatory test scenario, the mandatory test scenario is marked as self-test passed, and the result of the development self-test pass is output to the development self-test interface. After the development self-test of all mandatory test scenarios is completed, the corresponding development self-test pass rate is output to provide data basis for the quality of the product and use cases.
[0183] Step S374, if the product fails the development self-test of the mandatory test scenario, the mandatory test scenario is marked as failed, and the result of the development self-test is output to the development self-test interface; the product is corrected according to the result of the development self-test, a corrected product is generated, and the development self-test is performed on the corrected product.
[0184] In some embodiments, the network device performs development self-test on the product based on the development self-test request and the mandatory test scenarios in the development self-test request. If the product fails the development self-test of the mandatory test scenario, indicating that there is an abnormality in the execution of the product in the mandatory test scenario, the mandatory test scenario is marked as self-test failed, and the result of the failed development self-test is output to the development self-test interface. The tester modifies the product based on the result of the failed development self-test, generates a modified product, and performs development self-test on the modified product again. If the development self-test fails, continue to execute step S374.
[0185] In this embodiment, according to the development self-test request initiated by the user end, an adapted development self-test interface is displayed to realize the visualization of the use case development self-test process, and then the product primary test case is subjected to development self-test according to the development self-test request and the required test scenario. If the product passes the development self-test of the required test scenario, the required test scenario is marked as passed, and the result of the development self-test is output to the development self-test interface. If the primary test case passes the development self-test of the required test scenario, the required test scenario is marked as passed, and the result of the development self-test is output to the development self-test interface; if the product primary test case fails the development self-test of the required test scenario, the required test scenario is marked as failed, and the result of the development self-test is output to the development self-test interface; according to the result of the development self-test, the product primary test case is corrected to generate a corrected product primary test case, and the corrected product primary test case is subjected to development self-test again until the development self-test of all required test scenarios is passed. By outputting the development self-test results in real time and displaying them on the development self-test interface, the use case development self-test process is visualized, avoiding the omission of scenarios due to the large number of required test scenarios. This helps testers quickly discover problems with use case products and make targeted corrections and improvements to product test cases based on the problems, further improving product delivery efficiency.
[0186] Further, in another embodiment of the online use case testing method of the present invention, referring to Figure 8 The steps of performing test acceptance according to the primary test case, generating a final version of the test case, and archiving the final version of the test case into the test case library include:
[0187] Step S51, receiving a test acceptance request initiated by a user terminal, and displaying an adapted test acceptance interface; the acceptance elements of the test acceptance interface include: use case scenarios and acceptance results.
[0188] In some embodiments, after passing the development self-test of all required test scenarios, the user terminal initiates a test acceptance request, and the network device displays an adapted test acceptance interface according to the test acceptance request, and the acceptance elements of the test acceptance interface include: use case scenarios and acceptance results.
[0189] The test acceptance request is a request for executing the test acceptance step submitted by the user end to the network device, which can be achieved by, but not limited to, entering in the corresponding input box, single-clicking to select, double-clicking to select, checking, etc.
[0190] Acceptance elements refer to the necessary parts that constitute test acceptance, including use case scenarios and acceptance results; use case scenarios are all test scenarios written based on the requirements of the product to be tested; acceptance results are the results obtained after the product has been tested through the test scenarios, which may be pass or fail or the reason for failure, etc. This embodiment does not impose any restrictions on this.
[0191] Step S52: Perform test acceptance on the product according to the test acceptance request and the use case scenarios in the primary test case.
[0192] In some embodiments, after the user terminal initiates a test acceptance request, the network device displays an adapted test acceptance interface according to the test acceptance request, and performs test acceptance on the product according to the use case scenario in the test acceptance interface. If the initial product passes the test acceptance of the use case scenario, indicating that the product performs normally in the use case scenario, the use case scenario is marked as accepted and the pass result is output to the test acceptance interface; if the product fails the test acceptance of the use case scenario, indicating that there is an abnormality in the execution of the product in the use case scenario, the use case scenario is marked as failed, and the failed result is output to the test acceptance interface, the product is repaired according to the acceptance result, and the repaired product is tested and accepted again.
[0193] Step S53: if the product passes the test acceptance of the use case scenario, the use case scenario is marked as accepted, and the test acceptance result is output to the test acceptance interface.
[0194] In some embodiments, when the user terminal initiates a test acceptance request, the network device displays an adapted test acceptance interface according to the test acceptance request, and performs test acceptance on the product according to the use case scenario in the test acceptance interface. If the product passes the test acceptance of the use case scenario, indicating that the product performs normally in the use case scenario, the use case scenario is marked as accepted and the pass result is output to the test acceptance interface. When all use case scenarios are accepted, the corresponding test acceptance pass rate is output to provide data basis for the quality of the product and use case.
[0195] Step S54, if the product fails the test acceptance of the use case scenario, the use case scenario is marked as failed, and the result of the test acceptance is output to the test acceptance interface; the product is repaired according to the result of the test acceptance, a repaired product is generated, and the test acceptance is performed on the repaired product.
[0196] In some embodiments, after the user terminal initiates a test acceptance request, the network device displays an adapted test acceptance interface according to the test acceptance request, and performs test acceptance on the product according to the use case scenario in the test acceptance interface. If the product fails the test acceptance of the use case scenario, indicating that there is an abnormality in the execution of the product in the use case scenario, the use case scenario is marked as failed, and the result of the test acceptance is output to the test acceptance interface. The product is repaired according to the result of the test acceptance to generate a repaired product, and the repaired product is tested and accepted again. If it has not passed the test acceptance, step S54 is continued until the test acceptance of all use case scenarios is passed.
[0197] In one feasible method, if there is a change in product requirements during the testing process, the use case writer can re-initiate a test case writing request, display an adapted use case writing interface based on the test case writing request, modify the use case scenario in the use case writing interface, and then revise the test case. The revision includes adding, deleting, and reversing the order of the use case scenarios, which is not limited in this embodiment.
[0198] Step S55: When all the use case scenarios are marked as passed, a final version of the use case is generated.
[0199] In some embodiments, when all use case scenarios of the primary test case are marked as passed, it indicates that the product has passed the test acceptance and the product is qualified for delivery, and the primary test case is output as a final version use case, and the final version use case is archived in the use case library. If the application scenario of the writing request for the final version is a pure new test scenario, it indicates that the final version use case is a new use case, and there is no historical version of the use case in the use case library, so the final version use case is copied to the use case library, and a new association relationship is added with the use case outline to facilitate the search and use of future use cases.
[0200] In one feasible manner, if the application scenario of the writing request of the final version of the use case is an optimized test scenario, it indicates that the final version of the use case is an optimization of an existing use case, and there is a historical version of the use case in the use case library. Therefore, based on the use case title and version identifier of the use case copy at the time of writing, the corresponding use case title and upgraded version identifier are added to the final version of the use case, and the final version of the use case is placed in the use case library position where the use case copy is located, and based on the association relationship between the use case copy and the use case outline, an association relationship between the final version of the use case and the use case outline is established.
[0201] For example, if the application scenario of the writing request for the final version of the use case is an optimized test scenario, then based on the use case copy during writing: Login Use Case V1.1, add a use case title: Login Use Case, and an upgraded version identifier V1.2 to the final version of the use case, place the Login Use Case V1.2 in the use case library location where the Login Use Case V1.1 is located, and establish an association relationship between the Login Use Case V1.2 and the use case outline based on the association relationship between the Login Use Case V1.1 and the use case outline.
[0202] In this embodiment, when the test acceptance of the primary test case is completed, according to the test acceptance request of the user end, the adapted test acceptance interface is displayed to realize the visualization of the test acceptance process of the case, and the product is tested and accepted according to the test acceptance request and the case scenario, and the corresponding result is output to the test acceptance interface according to the acceptance result, which is conducive to the test personnel to quickly find problems in the test acceptance process, modify and optimize the product in time, reduce the test acceptance time, and further improve the delivery efficiency of the product. Then, when the test acceptance of the case scenario is all passed, the final version of the case is generated, and the final version of the case is archived in the case library, so as to avoid the case from being lost due to the cumbersome test iteration process and the end of the iteration, and facilitate users to quickly understand the historical design of the product and the maintenance of the case.
[0203] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0204] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0205] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An online use case testing method, It is characterized in that The online use case testing method comprises the following steps: Sorting out the use case outline of the product to be tested, and setting the outline level and use case scenarios of the test cases in a hierarchical manner based on the outline items of the use case outline; Establishing a use case library for the product to be tested according to the outline level and use case scenarios; Receive a test case writing request initiated by a user end, and display an adapted test case writing interface according to the test case writing request; the test case elements of the test case writing interface include: one or more of the test case number, the module to which it belongs, the test case title, the version identifier, the test point, the input data, the operation steps and the expected result; Receiving writing information input by a user terminal based on the use case writing interface, and writing the use case elements in the use case writing interface according to the writing information to generate a primary test case; Perform test acceptance according to the primary test cases, generate final version test cases, and archive the final version test cases into the test case library; the test acceptance refers to the process of testing the product to be tested according to all the use case scenarios in the primary test cases; The test case writing request encapsulates the application scenario and the required test points, and the step of displaying the adapted test case writing interface according to the test case writing request includes: If the application scenario of the test case writing request is a pure new test scenario, a new case writing interface is displayed; If the application scenario of the test case writing request is an optimized test scenario, extract and analyze the required test points in the test case writing request, screen the target case test points that are consistent with the required test points, copy the test cases corresponding to the target case test points, generate a case copy, identify the case element information of the case copy, input the case element information into a preset optimized case writing interface, and display the optimized case writing interface; Wherein, after the step of generating the primary test case, the method further includes: Receive a use case review request initiated by a user terminal, and display an adapted use case review interface according to the use case review request; the review elements of the use case review interface include: review role, review result, review opinion and required test scenario; Receiving review information input by a user, inputting the review information into a review element of the use case review interface, updating the use case review interface and displaying the updated use case review interface; According to the review opinions in the updated use case review interface, the primary test case is improved, and the must-test scenarios in the primary test case are determined; Receive a development self-test request initiated by a user terminal, and display an adapted development self-test interface; the self-test elements of the development self-test interface include: required test scenarios and self-test results; Perform development self-test on the preset product according to the development self-test request and the required test scenarios in the primary test case; If the product passes the development self-test of the required test scenario, mark the required test scenario as passed, and output the result of the development self-test to the development self-test interface; If the product fails the development self-test of the required test scenario, the required test scenario is marked as failed, and the result of the development self-test is output to the development self-test interface; the product is modified according to the result of the development self-test to generate a modified product, and the development self-test is performed on the modified product; The steps of performing test acceptance according to the primary test case, generating a final version of the test case, and archiving the final version of the test case into the test case library include: Receive a test acceptance request initiated by a user terminal, and display an adapted test acceptance interface; the acceptance elements of the test acceptance interface include: use case scenarios and acceptance results; Performing test acceptance on the product according to the test acceptance request and the use case scenarios in the primary test cases; If the product passes the test acceptance of the use case scenario, the use case scenario is marked as accepted, and the result of the test acceptance is output to the test acceptance interface; If the product fails the test acceptance of the use case scenario, the use case scenario is marked as failed, and the result of the test acceptance is output to the test acceptance interface; the product is repaired according to the result of the test acceptance, a repaired product is generated, and the test acceptance is performed on the repaired product; When all the use case scenarios are marked as passed, the final version of the use case is generated; If the application scenario of the writing request of the final version of the use case is a purely new test scenario, the final version of the use case is copied to the use case library, and a new association relationship is added to the use case outline; If the application scenario of the writing request of the final version of the use case is an optimized test scenario, the corresponding use case title and upgraded version identifier are added to the final version of the use case based on the use case title and version identifier of the use case copy during writing, the final version of the use case is placed in the use case library location where the use case copy is located, and based on the association relationship between the use case copy and the use case outline, an association relationship between the final version of the use case and the use case outline is established.
2. The online use case testing method according to claim 1, It is characterized in that The step of sorting out the outline levels and outline items of the use case outline according to the business type, function type and use case scenario type of the product to be tested comprises: According to the business type of the product to be tested, the use case outline is sorted out and divided into different business modules; Establishing a first-level outline under each of the business modules according to the functional type of the product to be tested; A secondary outline is established under each of the primary outlines according to the use case scenario type of the product to be tested; the primary outline and the secondary outline serve as outline items.
3. The online use case testing method as claimed in claim 2, It is characterized in that The step of establishing a use case library of the product to be tested according to the outline level and the use case scenario comprises: Setting a use case library directory according to the outline level of the use case outline, and establishing an association relationship between the use case library directory and the use case outline; Adding a use case test point to the test case of the product to be tested, and identifying a target scenario test point of a target use case scenario consistent with the use case test point in the secondary outline according to the association relationship; Determine the scene position of the target scene test point in the secondary outline, and identify the position corresponding to the scene position in the use case library directory as the use case position; The test cases of the product to be tested are set at the test case positions, and a test case library of the product to be tested is established.
4. The online use case testing method according to claim 1, It is characterized in that The step of receiving the writing information input by the user terminal based on the use case writing interface and writing the use case elements in the use case writing interface according to the writing information to generate the primary test case includes: If the use case writing interface is a new use case writing interface, extracting and analyzing the use case elements in the writing information input by the user end to write the use case and generate a primary test case; If the use case writing interface is an optimized use case writing interface, the use case elements in the writing information input by the user are extracted and analyzed to perform use case writing, generate primary test cases, and gray out the test cases in the use case library except the use case copy.
5. An online use case testing device, It is characterized in that The device comprises: a memory, a processor, and an online use case testing program stored in the memory and executable on the processor, wherein the online use case testing program is configured to implement the steps of the online use case testing method as described in any one of claims 1 to 4.
6. A storage medium, It is characterized in that The storage medium is a computer-readable storage medium, on which an online use case testing program is stored. The online use case testing program is executed by a processor to implement the steps of the online use case testing method as described in any one of claims 1 to 4.
