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

Method, equipment and system for iOS-end Mock data, and storage medium

A data and relational table technology, applied in digital transmission systems, transmission systems, data exchange networks, etc., can solve the problems of low Mock data efficiency, low client development efficiency, etc., to ensure development work, avoid memory occupation, and ensure smoothness Effect

Active Publication Date: 2018-02-02
WUHAN DOUYU NETWORK TECH CO LTD
View PDF11 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Most of the existing Mock data solutions use the OHHTTPStubs library to do http data Mock. A mapping table needs to be manually created in advance to map the name of the request interface and the name of the data file to be mocked. This method requires the name of the mapping request interface to be in Before compiling, there must be a mapping relationship in the relationship mapping table of the Mock class, so the Mock data efficiency is low, which eventually leads to low client development efficiency

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
  • Method, equipment and system for iOS-end Mock data, and storage medium
  • Method, equipment and system for iOS-end Mock data, and storage medium
  • Method, equipment and system for iOS-end Mock data, and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0049] The network output simulation component is imported by pod. The specific usage method is: to import the network output simulation component in the iOS project by pod, only need to call the setup method of the network output simulation component in the appdelegate, and in the Mock interface At any time, use the following implementation method to call the Mock file that exists in the main project; the implementation method is as follows:

[0050] setURLString:(NSString*)url

[0051] JsonName:(NSString*)json

[0052] speedModel: (DYMockDownloadSpeed) speedModel.

[0053] In addition, customize the Mock network speed enumeration value. The network speed enumeration value is set by the staff to the corresponding interface according to the interface and network speed mapping relationship. According to this enumeration value, use the switch syntax to select different Mock data networks. parameters, call the requestTime method of the OHHTTPStubs class to simulate normal netwo...

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 method, equipment and system for iOS-end Mock data, and a storage medium, and relates to the technical field of Mock data. The method comprises the following steps: establishing a network output simulation component: using a dispatch_once function to define the network output simulation component, so that after the first creation of the network output simulation component, the subsequent creation calls a first creation result; establishing relationship tables: lazy loading a first relationship table and a second relationship table, wherein the first relationship tablesaves a corresponding relationship between an interface name and a Mock file name, and the second relationship table saves a corresponding relationship between the interface name and a custom Mock network speed value; and intercepting a network request: acquiring information of a network request interface by the network output simulation component, and acquiring a dynamic setting network interface, the Mock file name and a Mock network parameter according to the first relationship table and the second relationship table. The method for the iOS-end Mock data provided by the invention achievesan accurate and efficient Mock data effect, and can simulate the network environment of the Mock data, so as to obtain a better work effect.

Description

technical field [0001] The invention relates to the technical field of Mock data, in particular to a method, a storage medium, a device and a system for mocking data on an iOS terminal. Background technique [0002] At present, in iOS client development, since the backend and client are developed at the same time, the development process of the client often needs to wait for the completion of the backend interface before the development of relevant client logic can be carried out, resulting in low client development efficiency. It is necessary to mock the back-end data to improve client development efficiency and shorten working hours. [0003] Unit testing is the lowest level of testing activity to be performed during software development, during which an independent unit of software is tested in isolation from the rest of the program, and during unit testing, the Some objects that are not easy to construct or obtain can be tested by creating a virtual object. This virtual...

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 Applications(China)
IPC IPC(8): H04L12/24H04L12/26
CPCH04L41/145H04L43/0817
Inventor 苏正权张文明陈少杰
Owner WUHAN DOUYU NETWORK TECH CO LTD
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