CN111752837A - View base system test method, device, equipment and storage medium - Google Patents

View base system test method, device, equipment and storage medium Download PDF

Info

Publication number
CN111752837A
CN111752837A CN202010590991.9A CN202010590991A CN111752837A CN 111752837 A CN111752837 A CN 111752837A CN 202010590991 A CN202010590991 A CN 202010590991A CN 111752837 A CN111752837 A CN 111752837A
Authority
CN
China
Prior art keywords
view library
mock
view
picture data
unit
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.)
Granted
Application number
CN202010590991.9A
Other languages
Chinese (zh)
Other versions
CN111752837B (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010590991.9A priority Critical patent/CN111752837B/en
Publication of CN111752837A publication Critical patent/CN111752837A/en
Application granted granted Critical
Publication of CN111752837B publication Critical patent/CN111752837B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3688Test management for test execution, e.g. scheduling of test suites
    • 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/3676Test management for coverage analysis

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)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a method, a device, equipment and a storage medium for testing a view library system, and relates to the technical field of cloud computing and view library testing. One embodiment of the method comprises: creating a transmitter view library MOCK system and a subscriber view library MOCK system; calling a subscriber view library MOCK system to subscribe a transmitter view library MOCK system; calling a transmitter view library MOCK system to upload picture data to a view library system; responding to the successful receiving of the picture data by the view library system, storing the picture data into the view library system, and triggering the MCOK system of the subscriber view library to receive the picture data forwarded by the view library system; performance data for the view library system is determined based on the ability of the view library system to receive and forward picture data. This embodiment shortens the project test period.

Description

