CN110837464A - Test case processing method and device - Google Patents

Test case processing method and device Download PDF

Info

Publication number
CN110837464A
CN110837464A CN201910961494.2A CN201910961494A CN110837464A CN 110837464 A CN110837464 A CN 110837464A CN 201910961494 A CN201910961494 A CN 201910961494A CN 110837464 A CN110837464 A CN 110837464A
Authority
CN
China
Prior art keywords
test
data
matrix
points
cases
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910961494.2A
Other languages
Chinese (zh)
Inventor
张启甫
庞久武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suning Cloud Computing Co Ltd
Original Assignee
Suning Cloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suning Cloud Computing Co Ltd filed Critical Suning Cloud Computing Co Ltd
Priority to CN201910961494.2A priority Critical patent/CN110837464A/en
Publication of CN110837464A publication Critical patent/CN110837464A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention discloses a test case processing method and device, relates to the technical field of software testing, and can improve the production efficiency of test cases. The method comprises the following steps: acquiring a plurality of test points according to different test scenes of the test service; constructing a matrix template based on a plurality of test points, and correspondingly inputting the obtained test data into the matrix template to obtain a data matrix; and polling the test cases in the data matrix, and executing the test according to preset test logic. The device is applied with the method provided by the scheme.

Description

Test case processing method and device
Technical Field
The invention relates to the technical field of software testing, in particular to a method and a device for processing a test case.
Background
Due to the fact that the software industry is competitive, the development period of the application program is short, and the requirement on the application program is high. Therefore, before the application is released, the application is strictly tested to ensure the quality of the application, and the testing time is not expected to be too long. The basis of the application program test is a test case, and the quality of the test case directly influences the test result of the application program.
For the test condition that a plurality of service scene combinations coexist under a certain service rule required to be realized in the requirement, a tester faces a complicated service logic and system implementation mode with very high coupling degree, on one hand, a large amount of time is needed to compile test cases of each function point one by one, but the test scene and the test case redundancy condition exist in the actual use; on the other hand, in the test execution process, corresponding test data needs to be prepared according to each test case, and then the test is executed, so that the process is complex in operation and low in test efficiency.
Disclosure of Invention
The invention aims to provide a test case processing method and device, which can improve the production efficiency of test cases.
In order to achieve the above object, an aspect of the present invention provides a test case processing method, including:
acquiring a plurality of test points according to different test scenes of the test service;
constructing a matrix template based on the plurality of test points, and correspondingly inputting the obtained test data into the matrix template to obtain a data matrix;
polling the test cases in the data matrix, and executing the test according to preset test logic.
Preferably, the method for obtaining a plurality of test points according to different test scenarios of the test service includes:
combing each test scene in the test service, and splitting initial test points corresponding to each test scene respectively;
and summarizing and de-duplicating the initial test points to obtain a plurality of test points.
Preferably, the method for constructing the matrix template based on the plurality of test points includes:
and recording the test points into an EXCEL table in a header form, and constructing the matrix template.
Preferably, the method for obtaining the data matrix after correspondingly inputting the obtained test data into the matrix template comprises:
inputting test parameters in each piece of user data and the test points in the matrix template correspondingly to generate a data matrix; wherein the content of the first and second substances,
the test data comprises a plurality of pieces of user data, and each piece of user data at least comprises one test parameter.
Further, the method for polling the test cases in the data matrix and executing the test according to the preset test logic includes:
extracting each piece of user data from a data matrix, and correspondingly obtaining a plurality of test cases;
sequentially extracting the test cases, and testing according to preset test logic to obtain test results corresponding to the test cases one by one;
and counting and summarizing the test results and outputting a test report.
Compared with the prior art, the test case processing method provided by the invention has the following beneficial effects:
the test case processing method provided by the invention can cover a combined test scene in a test service, constructs a matrix template by combing test points in the combined test scene, generates a data matrix comprising a plurality of test cases after inputting the obtained test data into the matrix template, and finally calls the test cases in sequence by using preset test logic to execute the test.
Compared with the prior art that the test cases are compiled by depending on testers manually one by one, the test case compiling method and the test case compiling device can reduce the workload of the testers, save the production time of the test cases and improve the test efficiency; in addition, the test case is obtained through the data matrix, the test case has the characteristics of simplicity and easiness in observation, the test intention is clearly displayed to the tester, and the tester can conveniently make targeted supplementary modification on the test case.
Another aspect of the present invention provides a test case processing apparatus, to which the test case processing method mentioned in the above technical solution is applied, the apparatus including:
the test point unit is used for acquiring a plurality of test points according to different test scenes of the test service;
the data matrix unit is used for constructing a matrix template based on the plurality of test points and correspondingly inputting the obtained test data into the matrix template to obtain a data matrix;
and the test unit is used for polling the test cases in the data matrix and executing the test according to preset test logic.
Preferably, the test point unit includes:
the test point splitting module is used for combing each test scene in the test service and splitting the initial test point corresponding to each test scene;
and the test point processing module is used for summarizing and de-duplicating the initial test points to obtain a plurality of test points.
Preferably, the data matrix unit includes:
the matrix template module is used for recording the test points into an EXCEL form in a form of a header and constructing the matrix template;
the data import module is used for correspondingly inputting the test parameters in each piece of user data and the test points in the matrix template to generate a data matrix; the test data comprises a plurality of pieces of user data, and each piece of user data at least comprises one test parameter.
Preferably, the test unit includes:
the data extraction module is used for extracting each piece of user data from a data matrix and correspondingly obtaining a plurality of test cases;
the test module is used for sequentially extracting the test cases and obtaining test results corresponding to the test cases one by one after testing according to preset test logic;
and the result output module is used for summarizing the test result statistics and outputting a test report.
Compared with the prior art, the beneficial effects of the test case processing device provided by the invention are the same as those of the test case processing method provided by the technical scheme, and are not repeated herein.
A third aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the test case processing method described above.
Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the invention are the same as those of the test case processing method provided by the technical scheme, and are not repeated herein.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a flowchart illustrating a method for processing a test case according to an embodiment;
FIG. 2 is a diagram illustrating a data matrix according to an embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, the present embodiment provides a method for processing a test case, including:
acquiring a plurality of test points according to different test scenes of the test service; constructing a matrix template based on a plurality of test points, and correspondingly inputting the obtained test data into the matrix template to obtain a data matrix; and polling the test cases in the data matrix, and executing the test according to preset test logic.
The test case processing method provided by the embodiment can cover a combined test scene in a test service, construct a matrix template by combing test points in the combined test scene, generate a data matrix including a plurality of test cases after inputting obtained test data into the matrix template, and finally sequentially call the test cases by using preset test logic to execute a test.
Compared with the prior art that the test cases are compiled one by one manually by the tester, the test case compiling method has the advantages that the workload of the tester is reduced, the production time of the test cases is saved, and the test efficiency is improved; in addition, the test case is obtained through the data matrix, the test case has the characteristics of simplicity and easiness in observation, the test intention is clearly displayed to the tester, and the tester can conveniently make targeted supplementary modification on the test case.
In the above implementation, the method for obtaining a plurality of test points according to different test scenarios of the test service includes: combing each test scene in the test service, and splitting initial test points corresponding to each test scene respectively; and summarizing and de-duplicating the initial test points to obtain a plurality of test points.
In specific implementation, the test scenes are set based on the test dimensions, the test scenes correspond to the test dimensions, for convenience of understanding, a case that a platform provides trial commodities for a user to try is illustrated, the trial commodities provided by the platform include multiple types, but each type of trial commodity is provided only one, and the platform extracts a user for winning a prize according to the following test logic after the user registers and applies for the prize:
1. the commodities with the sum of more than 2000 yuan can enter a lottery list only if the willingness value of the applicant is more than 500;
2. the commodities with the sum of more than 1000 yuan and less than 2000 yuan can enter a lottery list only if the willingness value of the applicant is more than 400 yuan;
3. the commodities with the sum of more than 200 yuan and less than 1000 yuan can enter a lottery list only if the willingness value of the applicant is more than 200 yuan;
4. the commodities with the sum of less than 200 yuan can enter a lottery list only if the willingness value of the applicant is more than 80;
5. the lottery drawing users cannot be in the activity blacklist of the platform, and the same lottery drawing user can only obtain the trial chance of one trial commodity at most under the same activity, and the higher the member level is, the higher the trial probability of the user who does not apply for success is.
When applying for registration, the platform automatically assigns willingness values to the users 10, and the users can increase the willingness values by sharing activity links or inviting new users.
The lottery drawing rule is analyzed and obtained based on the lottery drawing rule, the business rule relates to trial commodities with different amounts of money and relates to a plurality of users, the condition that the same user applies for the trial commodities exists, the trial commodities with different amounts of money have different requirements on willingness values of the users, and in sum, the test business comprises a plurality of test scenes. The sorted test points comprise application users, commodity amount, willingness degree values, whether the test points are blacklist users, membership grade, whether the application is successful in the past time, and the like.
Exemplarily, the method for constructing the matrix template based on the plurality of test points in the above embodiment includes:
and recording the test points into an EXCEL table in a header form, and constructing a matrix template.
The method for obtaining the data matrix after correspondingly inputting the obtained test data into the matrix template comprises the following steps:
correspondingly inputting test parameters in each piece of user data and test points in a matrix template to generate a data matrix; the test data comprises a plurality of pieces of user data, and each piece of user data at least comprises one test parameter. Fig. 2 is a data matrix correspondingly generated based on the above embodiment, each piece of user data in the data matrix correspondingly represents one test case, and the test case in the data matrix is tested based on the above test logic.
Specifically, the method for polling the test cases in the data matrix in the above embodiment and executing the test according to the preset test logic includes:
extracting each piece of user data from the data matrix, and correspondingly obtaining a plurality of test cases; sequentially extracting test cases, and testing according to preset test logic to obtain test results corresponding to the test cases one by one; and (5) counting and summarizing the test results, and outputting a test report.
In specific implementation, detailed test scenes are obtained through analysis according to requirements, user data are matched with an EXCEL table, a multi-scene coexisting data matrix can be formed only in a short time, only actual execution results need to be marked in the test process, the data matrix clearly shows the multi-scene coexisting test points, test intentions and test results only through one round of test, and meanwhile, the data matrix supports repeated execution of the test. In summary, the present embodiment improves the defect of low efficiency of executing test cases one by one, and all test scenarios can be covered by one round of testing of the data matrix.
Example two
The present embodiment provides a test case processing apparatus, including:
the test point unit is used for acquiring a plurality of test points according to different test scenes of the test service;
the data matrix unit is used for constructing a matrix template based on a plurality of test points and correspondingly inputting the obtained test data into the matrix template to obtain a data matrix;
and the test unit is used for polling the test cases in the data matrix and executing the test according to preset test logic.
Preferably, the test point unit includes:
the test point splitting module is used for combing each test scene in the test service and splitting the initial test point corresponding to each test scene;
and the test point processing module is used for summarizing and de-duplicating the initial test points to obtain a plurality of test points.
Preferably, the data matrix unit includes:
the matrix template module is used for recording the test points into an EXCEL form in a form of a header to construct a matrix template;
the data import module is used for correspondingly inputting the test parameters in each piece of user data and the test points in the matrix template to generate a data matrix; the test data comprises a plurality of pieces of user data, and each piece of user data at least comprises one test parameter.
Preferably, the test unit includes:
the data extraction module is used for extracting each piece of user data from the data matrix and correspondingly obtaining a plurality of test cases;
the test module is used for sequentially extracting the test cases and obtaining test results corresponding to the test cases one by one after testing according to preset test logic;
and the result output module is used for summarizing the test result statistics and outputting a test report.
Compared with the prior art, the beneficial effects of the test case processing apparatus provided in this embodiment are the same as those of the test case processing method provided in the above embodiment, and are not described herein again.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the test case processing method.
Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment are the same as the beneficial effects of the test case processing method provided by the above technical scheme, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the invention may be implemented by hardware that is instructed to be associated with a program, the program may be stored in a computer-readable storage medium, and when the program is executed, the program includes the steps of the method of the embodiment, and the storage medium may be: ROM/RAM, magnetic disks, optical disks, memory cards, and the like.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A test case processing method is characterized by comprising the following steps:
acquiring a plurality of test points according to different test scenes of the test service;
constructing a matrix template based on the plurality of test points, and correspondingly inputting the obtained test data into the matrix template to obtain a data matrix;
polling the test cases in the data matrix, and executing the test according to preset test logic.
2. The method of claim 1, wherein the method for obtaining a plurality of test points according to different test scenarios of the test service comprises:
combing each test scene in the test service, and splitting initial test points corresponding to each test scene respectively;
and summarizing and de-duplicating the initial test points to obtain a plurality of test points.
3. The method of claim 1, wherein constructing a matrix template based on a plurality of the test points comprises:
and recording the test points into an EXCEL table in a header form, and constructing the matrix template.
4. The method according to claim 3, wherein the method for obtaining the data matrix after correspondingly inputting the acquired test data into the matrix template comprises:
inputting test parameters in each piece of user data and the test points in the matrix template correspondingly to generate a data matrix; wherein the content of the first and second substances,
the test data comprises a plurality of pieces of user data, and each piece of user data at least comprises one test parameter.
5. The method according to any one of claims 1-4, wherein polling the test cases in the data matrix, and performing the test according to a preset test logic comprises:
extracting each piece of user data from a data matrix, and correspondingly obtaining a plurality of test cases;
sequentially extracting the test cases, and testing according to preset test logic to obtain test results corresponding to the test cases one by one;
and counting and summarizing the test results and outputting a test report.
6. A test case processing apparatus, comprising:
the test point unit is used for acquiring a plurality of test points according to different test scenes of the test service;
the data matrix unit is used for constructing a matrix template based on the plurality of test points and correspondingly inputting the obtained test data into the matrix template to obtain a data matrix;
and the test unit is used for polling the test cases in the data matrix and executing the test according to preset test logic.
7. The apparatus of claim 6, wherein the test point unit comprises:
the test point splitting module is used for combing each test scene in the test service and splitting the initial test point corresponding to each test scene;
and the test point processing module is used for summarizing and de-duplicating the initial test points to obtain a plurality of test points.
8. The apparatus of claim 6, wherein the data matrix unit comprises:
the matrix template module is used for recording the test points into an EXCEL form in a form of a header and constructing the matrix template;
the data import module is used for correspondingly inputting the test parameters in each piece of user data and the test points in the matrix template to generate a data matrix; the test data comprises a plurality of pieces of user data, and each piece of user data at least comprises one test parameter.
9. The apparatus of any of claims 6-8, wherein the test unit comprises:
the data extraction module is used for extracting each piece of user data from a data matrix and correspondingly obtaining a plurality of test cases;
the test module is used for sequentially extracting the test cases and obtaining test results corresponding to the test cases one by one after testing according to preset test logic;
and the result output module is used for summarizing the test result statistics and outputting a test report.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of the claims 1 to 5.
CN201910961494.2A 2019-10-11 2019-10-11 Test case processing method and device Pending CN110837464A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910961494.2A CN110837464A (en) 2019-10-11 2019-10-11 Test case processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910961494.2A CN110837464A (en) 2019-10-11 2019-10-11 Test case processing method and device

