Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Software testing method and system

A software testing method and software testing technology, applied in the software field, can solve problems such as complex expected results, low efficiency, and single assertion function

Inactive Publication Date: 2017-04-26
GUANGZHOU PINWEI SOFTWARE
View PDF10 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the existing software testing, the methods provided by the testing framework of automated testing, such as Junit, TestNg, Selenium, etc., provide basic automated testing basic APIs, but their assertion functions are single, and they can only compare simple data. Yes, such as comparing the equality of simple data types, the data size of numeric types, etc.
For large-scale projects, the expected results of test case running are complex. If simple data types are used for assertion, testers need to parse the expected running results into simple data types for comparison. If the running results are complicated, they need to be parsed line by line Writing assert statements, which is inefficient

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Software testing method and system
  • Software testing method and system
  • Software testing method and system

Examples

Experimental program
Comparison scheme
Effect test

no. 1 example

[0063] Further, refer to figure 2 , based on the first embodiment of the software testing method of the present invention, in the second embodiment of the software testing method of the present invention, the acquisition of the data from the specified data source to run the test case, and obtaining the running result includes:

[0064] Step S11, obtaining form data of a preset form;

[0065] Step S12, using the table data to run the test case, and obtain the running result.

[0066] In the prior art, the incoming data of the test case is hard-coded or an external data source that cannot be edited and has poor reading effect is used to drive the test. By using tables with good visualization effects to set parameters, the efficiency of creating and modifying test data is improved.

[0067] Specifically: in the test project, create an xls (Excel standard file) file through Excel, use certain rules to save after adding data in the xls file, write the address of the xls file har...

no. 2 example

[0068] refer to image 3 , based on the second embodiment of the software testing method of the present invention, in the third embodiment of the software testing method of the present invention, said obtaining the table data of the preset table includes:

[0069] Step S111 , using annotations in the code of the test method to specify the location of the preset table.

[0070] Step S112, loading the preset table according to the location, and parsing the preset table to obtain the table data.

[0071] In this embodiment, by using the annotation method, it is only necessary to insert data annotations that can be automatically injected into the preset table before the test method, so that when the tester is using it, a simple line of code is needed to complete the data loading and injection operations, improving the efficiency of testing.

[0072] Specifically: write a custom annotation, the execution location "Target" is "METHOD", that is, it is only executed in the method, t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a software testing method. The software testing method comprises the following steps of: obtaining a data running testing case of the specified data source, and obtaining the running result; judging whether the type of the preset value is a simple data type or not; and judging whether the running result conforms to the preset condition or not by means of the common assertion mode if the type of the preset value is a simple data type; on the contrary, judging whether the running result conforms to the preset condition or not by means of the special assertion mode if the type of the preset value is not a simple data type. The invention also discloses a software testing system. According to the invention, the assertion mode of the data type is selected according to the data type of the preset value, therefore, the amount of the code writing in a specific test is reduced, and the test efficiency is improved.

Description

technical field [0001] The invention relates to the field of software, in particular to a software testing method and system. Background technique [0002] In the existing software testing, the methods provided by the testing framework of automated testing, such as Junit, TestNg, Selenium, etc., provide basic automated testing basic APIs, but their assertion functions are single, and they can only compare simple data. Yes, such as comparing the equality of simple data types, the data size of numeric types, etc. For large-scale projects, the expected results of test case running are complex. If simple data types are used for assertion, testers need to parse the expected running results into simple data types for comparison. If the running results are complicated, they need to be parsed line by line Writing assert statements is inefficient. Contents of the invention [0003] The main purpose of the present invention is to provide a software testing method and system, aimin...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F11/36
CPCG06F11/3688
Inventor 马家麒
Owner GUANGZHOU PINWEI SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products