View base system test method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to the technical field of cloud computing and view library testing, and particularly relates to a method, a device, equipment and a storage medium for testing a view library system.
Background
In the view library system, the system level function test is realized by integrating a lower-level view library system, an internet acquisition device, a higher-level view library system and an algorithm engine identification application system. Module level testing can only ensure that the internal functions of the view library system are available, and cannot cover the whole process. In the performance level, the capability of receiving the picture file concurrently and the capability of transmitting the picture file in real time are important indexes for measuring the performance of the view library system.
At present, for the test work of the view library system, the common problem lies in the dependence on the upstream and downstream systems (the lower level view library system, the upper level view library system, the algorithm engine identification application system). The system joint debugging can be carried out only in the client field environment and depends on the technical support of third-party system developers.
Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for testing a view library system.
In a first aspect, an embodiment of the present application provides a method for testing a view library system, including: creating a transmitter view library MOCK system and a subscriber view library MOCK system; calling a subscriber view library MOCK system to subscribe a transmitter view library MOCK system; calling a transmitter view library MOCK system to upload picture data to a view library system; responding to the successful receiving of the picture data by the view library system, storing the picture data into the view library system, and triggering the MCOK system of the subscriber view library to receive the picture data forwarded by the view library system; performance data for the view library system is determined based on the ability of the view library system to receive and forward picture data.
In a second aspect, an embodiment of the present application provides a view library system testing apparatus, including: a creation module configured to create a transmitter view library MOCK system and a subscriber view library MOCK system; a subscription module configured to invoke a subscriber view library MOCK system to subscribe to a transmitter view library MOCK system; the uploading module is configured to call a transmitter view library MOCK system to upload the picture data to the view library system; a forwarding module configured to store the picture data to the view base system in response to the view base system successfully receiving the picture data, and trigger the subscriber view base MCOK system to receive the picture data forwarded by the view base system; a determination module configured to determine performance data for the view library system based on the ability of the view library system to receive and forward picture data.
In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in any one of the implementations of the first aspect.
In a fourth aspect, embodiments of the present application propose a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in any one of the implementations of the first aspect.
According to the method, the device, the equipment and the storage medium for testing the view library system, firstly, a transmitter view library MOCK system and a subscriber view library MOCK system are established; then calling a subscriber view library MOCK system to subscribe a transmitter view library MOCK system, and calling the transmitter view library MOCK system to upload the picture data to the view library system; then responding to the successful receiving of the picture data by the view library system, storing the picture data into the view library system, and triggering the MCOK system of the subscriber view library to receive the picture data forwarded by the view library system; and finally, determining the performance data of the view library system based on the capability of the view library system for receiving and forwarding the picture data. The method realizes the test of the view library system by establishing the MOCK system to simulate the system functions of a transmitter and a subscriber, thereby eliminating the dependence of the view library system on an upstream system and a downstream system, exposing high-risk risks in advance and shortening the test period of a project.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings. The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a view library system architecture diagram;
FIG. 2 is a flow diagram of one embodiment of a view library system testing method according to the present application;
FIG. 3 is a flow diagram of yet another embodiment of a view library system testing method according to the present application;
FIG. 4 is a flow diagram of another embodiment of a view library system testing method according to the present application;
FIG. 5 is a unit interaction diagram of a view library system test method;
FIG. 6 is a schematic block diagram of one embodiment of a view library system test apparatus according to the present application;
fig. 7 is a block diagram of an electronic device for implementing the view library system testing method according to the embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
FIG. 1 shows a view library system architecture diagram. As shown in FIG. 1, the view library system architecture includes a transmitter 101, a view library system 102, and a subscriber 103. Wherein the transmitter 101 generally includes two roles, namely a lower view gallery system 1011 and an internet capture device 1012. The view library system 102 may include a presentation layer 1021, a logical layer 1022, and a data layer 1023. The presentation layer 1021 may provide functions including, but not limited to, data query, account management, device management, log management, subscription rules, and system management. Logical layer 1022 can provide functions including, but not limited to, registration, deregistration, keep-alive, data upload, quality filtering, subscription rules, flow control, face deduplication, subscription, and notification. The data layer 1023 may include, but is not limited to, mysql, redis, and mongdb databases. Subscribers 103 may include upper level view library system 1031 and various algorithm engine identification application systems. The algorithm engine recognition application may include, but is not limited to, a vehicle recognition application 1032, a human recognition application 1033, a face recognition application 1034, and the like. The transmitter 101 may upload the picture stream to the view library system 102 to test the concurrent reception capabilities of the view library system 102. The view library system 102 may forward the subscription picture to the subscriber 103 to test the real-time forwarding capability of the view library system 102.
For the test work of the view library system, the transmitter 101 and the subscriber 103 in the prior art are on the client side, so that the system joint debugging needs to be performed in the client field environment. In the technical scheme provided by the embodiment of the application, the transmitter 101 and the subscriber 103 are simulated by creating the MOCK system, and the visual library system test can be realized without going to a client field environment.
With continued reference to FIG. 2, a flow 200 of one embodiment of a view library system testing method according to the present application is shown. The method for testing the view library system comprises the following steps:
step 201, a transmitter view library MOCK system and a subscriber view library MOCK system are created.
In this embodiment, the executive body of the view library system test method may create a transmitter view library MOCK system and a subscriber attempt library MOCK system. Wherein, the subscriber tries the MOCK system called the upper view library MOCK system.
The view library system is a library and is used for storing picture data; the database system is also a data analysis center, so that the data in the database can be quickly analyzed; the view library system is also a composite battle center, and can integrate and display the desired information. The view library system has three main service cores of data collection, data analysis and data battle. In general, the view library refers to a public security video image information database system, which provides key clue services for case detection by using composite operations of data, and precisely locates four elements in clues: time, place, person, event.
The MOCK system is a virtual system, and can be a substitute for a real system which has a dependency relationship with a view library system. The MOCK system can accept the system call of the view library and execute the same operation as the real system. Since the test work of the view library system depends on the transmitter view library system and the subscriber view library system, it is possible to create the transmitter view library MOCK system instead of the transmitter view library system and create the subscriber view library MOCK system instead of the subscriber view library system. The transmitter view library MOCK system and the subscriber view library MOCK system can cover all external cascade interface functions of the view library system, and service capabilities provided by different systems can be called according to specific requirements during testing to finish automatic testing of the view library system.
In practical applications, the transmitter may include different types of roles, and thus the transmitter view library MOCK system may include at least one type of MOCK system. For example, the transmitter view library MOCK system may include at least one of an internet collection device MOCK system and a lower level view library MOCK system.
Step 202, calling the subscriber view library MOCK system to subscribe the transmitter view library MOCK system.
In this embodiment, the execution subject may invoke the subscriber view library MOCK system to subscribe to the transmitter view library MOCK system. Generally, in the case that the subscriber view library MOCK system subscribes to the transmitter view library MOCK system, the picture data in the transmitter view library MOCK system can be transmitted to the subscriber view library MOCK system through the view library system.
Step 203, calling the transport view library MOCK system to upload the picture data to the view library system.
In this embodiment, the execution subject may invoke the transmitter view library MOCK system to upload the picture data to the view library system. The transmitter view library MOCK system can store or generate a large amount of picture data. The picture data may include, but is not limited to, a human face picture, a human body picture, a vehicle picture, and the like. Also, the size and type of these picture data may be different. The type of the picture data may include, but is not limited to, JPEG, BMP, PNG, and the like. The size of the picture data may include, but is not limited to, 30K, 50K, etc.
And step 204, responding to the successful receiving of the picture data by the view library system, storing the picture data into the view library system, and triggering the MCOK system of the subscriber view library to receive the picture data forwarded by the view library system.
In this embodiment, the execution subject may verify whether the view library system successfully receives the picture data from the sender view library MOCK system. Under the condition that the view library system successfully receives the picture data, the execution main body can store the picture data into the view library system to realize database dropping. In addition, the view library system may forward the picture data to the subscriber view library MCOK system, and at this time, the execution subject may trigger the subscriber view library MCOK system to receive the picture data.
Optionally, in a case that the view library system successfully receives the picture data, the executing main body generally performs AI (Artificial Intelligence) capability processing on the picture data, and puts the processed picture data into a library. Then, the executing body may also perform front-end data retrieval on the picture data in the view library system, and trigger the subscriber view library MCOK system to receive the picture data forwarded by the view library system in the case of normal retrieval.
Step 205, determining performance data of the view library system based on the ability of the view library system to receive and forward the picture data.
In this embodiment, the execution subject may determine the receiving capability of the view library system based on the receiving condition of the view library system for the picture data from the sender view library MOCK system. Similarly, the executing body may further determine the forwarding capability of the view library system based on a forwarding condition that the view library system forwards the picture data to the MCOK system of the subscriber view library. Finally, based on the receiving and forwarding capabilities of the view library system, performance data of the view library system may be determined. Generally, the stronger the receiving capability and the stronger the forwarding capability of the view library system, the stronger the performance of the view library system.
The method for testing the view library system comprises the steps of firstly creating a transmitter view library MOCK system and a subscriber view library MOCK system; then calling a subscriber view library MOCK system to subscribe a transmitter view library MOCK system, and calling the transmitter view library MOCK system to upload the picture data to the view library system; then responding to the successful receiving of the picture data by the view library system, storing the picture data into the view library system, and triggering the MCOK system of the subscriber view library to receive the picture data forwarded by the view library system; and finally, determining the performance data of the view library system based on the capability of the view library system for receiving and forwarding the picture data. The automatic testing framework based on the MOCK is provided, and the testing of the view library system is realized by establishing the system function of the MOCK system for simulating a transmitter and a subscriber, so that the dependence of the view library system on an upstream system and a downstream system is eliminated, high-risk risks are exposed in advance, and the project testing period is shortened.
And, a transmitter view library MOCK system and a subscriber view library MOCK system are created, and the view library system test is divided into three parts: creating a transmitter view library MOCK system, transmitting picture data to a view library system, and testing the receiving capability of the view library system; the inside of the view library system performs quality processing on the picture data and stores the picture data; the subscriber view library MOCK system subscribes and receives the picture data and tests the forwarding capacity of the view library system. The three parts can be flexibly combined to test the functions of the view library system.
With further reference to FIG. 3, a flow 300 of yet another embodiment of a view library system testing method according to the present application is shown.
In this embodiment, the transmitter view library MOCK system may be an internet acquisition device MOCK system. The internet acquisition equipment MOCK system can comprise an acquisition equipment generator, an identity authentication unit, an equipment registration unit, a data generator, a data uploading unit, an equipment keep-alive unit and an equipment logout unit. The subscriber view library MCOK system is also called a superior view library MOCK system and can comprise an initiating subscription unit and a data receiving unit.
In this embodiment, the method for testing the view library system includes the following steps:
step 301, calling a collection device generator to generate collection device codes and attribute information of a preset number of collection devices.
In this embodiment, the execution main body of the view library system test method may call a collection device generator of the internet collection device MOCK system, and generate collection device codes and attribute information of a preset number of collection devices according to rules. Wherein, one acquisition device corresponds to one acquisition device code. The attribute information may include, but is not limited to, name, latitude and longitude information, and other non-core bayonet information, etc.
Generally, when testing multi-concurrent access, a collection device generator is called to generate a plurality of collection device codes, and multi-path front-end snapshot camera simulation is achieved. The front-end snapshot cameras do not need to be purchased in batches, and the equipment cost is reduced.
Step 302, calling a device management module of the view library system to register the acquisition device code to the view library system and binding the account of the transmitter.
In this embodiment, the executing entity may invoke a device management module of the view library system to register the collection device code in the view library system and bind the account of the transmitter. Where each transmitter has a unique account number. The account number may include an account and a token.
Step 303, the token in the transmitter account is transmitted back to the identity authentication unit, and the identity authentication unit is called to adopt an HTTP digest access authentication mode, to extend and add the user identifier in the HTTP request header field, and to carry the acquisition device code to perform identity authentication.
In this embodiment, the execution main body may transmit the token in the transmitter account back to an identity authentication unit of the MOCK system of the internet acquisition device, and call the identity authentication unit to use an HTTP digest access authentication method, to extend and add the user identifier in an HTTP request header field, and perform identity authentication with the acquisition device code.
And step 304, calling an equipment registration unit to register the acquisition equipment code passing the identity authentication to the view library system.
In this embodiment, the execution subject may call an equipment registration unit of the internet collection equipment MOCK system to register the collection equipment code passing the identity authentication to the view library system. And the acquisition equipment corresponding to the acquisition equipment code passing the identity authentication is simulated acquisition equipment.
And 305, calling a device keep-alive unit to periodically keep the acquisition device alive.
In this embodiment, the execution main body may call a device keep-alive unit of the internet acquisition device MOCK system to periodically keep the acquisition device alive, so as to ensure that the acquisition device is always kept alive during the test process of the view library system. The keep-alive time interval can be set by default or according to requirements. Typically, the keep-alive interval can be set to 90 seconds.
Step 306, a subscriber account and subscription rules are created in the view library system.
In this embodiment, the executing entity may create a subscriber account and a subscription rule in the view library system. Where each subscriber has a unique account number. The account number may include an account and a token. Subscription rules may be used to specify a range of collection devices to which a subscriber may subscribe. The range of subscribing harvesting devices typically includes emulated harvesting devices.
Step 307, the subscription initiating unit is invoked to subscribe the acquisition device.
In this embodiment, the executing entity may invoke an initiating subscription unit of the subscriber view library MOCK system to subscribe to the acquisition device. The subscription initiating unit may subscribe to one acquisition device, or may subscribe to multiple acquisition devices, that is, an acquisition device group.
And 308, calling the data generator to generate picture data, and calling the data uploading unit to upload the picture data to the view library system.
In this embodiment, the execution subject may invoke the data generator of the transmitter view library MOCK system to generate the picture data, and invoke the data uploading unit of the transmitter view library MOCK system to upload the picture data to the view library system. Wherein the data generator can construct a large number of different types of picture data of different sizes.
Step 309, in response to the view library system successfully receiving the picture data, storing the picture data in the view library system, and triggering the data receiving unit to receive the picture data forwarded by the view library system.
In this embodiment, the execution subject may verify whether the view library system successfully receives the picture data from the sender view library MOCK system. Under the condition that the view library system successfully receives the picture data, the execution main body can store the picture data into the view library system to realize database dropping. In addition, the view library system may forward the picture data to the subscriber view library MCOK system, and at this time, the execution main body may further trigger the data receiving unit of the subscriber view library MCOK system to receive the picture data.
At step 310, performance data for the view library system is determined based on the ability of the view library system to receive and forward picture data.
In this embodiment, the execution subject may determine the receiving capability of the view library system based on the receiving condition of the view library system for the picture data from the sender view library MOCK system. Similarly, the executing body may further determine the forwarding capability of the view library system based on a forwarding condition that the view library system forwards the picture data to the MCOK system of the subscriber view library. Finally, based on the receiving and forwarding capabilities of the view library system, performance data of the view library system may be determined. Generally, the stronger the receiving capability and the stronger the forwarding capability of the view library system, the stronger the performance of the view library system.
Step 311, a device logout unit is invoked to logout the collection device.
In this embodiment, after the test of the view library system is finished, the execution main body may invoke a device logout unit of the transmitter view library MOCK system to logout the acquisition device, and then end the occupation of the memory by the simulated acquisition device. The logged-out acquisition equipment cannot upload the picture data again, and a data receiving unit of the subscriber view library MOCK system cannot receive the picture data from the acquisition equipment.
As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the process 300 of the view library system testing method in this embodiment highlights that the internet collection device MOCK system is used as the transmitter view library MOCK system to implement the view library system testing. The internet acquisition equipment MOCK system can generate an acquisition equipment code to realize front-end snapshot camera simulation. The front-end snapshot cameras do not need to be purchased in batches, and the equipment cost is reduced. When a plurality of acquisition devices are simulated, the test on the concurrent receiving capability of the view library system can also be realized.
With further reference to FIG. 4, a flow 400 of another embodiment of a view library system testing method according to the present application is shown.
In the present embodiment, the transmitter view library MOCK system may be a lower level view library MOCK system. The lower view library MOCK system may include a subscription receiving unit and a subscription notification unit. The subscriber view library MCOK system is also called a superior view library MOCK system and can comprise an initiating subscription unit and a data receiving unit.
In this embodiment, the method for testing the view library system includes the following steps:
step 401, invoke the subscription receiving unit to initiate platform-level subscription.
In this embodiment, the executing entity of the view library system testing method may invoke the subscription receiving unit of the lower view library MOCK system to initiate platform-level subscription. The subscription receiving unit may initiate subscription of the lower view library MOCK system.
Step 402, calling the subscription initiating unit to subscribe the MOCK system of the lower view library.
In this embodiment, the execution subject may invoke an initiating subscription unit of the subscriber view library MOCK system to subscribe to the lower view library MOCK system.
And step 403, invoking a subscription notification unit to upload the picture data to the view library system.
In this embodiment, the execution subject may call a subscription notification unit of the lower view library MOCK system to upload the picture data to the view library system. The lower view library MOCK system can store a large amount of picture data of different types and sizes.
In response to the successful reception of the picture data by the view library system, the picture data is stored in the view library system, and the data receiving unit is triggered to receive the picture data forwarded by the view library system, step 404.
In this embodiment, the execution subject may verify whether the view library system successfully receives the picture data from the lower view library MOCK system. Under the condition that the view library system successfully receives the picture data, the execution main body can store the picture data into the view library system to realize database dropping. In addition, the view library system may forward the picture data to the subscriber view library MCOK system, and at this time, the execution main body may further trigger the data receiving unit of the subscriber view library MCOK system to receive the picture data.
Step 405, determining performance data for the view library system based on the ability of the view library system to receive and forward picture data.
In this embodiment, the execution subject may determine the receiving capability of the view library system based on the receiving condition of the view library system for the picture data from the lower view library MOCK system. Similarly, the executing body may further determine the forwarding capability of the view library system based on a forwarding condition that the view library system forwards the picture data to the MCOK system of the subscriber view library. Finally, based on the receiving and forwarding capabilities of the view library system, performance data of the view library system may be determined. Generally, the stronger the receiving capability and the stronger the forwarding capability of the view library system, the stronger the performance of the view library system.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the view library system testing method in this embodiment highlights that the lower level view library MOCK system is used as the transmitter view library MOCK system to implement the view library system testing. The MOCK system of the lower view library stores a large amount of picture data of different types and sizes, and the picture data can be directly transmitted to the view library system to test the receiving capacity of the view library system, so that the test speed is improved.
With further reference to FIG. 5, a unit interaction diagram of a view library system testing method is shown.
Here, the view library system 501 may include a presentation layer 5011, a logic layer 5012, and a data layer 5013. The presentation layer 5011 may provide functions including, but not limited to, data query, account management, device management, log management, subscription rules, and system management. Logical layer 5012 can provide functions including, but not limited to, registration, deregistration, keep-alive, AI capability, subscription rules, flow control, and notification. AI capabilities may include quality control and face deduplication. The data layer 5013 may include, but is not limited to, mysql, redis, and mongdb databases.
An internet collection device MOCK system 502, a lower view library MOCK system 503 and an upper view library MCOK system 504 are created. The internet collection device MOCK system 502 may include a collection device generator 5021, an identity authentication unit 5022, a device registration unit 5023, a data generator 5024, a data uploading unit 5025, a device keep-alive unit 5026, and a device logout unit 5027. The lower view library MOCK system 503 may include a subscription receiving unit 5031 and a subscription notification unit 5032. The lower level view library MCOK system 504 may include an originating subscription unit 5041 and a data receiving unit 5042.
Wherein, the component interaction process is as follows:
1. the acquisition equipment generator 5021 of the internet acquisition equipment MOCK system 502 transmits apeid (acquisition equipment code) to the equipment management module of the view library system 501;
2. an account management module of the view library system 501 transmits tokens in the transmitter account back to an identity authentication unit 5022 of the internet acquisition device MOCK system 502;
3. the device registration unit 5023 of the internet collection device MOCK system 502 transmits the apeid to the registration module of the view library system 501;
4. the device keep-alive unit 5026 of the internet acquisition device MOCK system 502 transmits apeid to the keep-alive module of the view library system 501;
5. the data generator 5024 of the internet acquisition device MOCK system 502 transmits the picture data to the data uploading unit 5025 of the internet acquisition device MOCK system 502;
6. the data uploading unit 5025 of the internet acquisition device MOCK system 502 transmits the picture data to the AI capability module of the view library system 501;
7. the notification module of the view library system 501 transmits the picture data to the data receiving unit 5042 of the upper view library MOCK system 504;
8. the subscription initiating unit 5041 of the view library MOCK system 504 transmits the subscription message to the subscription rule module of the view library system 501;
the subscription module of the 9-view library system 501 transmits the subscription message to the subscription receiving unit 5031 of the lower-level view library MOCK system 503.
With further reference to fig. 6, as an implementation of the method shown in the above-mentioned figures, the present application provides an embodiment of a view library system testing apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which can be applied to various electronic devices.
As shown in fig. 6, the view library system test apparatus 600 of the present embodiment may include: a creation module 601, a subscription module 602, an upload module 603, a forwarding module 604, and a determination module 605. The creating module 601 is configured to create a transmitter view library MOCK system and a subscriber view library MOCK system; a subscription module 602 configured to invoke a subscriber view library MOCK system to subscribe to a transmitter view library MOCK system; an upload module 603 configured to invoke the transmitter view library MOCK system to upload the picture data to the view library system; a forwarding module 604 configured to store the picture data to the view base system in response to the view base system successfully receiving the picture data, and trigger the subscriber view base MCOK system to receive the picture data forwarded by the view base system; a determination module 605 configured to determine performance data for the view library system based on the ability of the view library system to receive and forward picture data.
In the present embodiment, in the view library system test apparatus 600: the specific processes and the technical effects thereof of the creating module 601, the subscribing module 602, the uploading module 603, the forwarding module 604 and the determining module 605 can refer to the related descriptions of step 201 and step 205 in the corresponding embodiment of fig. 2, which are not described herein again.
In some optional implementation manners of this embodiment, the transmitter view library MOCK system is an internet acquisition device MOCK system, and the internet acquisition device MOCK system includes an acquisition device generator, an identity authentication unit, a device registration unit, a data generator, and a data uploading unit; and the creation module 601 is further configured to: calling an acquisition equipment generator to generate acquisition equipment codes and attribute information of a preset number of acquisition equipment; calling an equipment management module of the view library system to register the acquisition equipment code to the view library system and bind a transmitter account; returning a token in the transmitter account to an identity authentication unit, calling the identity authentication unit to adopt an HTTP abstract access authentication mode, expanding and increasing a user identifier in an HTTP request header field, and carrying an acquisition equipment code to perform identity authentication; calling an equipment registration unit to register the acquisition equipment codes passing the identity authentication to a view library system; creating a subscriber account and a subscription rule in a view library system, wherein the subscription rule is used for specifying a collection equipment range which can be subscribed by a subscriber; and the upload module 603 is further configured to: and calling the data generator to generate picture data, and calling the data uploading unit to upload the picture data to the view library system.
In some optional implementation manners of this embodiment, the internet acquisition device MOCK system further includes a device keep-alive unit; and the view library system test apparatus 600 further includes: and the keep-alive module (not shown in the figure) is configured to call the device keep-alive unit to periodically keep the acquisition device alive.
In some optional implementation manners of this embodiment, the internet acquisition device MOCK system further includes a device logout unit; and the view library system test apparatus 600 further includes: and a log-out module (not shown in the figure) configured to call the device log-out unit to log out the acquisition device.
In some optional implementations of this embodiment, the transmitter view library MOCK system is a lower view library MOCK system, and the lower view library MOCK system includes a subscription receiving unit and a subscription notification unit; and the creation module 601 is further configured to: calling a subscription receiving unit to initiate platform-level subscription; and the upload module 603 is further configured to: and calling a subscription notification unit to upload the picture data to the view library system.
In some optional implementations of this embodiment, the subscriber view library MCOK system includes an initiating subscription unit and a data receiving unit; and the subscription module 602 is further configured to: calling an initiating subscription unit to subscribe the acquisition equipment or a lower view library MOCK system; the forwarding module 604 is further configured to: and the trigger data receiving unit receives the picture data forwarded by the picture library system.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 7 is a block diagram of an electronic device according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 7, the electronic apparatus includes: one or more processors 701, a memory 702, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 7, one processor 701 is taken as an example.
The memory 702 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the method for testing a view library system provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the view library system testing method provided herein.
The memory 702, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the view library system testing method in the embodiments of the present application (e.g., the creating module 601, the subscribing module 602, the uploading module 603, the forwarding module 604, and the determining module 605 shown in fig. 6). The processor 701 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 702, that is, implements the view library system testing method in the above-described method embodiment.
The memory 702 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the electronic device of the view base system test method, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 702 may optionally include memory located remotely from the processor 701, which may be connected to the electronics of the view library system test method over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the view library system testing method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected by a bus or other means, and fig. 7 illustrates an example of a connection by a bus.
The input device 703 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device of the view library system test method, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer, one or more mouse buttons, a track ball, a joystick, or other input devices. The output devices 704 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the application, a transmitter view library MOCK system and a subscriber view library MOCK system are established at first; then calling a subscriber view library MOCK system to subscribe a transmitter view library MOCK system, and calling the transmitter view library MOCK system to upload the picture data to the view library system; then responding to the successful receiving of the picture data by the view library system, storing the picture data into the view library system, and triggering the MCOK system of the subscriber view library to receive the picture data forwarded by the view library system; and finally, determining the performance data of the view library system based on the capability of the view library system for receiving and forwarding the picture data. The automatic testing framework based on the MOCK is provided, and the testing of the view library system is realized by establishing the system function of the MOCK system for simulating a transmitter and a subscriber, so that the dependence of the view library system on an upstream system and a downstream system is eliminated, high-risk risks are exposed in advance, and the project testing period is shortened.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (14)