Publications (1)

Publication Number Publication Date
CN110837464A true CN110837464A (en) 2020-02-25

Family

ID=69575283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910961494.2A Pending CN110837464A (en) 2019-10-11 2019-10-11 Test case processing method and device

Country Status (1)

Country Link
CN (1) CN110837464A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328493A (en) * 2020-11-25 2021-02-05 武汉光庭信息技术股份有限公司 Matrix type test case generation method and system, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346278A (en) * 2014-09-28 2015-02-11 上海新炬网络技术有限公司 Matrix-model-based software testing method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346278A (en) * 2014-09-28 2015-02-11 上海新炬网络技术有限公司 Matrix-model-based software testing method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328493A (en) * 2020-11-25 2021-02-05 武汉光庭信息技术股份有限公司 Matrix type test case generation method and system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106776253A (en) A kind of interface interim card monitoring method and device
CN104268079B (en) A kind of method and system of POS Application testings
CN110910982A (en) Self-coding model training method, device, equipment and storage medium
CN109508298B (en) Graphical script test method and system
CN111679979B (en) Destructive testing method and device
CN108536598B (en) Skill logic testing method and device, testing terminal and storage medium
CN110659870A (en) Business audit test method, device, equipment and storage medium
CN110557299A (en) network transmission function batch test method, system, terminal and storage medium
CN110569159A (en) Baffle generation method, device, equipment and computer storage medium
CN112612813A (en) Test data generation method and device
CN108304322B (en) Pressure testing method and terminal equipment
CN116629988A (en) Bid data processing method and device based on blockchain
CN111679984A (en) Performance analysis method and device
CN111708712A (en) User behavior test case generation method, flow playback method and electronic equipment
CN111352846A (en) Test system number making method, device, equipment and storage medium
CN109101414B (en) Massive UI test generation method and device based on buried point data
CN110837464A (en) Test case processing method and device
CN111352832B (en) Method and device for automatically testing page
CN110737900B (en) Webpage function testing method and device, server and computer readable storage medium
CN117493188A (en) Interface testing method and device, electronic equipment and storage medium
CN112084108A (en) Test script generation method and device and related components
CN113806231A (en) Code coverage rate analysis method, device, equipment and medium
CN114201404A (en) Pressure test system and method of block chain network
CN113849484A (en) Big data component upgrading method and device, electronic equipment and storage medium
CN109902004B (en) Method and device for testing application program link channel

Legal Events

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

Application publication date: 20200225

RJ01 Rejection of invention patent application after publication