Batch unit testing method, device, readable storage medium and equipment

A unit test and batch technology, which is applied in the direction of program control device, software test/debugging, error detection/correction, etc. It can solve problems such as uninitialized member objects, interruption of normal operation of unit test objects, and slow test speed

Active Publication Date: 2020-07-10
WUHAN DOUYU NETWORK TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Among them, for JVM Test, it is generally implemented by running a test pile (Test Case) written in pure Java code without relying on other components. Since the code runs on the JVM virtual machine, the test speed is faster; for Instrumentation Test , because this type of test needs to rely on the components provided by the Android system, it needs to be deployed and run on a real machine or an emulator, and needs to be precompiled, so the test speed is slow
[0004] Regardless of whether the above-mentioned JVM Test or Instrumentation Test is used, when performing deserialization and unit testing for member variable references, if there is a deserialization exception (DeserializeException) during deserialization, or there is a The variable is empty (NullPointer Exception), indicating that the member object has not been initialized and is forcibly referenced, and the above two exceptions will interrupt the normal operation of subsequent unit test objects under the assertion mechanism

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
  • Batch unit testing method, device, readable storage medium and equipment
  • Batch unit testing method, device, readable storage medium and equipment
  • Batch unit testing method, device, readable storage medium and equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0043] The embodiment of the present application provides a batch unit testing method, the method can be applied in the Android system, and the coding language of the method can be Java, such as figure 1 As shown, the method includes:

[0044] Step 101: Construct a plurality of strongly typed data set containers corresponding to multiple preset priority levels one by one, wherein each priority level corresponds to a test object ref...

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 relates to the technical field of software tests, and in particular relates to a batch unit test method, a batch unit test device, a readable storage medium and equipment. The method comprises the steps of building a plurality of strong type data containers corresponding to a plurality of preset priority levels one by one, wherein each priority level is corresponding to a test objectreference probability interval, and a corresponding relation between the priority levels and the test object reference probability intervals is that the priority levels from high to low is sequentially corresponding to the reference probabilities, in an ascending order, of the test object reference probability intervals; storing a plurality of unit test objects into the plurality of strong type data containers based on the corresponding relation; and performing weak reference treatment on the plurality of unit test objects based on an aspect oriented programming method during a process of running the plurality of unit test objects. According to the method provided by the invention, abnormity of an assertion mechanism due to the fact that strong reference is uninitialized is effectively avoided, and even test abnormity occurs in the single unit test object, subsequent running of the unit test object is not influenced.

Description

technical field [0001] The invention relates to the technical field of software testing, in particular to a batch unit testing method, device, readable storage medium and equipment. Background technique [0002] In the process of application program development, unit testing is an important and necessary link before the program is formally submitted to testers for large-scale functional testing. Unit testing refers to logical checking and verification of the smallest testable unit in a program, where a unit is the smallest specified functional module to be tested. [0003] In the Android (Android) application development process, unit testing is divided into: Java virtual machine unit testing (JVMTest) and equipment testing (Instrumentation Test). Among them, for JVM Test, it is generally implemented by running a test pile (Test Case) written in pure Java code without relying on other components. Since the code runs on the JVM virtual machine, the test speed is faster; for ...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F11/36G06F9/448
CPCG06F11/3684G06F11/3688
Inventor 尹成陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products