1. A method for testing a view library system comprises the following steps:
creating a transmitter view library MOCK system and a subscriber view library MOCK system;
calling the subscriber view library MOCK system to subscribe the transmitter view library MOCK system;
calling the transmitter view library MOCK system to upload picture data to a view library system;
responding to the view library system to successfully receive the picture data, storing the picture data to the view library system, and triggering the subscriber view library MCOK system to receive the picture data forwarded by the view library system;
determining performance data for the view library system based on the ability of the view library system to receive and forward the picture data.
2. The method of claim 1, wherein the transmitter view library (MOCK) system is an Internet acquisition equipment (MOCK) system, and the Internet acquisition equipment (MOCK) system comprises an acquisition equipment generator, an identity authentication unit, an equipment registration unit, a data generator and a data uploading unit; and
the MOCK system for creating the transmitter view library comprises:
calling the acquisition equipment generator to generate acquisition equipment codes and attribute information of a preset number of acquisition equipment;
calling an equipment management module of the view library system to register the acquisition equipment code to the view library system and bind a transmitter account;
returning the token in the transmitter account to the identity authentication unit, calling the identity authentication unit to adopt an HTTP abstract access authentication mode, expanding and increasing a user identifier in an HTTP request header field, and carrying the acquisition equipment code to perform identity authentication;
calling the equipment registration unit to register the acquisition equipment codes passing the identity authentication to the view library system;
creating a subscriber account number and a subscription rule in the view library system, wherein the subscription rule is used for specifying a collection equipment range which can be subscribed by a subscriber; and
the step of calling the transmitter view library MOCK system to upload the picture data to the view library system comprises the following steps:
and calling the data generator to generate the picture data, and calling the data uploading unit to upload the picture data to the view library system.
3. The method of claim 2, wherein the internet collection device MOCK system further comprises a device keep alive unit; and
after the calling the device registration unit to register the authenticated acquisition device code in the view library system, the method further includes:
and calling the equipment keep-alive unit to periodically keep the acquisition equipment alive.
4. The method of claim 3, wherein the internet collection device MOCK system further comprises a device log-off unit; and
after determining performance data of the view library system based on the ability of the view library system to receive and forward the picture data, further comprising:
and calling the equipment logout unit to logout the acquisition equipment.
5. The method of claim 1, wherein the transmitter view library MOCK system is a lower view library MOCK system comprising a subscription receiving unit and a subscription notification unit; and
the MOCK system for creating the transmitter view library comprises:
calling the subscription receiving unit to initiate platform-level subscription; and
the step of calling the transmitter view library MOCK system to upload the picture data to the view library system comprises the following steps:
and calling the subscription notification unit to upload the picture data to the view library system.
6. The method according to one of claims 2 to 5, wherein the subscriber view library MCOK system comprises an initiating subscription unit and a data receiving unit; and
the calling the subscriber view library MOCK system to subscribe the transmitter view library MOCK system comprises the following steps:
calling the subscription and acquisition equipment or a lower view library MOCK system subscribed by the subscription initiating unit;
the triggering the subscriber view library MCOK system to receive the picture data forwarded by the view library system comprises:
and triggering the data receiving unit to receive the picture data forwarded by the view library system.
7. A view library system testing apparatus comprising:
a creation module configured to create a transmitter view library MOCK system and a subscriber view library MOCK system;
a subscription module configured to invoke the subscriber view library MOCK system to subscribe to the transmitter view library MOCK system;
an upload module configured to invoke the transmitter view library MOCK system to upload picture data to a view library system;
a forwarding module configured to store the picture data to the view library system in response to the view library system successfully receiving the picture data, and trigger the subscriber view library MCOK system to receive the picture data forwarded by the view library system;
a determination module configured to determine performance data of the view library system based on the ability of the view library system to receive and forward the picture data.
8. The apparatus of claim 7, wherein the transmitter view library (MOCK) system is an Internet acquisition device (MOCK) system, and the Internet acquisition device (MOCK) system comprises an acquisition device generator, an identity authentication unit, a device registration unit, a data generator and a data uploading unit; and
the creation module is further configured to:
calling the acquisition equipment generator to generate acquisition equipment codes and attribute information of a preset number of acquisition equipment;
calling an equipment management module of the view library system to register the acquisition equipment code to the view library system and bind a transmitter account;
returning the token in the transmitter account to the identity authentication unit, calling the identity authentication unit to adopt an HTTP abstract access authentication mode, expanding and increasing a user identifier in an HTTP request header field, and carrying the acquisition equipment code to perform identity authentication;
calling the equipment registration unit to register the acquisition equipment codes passing the identity authentication to the view library system;
creating a subscriber account number and a subscription rule in the view library system, wherein the subscription rule is used for specifying a collection equipment range which can be subscribed by a subscriber; and
the upload module is further configured to:
and calling the data generator to generate the picture data, and calling the data uploading unit to upload the picture data to the view library system.
9. The apparatus of claim 8, wherein the internet collection device MOCK system further comprises a device keep-alive unit; and
the device further comprises:
the keep-alive module is configured to call the device keep-alive unit to periodically keep the acquisition device alive.
10. The apparatus of claim 9, wherein the internet collection device MOCK system further comprises a device log-out unit; and
the device further comprises:
and the logout module is configured to call the device logout unit to logout the acquisition device.
11. The apparatus of claim 7, wherein the transmitter view library MOCK system is a lower view library MOCK system comprising a subscription receiving unit and a subscription notification unit; and
the creation module is further configured to:
calling the subscription receiving unit to initiate platform-level subscription; and
the upload module is further configured to:
and calling the subscription notification unit to upload the picture data to the view library system.
12. The apparatus according to one of claims 8 to 11, wherein the subscriber view library MCOK system comprises an initiating subscription unit and a data receiving unit; and
the subscription module is further configured to:
calling the subscription and acquisition equipment or a lower view library MOCK system subscribed by the subscription initiating unit;
the forwarding module is further configured to:
and triggering the data receiving unit to receive the picture data forwarded by the view library system.
13. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202010590991.9A 2020-06-24 2020-06-24 View library system test method, device, equipment and storage medium Active CN111752837B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010590991.9A CN111752837B (en) 2020-06-24 2020-06-24 View library system test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010590991.9A CN111752837B (en) 2020-06-24 2020-06-24 View library system test method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111752837A true CN111752837A (en) 2020-10-09
CN111752837B CN111752837B (en) 2024-01-12

Family

ID=72677205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010590991.9A Active CN111752837B (en) 2020-06-24 2020-06-24 View library system test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111752837B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817858A (en) * 2021-02-05 2021-05-18 深圳市世强元件网络有限公司 Method and computer equipment for batch generation of test data based on Jmeter
CN113326391A (en) * 2021-05-07 2021-08-31 北京旷视科技有限公司 Communication method, communication device, storage medium and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106970873A (en) * 2017-01-10 2017-07-21 阿里巴巴集团控股有限公司 Mock method of testings, apparatus and system on line
US20170300402A1 (en) * 2016-04-19 2017-10-19 Sap Se Mock server and extensions for application testing
CN107368405A (en) * 2016-05-11 2017-11-21 腾讯科技(北京)有限公司 Test system, method of testing, mock platforms, blocker and client
US20180365134A1 (en) * 2017-06-20 2018-12-20 Sap Se Core Data Services Test Double Framework Automation Tool
CN109726117A (en) * 2018-11-15 2019-05-07 北京奇艺世纪科技有限公司 A kind of Mock test method, device, server and electronic equipment
CN110209589A (en) * 2019-06-05 2019-09-06 北京百度网讯科技有限公司 Knowledge base system test method, device, equipment and medium
CN110825641A (en) * 2019-11-08 2020-02-21 安徽继远检验检测技术有限公司 Micro-service application test tool set based on simulation data generator
CN110851468A (en) * 2018-08-01 2020-02-28 北京京东尚科信息技术有限公司 Method and device for making simulation response to test request of client

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170300402A1 (en) * 2016-04-19 2017-10-19 Sap Se Mock server and extensions for application testing
CN107368405A (en) * 2016-05-11 2017-11-21 腾讯科技(北京)有限公司 Test system, method of testing, mock platforms, blocker and client
CN106970873A (en) * 2017-01-10 2017-07-21 阿里巴巴集团控股有限公司 Mock method of testings, apparatus and system on line
US20180365134A1 (en) * 2017-06-20 2018-12-20 Sap Se Core Data Services Test Double Framework Automation Tool
CN110851468A (en) * 2018-08-01 2020-02-28 北京京东尚科信息技术有限公司 Method and device for making simulation response to test request of client
CN109726117A (en) * 2018-11-15 2019-05-07 北京奇艺世纪科技有限公司 A kind of Mock test method, device, server and electronic equipment
CN110209589A (en) * 2019-06-05 2019-09-06 北京百度网讯科技有限公司 Knowledge base system test method, device, equipment and medium
CN110825641A (en) * 2019-11-08 2020-02-21 安徽继远检验检测技术有限公司 Micro-service application test tool set based on simulation data generator

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨京煜;刘潇;杨程屹;: "民航信息系统基于真实业务数据的自动化回归测试应用实践", 电子测试, no. 19 *
潘诗瑶;黄建明;: "Web应用系统中的MOCK测试技术", 软件, no. 12 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112817858A (en) * 2021-02-05 2021-05-18 深圳市世强元件网络有限公司 Method and computer equipment for batch generation of test data based on Jmeter
CN112817858B (en) * 2021-02-05 2024-04-19 深圳市世强元件网络有限公司 Method and computer equipment for batch generation of test data based on Jmeter
CN113326391A (en) * 2021-05-07 2021-08-31 北京旷视科技有限公司 Communication method, communication device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN111752837B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
CN111625452B (en) Flow playback method and system
CN110765024B (en) Simulation test method, simulation test device, electronic equipment and computer readable storage medium
CN112929230B (en) Test processing method and device, electronic equipment and computer readable storage medium
CN111581291A (en) Data processing method and device, electronic equipment and readable medium
CN108228444B (en) Test method and device
CN111752837B (en) View library system test method, device, equipment and storage medium
US10282208B2 (en) Cognitive thread management in a multi-threading application server environment
CN111913875A (en) Method and system for automatic tagging based on software execution tracking
US11704680B2 (en) Detecting fraudulent user accounts using graphs
CN111490996A (en) Network attack processing method and device, computer equipment and storage medium
CN113110939A (en) Method and device for processing running data, computer equipment and storage medium
US11899557B2 (en) Automatic span context propagation to worker threads in rich-client applications
CN112532720A (en) Data forwarding method, device, equipment and storage medium
CN106209584B (en) User information processing method, client and server Internet-based
US20210226929A1 (en) Techniques for transferring data across air gaps
CN115705190A (en) Method and device for determining dependence degree
CN112052173B (en) Skill effect modification method, skill effect modification device, skill effect modification equipment and storage medium
CN111787221B (en) Image acquisition method, device, system, equipment and computer storage medium
CN116418711A (en) Service gateway testing method, equipment, storage medium and product
CN116244299A (en) Method, device, electronic equipment and medium for determining service data path
CN114764349A (en) Control method, device, medium and electronic equipment for cross-application running of sub-applications
CN113110982A (en) Data access layer verification method and device, storage medium and electronic device
Kundys et al. SOFTWARE SYSTEM FOR MONITORING SITUATION IN THE SETTLEMENT
US12019534B2 (en) Out-of-the-box telemetry for rich-client application runtime frameworks
CN113515329B (en) Special effect attribute setting method and device

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
GR01 Patent grant
GR01 Patent grant