+

CN112925711A - Local joint debugging test method and related device - Google Patents

Local joint debugging test method and related device Download PDF

Info

Publication number
CN112925711A
CN112925711A CN202110222481.0A CN202110222481A CN112925711A CN 112925711 A CN112925711 A CN 112925711A CN 202110222481 A CN202110222481 A CN 202110222481A CN 112925711 A CN112925711 A CN 112925711A
Authority
CN
China
Prior art keywords
requester
data
switch
preset
time interval
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
CN202110222481.0A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202110222481.0A priority Critical patent/CN112925711A/en
Publication of CN112925711A publication Critical patent/CN112925711A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3648Debugging of software using additional hardware
    • G06F11/3652Debugging of software using additional hardware in-circuit-emulation [ICE] arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application discloses a local joint debugging test method and a related device, wherein the method comprises the following steps: firstly, receiving a data request aiming at a target service system from a requester, then judging whether a preset switch is turned on within a preset time interval, if so, acquiring a simulation value of the data requested by the requester from a local database through a pre-configured section, and sending the simulation value to the requester. The embodiment of the application is beneficial to improving the safety of the local joint debugging test.

Description

Local joint debugging test method and related device
Technical Field
The application relates to the technical field of joint debugging test, in particular to a local joint debugging test method and a related device.
Background
With the development of science and technology, various systems are developed to enrich the production life of people, and as an important link of system development, local joint debugging test is always an effective guarantee of system development quality, the system development quality can be effectively improved by doing the local joint debugging test, and potential development quality problems can be effectively exposed before intervention test, so that the local joint debugging test is a very slow and important thing for developers.
At present, the method of local joint debugging test is that when a developer is debugging a third-party service system, the developer annotates the logic of calling the third-party service system in the original service logic, and adds a new section of logic for simulating and returning data of the third-party service system, that is, each joint debugging has a Uniform Resource Locator (URL), the developer needs to intervene in the service logic to modify, the return data of the third-party service system is simulated and returned to the front end, and for the same URL, different application scenes need to modify codes to simulate different data return values, so that not only is the time consumption of the local joint debugging test greatly increased, but also the efficiency of the joint debugging test is reduced, and confusion of different scenes is easily caused, the results of the joint debugging test are influenced, some potential quality hidden dangers cannot be discovered in time, and potential hidden dangers are caused to production due to logic modification of invading service codes, the safety is low.
Disclosure of Invention
The embodiment of the application provides a local joint debugging test method and a related device, and solves the problem of low safety in the local joint debugging test process.
In a first aspect, an embodiment of the present application provides a local joint debugging test method, including:
receiving a data request aiming at a target service system from a requester;
judging whether a preset switch is turned on within a preset time interval;
if so, acquiring a simulation value of the data requested by the requester from a local database through a pre-configured section, and sending the simulation value to the requester.
Optionally, after determining whether the preset switch is turned on within the preset time interval, the method further includes: if not, the data request is sent to the target service system.
Optionally, before determining whether the preset switch is turned on within the preset time interval, the method includes: when a switch setting request is detected, displaying a target base table, wherein the target base table is used for storing switch data; and acquiring switch data input by a user through the target base table, wherein the switch data is used for reflecting the preset switch.
Optionally, before determining whether the preset switch is turned on within the preset time interval, the method includes: when a switch setting request is detected, displaying a target attribute file, wherein the target attribute file is used for storing switch data; and acquiring switch data input by a user through the target attribute file, wherein the switch data is used for reflecting the preset switch.
Optionally, if so, before obtaining a simulated value of the data requested by the requester from a local database through a pre-configured tangent plane and sending the simulated value to the requester, the method further includes: acquiring the tangent plane configured in the initialized XML file; or, obtaining the section configured by way of annotation.
Optionally, the preconfigured cut plane includes a cut-in time, and if yes, obtaining a simulated value of the data requested by the requester from a local database through the preconfigured cut plane, and sending the simulated value to the requester, including: and acquiring the simulation value of the data requested by the requester from a local database through a pre-configured section according to the cut-in time.
Optionally, if so, obtaining a simulated value of the data requested by the requester from a local database through a pre-configured tangent plane, and sending the simulated value to the requester, where the obtaining includes: determining the data type of the data requested by the requester according to the data request; randomly simulating the simulated values of the data types by the local database.
In a second aspect, an embodiment of the present application provides a local joint debugging test apparatus, including:
a receiving unit, configured to receive a data request from a requester for a target service system;
the judging unit is used for judging whether a preset switch is turned on within a preset time interval;
and the communication unit is used for acquiring the simulation value of the data requested by the requester from a local database through a pre-configured section and sending the simulation value to the requester if the request is positive.
Optionally, the communication unit is further configured to send the data request to the target service system after determining whether a preset switch is turned on within the preset time interval, if not, the data request is sent to the target service system.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, a data request from a requester for a target service system is received first, and then it is determined whether a preset switch is turned on within a preset time interval, and if it is determined that the preset switch is turned on within the preset time interval, an analog value of data requested by the requester is obtained from a local database through a pre-configured section, and the analog value is sent to the requester. Therefore, the simulation value of the data requested by the requester can be obtained from the local database by cutting into the preset section, and the simulation value is fed back to the requester, namely, when a developer transfers the third-party service system, the logic for calling the third-party service system does not need to be annotated in the original service logic and a section of logic for simulating and returning to the third-party service system is not needed to be added, and for different application scenes, codes do not need to be modified to simulate different data return values, so that the efficiency of joint debugging testing is improved, meanwhile, the potential hidden danger caused by production due to logic modification of intrusive service codes is avoided, and the safety of the joint debugging testing is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an application scenario diagram of a local joint debugging test method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of another local joint debugging testing method provided in the embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a block diagram illustrating functional units of a local joint debugging test apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
At present, the method of local joint debugging test is that when a developer is debugging a third-party service system, the developer annotates the logic of debugging the third-party service system in the original service logic, and adds a new section of logic for simulating and returning data of the third-party service system, that is, each joint debugging has a Uniform Resource Locator (URL), the developer needs to intervene in the service logic to modify, the return data of the third-party service system is simulated and returned to the front end, and for the same URL, different application scenes need to modify codes to simulate different data return values, so that not only is the time consumption of the local joint debugging test greatly increased, but also the efficiency of the joint debugging test is reduced, and confusion of different scenes is easily caused, the results of the joint debugging test are influenced, some potential quality hidden dangers cannot be discovered in time, and potential hidden dangers are caused to production due to logic modification of invading service codes, the safety is low.
In view of the above problems, the present application provides a local joint debugging test method, and the following describes embodiments of the present application in detail with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic flow chart of a local joint debugging testing method according to an embodiment of the present application, and as shown in fig. 1, the local joint debugging testing method includes steps S101 to S103:
s101, receiving a data request aiming at a target service system from a requester.
Wherein the requesting party may be any authorized user. In practice, the requester may be a developer performing local joint debugging tests.
The target system is a third-party service system, the third-party service system may be a personnel system, a financial system, a material system and the like, the third-party service system may also be any other service system, and the third-party service system is not particularly limited.
And S102, judging whether a preset switch is turned on within a preset time interval.
The preset time interval may be 1 minute, 5 minutes, 8 minutes, and the like, and the preset time interval may also be other time intervals, and the preset time interval is not particularly limited.
The preset switch is used for controlling the cut-in of the preset tangent plane.
Optionally, the implementation manner of determining whether the preset switch is turned on within the preset time interval may be: judging whether a preset switch opening request is detected within the preset time interval or not; if so, acquiring a unique identifier corresponding to the requester; comparing the object identification of the authorized object with the unique identification; and if the object identification of the authorized object is matched with the unique identification, turning on the preset switch, and determining that the preset switch is turned on within the preset time interval.
The authorized object may be an object set in advance by a developer, or the authorized object may be an object authorized after the identity authentication is successful, and the authorization process of the authorized object is not specifically limited.
When the object is a user, the unique identifier corresponding to the requester is a user identity identifier ID corresponding to the requester; the object may be a user device, and when the object is a user device, the unique identifier corresponding to the requester may be a device identification code corresponding to the requester.
In a specific implementation, if the time interval is 10 minutes, the object is a user, when a data request of a requester a for a target service system is received, if it is determined that a preset switch opening request is detected within 10 minutes, a user ID a corresponding to the requester a is obtained, the user ID a is compared with an object identifier of an authorized object, if the object identifier of the authorized object is matched with the user ID a, a preset switch is opened, and it is determined that the preset switch is opened within the preset time interval.
Optionally, after comparing the object identifier of the authorized object with the unique identifier, the method further includes: and if the object identification of the authorized object is not matched with the unique identification, determining that the preset switch is not turned on within the preset time interval.
For example, if the time interval is 5 minutes, the object is a user device, when a data request of a requester B for a target service system is received, if it is determined that a preset switch-on request is detected within 5 minutes, a device identification code B corresponding to the requester B is obtained, the device identification code B is compared with an object identifier of an authorized object, and if the object identifier of the authorized object does not have an object identifier matched with the device identification code B, it is determined that the preset switch is not turned on.
Optionally, after comparing the object identifier of the authorized object with the unique identifier, the method further includes: if the object identification of the authorized object is not matched with the unique identification, performing authorization verification on the unique identification; and if the verification is passed, opening the preset switch, and determining that the preset switch is opened within the preset time interval.
The method for performing authorization verification on the unique identifier may be implemented as follows: and carrying out authorization verification by presetting problems and/or presetting a login password. That is, in the case where the answer to the preset question by the unique identifier is correct, and/or the input of the preset password is correct, the verification is determined to be passed.
For example, if the time interval is 13 minutes, the object is a user, when a data request of a requester C for a target service system is received, if it is determined that a preset switch-on request is detected within 5 minutes, a user ID b corresponding to the requester C is obtained, the user ID b is compared with an object identifier of an authorized object, if the object identifier of the authorized object does not match the user ID b, a preset problem for authorization verification is provided to the requester C through the user ID b, after the requester C is determined to answer correctly, it is determined that the preset switch is not turned on, the verification is passed, the preset switch is turned on, and finally it is determined that the preset switch is turned on within the preset time interval.
Further, if the object identifier of the authorized object does not have the object identifier matched with the unique identifier, after performing authorization verification on the unique identifier, the method further includes: and if the verification fails, determining that the preset switch is not opened within the preset time interval.
And S103, if yes, acquiring a simulation value of the data requested by the requester from a local database through a pre-configured section, and sending the simulation value to the requester.
The section refers to a code which can be cut into a local database to obtain the simulation value.
The analog value of the data requested by the requester refers to data which is randomly generated by the local database and has the same data type as the data requested by the requester.
It can be seen that, in the embodiment of the present application, a data request from a requester for a target service system is received first, and then it is determined whether a preset switch is turned on within a preset time interval, and if it is determined that the preset switch is turned on within the preset time interval, an analog value of data requested by the requester is obtained from a local database through a pre-configured section, and the analog value is sent to the requester. Therefore, the simulation value of the data requested by the requester can be obtained from the local database by cutting into the preset section, and the simulation value is fed back to the requester, namely, when a developer transfers the third-party service system, the logic for calling the third-party service system does not need to be annotated in the original service logic and a section of logic for simulating and returning to the third-party service system is not needed to be added, and for different application scenes, codes do not need to be modified to simulate different data return values, so that the efficiency of joint debugging testing is improved, meanwhile, the potential hidden danger caused by production due to logic modification of intrusive service codes is avoided, and the safety of the joint debugging testing is improved.
The local joint modulation test method related to the embodiment of the present application is applicable to electronic devices, and the electronic devices may include various handheld devices having a wireless communication function, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), a Mobile Station (MS), a terminal device (terminal device), and the like.
In one possible example, if yes, obtaining a simulated value of the data requested by the requester from a local database through a pre-configured section, and sending the simulated value to the requester includes: determining the data type of the data requested by the requester according to the data request; randomly simulating the simulated values of the data types by the local database.
Wherein the data type includes but is not limited to String type, Integer type.
In a specific implementation, after receiving a data request from a requester for a target service system, if it is determined that a preset switch is turned on within a preset time interval, and further, it is determined that a data type of data requested by the requester is a String type according to the data request, a value of the String type is randomly simulated through the local database, and finally, the simulated value of the String type is sent to the requester.
Optionally, after determining whether the preset switch is turned on within the preset time interval, the method further includes: if not, the data request is sent to the target service system.
That is, when it is determined that the preset switch is not turned on within the preset time interval, the original data acquisition logic is executed.
Optionally, before determining whether the preset switch is turned on within the preset time interval, the method includes: when a switch setting request is detected, displaying a target base table, wherein the target base table is used for storing switch data; and acquiring switch data input by a user through the target base table, wherein the switch data is used for reflecting the preset switch.
The base table refers to a table permanently stored in the database, and the base table is a bottom table used for storing information related to the database.
In a specific implementation, a developer may configure the preset switch in the base table data.
Optionally, before determining whether the preset switch is turned on within the preset time interval, the method includes: when a switch setting request is detected, displaying a target attribute file, wherein the target attribute file is used for storing switch data; and acquiring switch data input by a user through the target attribute file, wherein the switch data is used for reflecting the preset switch.
The attribute file refers to an attribute file (resource file) in java, and is defined as: *. Properties file, the saving form of the content in the file is "key value", the content can only be read when read through Resource Bundle class, the content needs to be edited through Properties class, the Properties class is specially processed by Properties.
In a specific implementation, a developer may configure the preset switch in an attribute file.
Therefore, in this example, the switch for controlling the cut-in of the preset tangent plane can be configured in the base table data or the attribute file in advance, so that the utilization of the preset tangent plane is realized by controlling the switch in the process of the joint debugging test of the developer, and the simulation of the corresponding data return value is completed locally.
Optionally, if so, before obtaining a simulated value of the data requested by the requester from a local database through a pre-configured tangent plane and sending the simulated value to the requester, the method further includes: the section configured in an eXtensible Markup Language (XML) file is initialized; or, obtaining the section configured by way of annotation.
The extensible markup language, a subset of the standard generalized markup language, is a markup language for marking electronic documents to be structured.
It can be seen that, in this example, the developer may configure the section in an eXtensible Markup Language (XML) file or in advance by way of annotation.
Optionally, the preconfigured cut plane includes a cut-in time, and if yes, obtaining a simulated value of the data requested by the requester from a local database through the preconfigured cut plane, and sending the simulated value to the requester includes: and acquiring the simulation value of the data requested by the requester from a local database through a pre-configured section according to the cut-in time.
The developer can determine the cut-in time in advance according to needs, and the cut-in time is not particularly limited.
In this example, the developer may cut into the pre-configured section at the cut-in point to obtain the analog value of the data requested by the requester from the local database by controlling the preset switch according to the needs of the developer.
The embodiments of the present application will be described in detail below with reference to a specific example.
Referring to fig. 2, fig. 2 is a schematic flowchart of a method provided in an embodiment of the present application, applied to an electronic device, the method being consistent with the embodiment shown in fig. 1, where the method includes:
s201, the electronic equipment acquires a section configured in an initialized XML file;
s202, when the electronic equipment detects a switch setting request, displaying a target attribute file, wherein the target attribute file is used for storing switch data;
s203, the electronic equipment acquires switch data input by a user through the target attribute file, wherein the switch data are used for reflecting a preset switch, and the preset switch is used for controlling the cut-in of the tangent plane;
s204, the electronic equipment receives a data request aiming at the target service system from a requester;
s205, the electronic equipment judges whether the preset switch is turned on within a preset time interval;
s206, if yes, the electronic equipment obtains a simulation value of the data requested by the requester from a local database through the tangent plane and sends the simulation value to the requester;
s207, if not, the electronic equipment sends the data request to the target service system.
It can be seen that, in the embodiment of the present application, a data request from a requester for a target service system is received first, and then it is determined whether a preset switch is turned on within a preset time interval, and if it is determined that the preset switch is turned on within the preset time interval, an analog value of data requested by the requester is obtained from a local database through a pre-configured section, and the analog value is sent to the requester. Therefore, the simulation value of the data requested by the requester can be obtained from the local database by cutting into the preset section, and the simulation value is fed back to the requester, namely, when a developer transfers the third-party service system, the logic for calling the third-party service system does not need to be annotated in the original service logic and a section of logic for simulating and returning to the third-party service system is not needed to be added, and for different application scenes, codes do not need to be modified to simulate different data return values, so that the efficiency of joint debugging testing is improved, meanwhile, the potential hidden danger caused by production due to logic modification of intrusive service codes is avoided, and the safety of the joint debugging testing is improved.
Referring to fig. 3, in accordance with the embodiment shown in fig. 1, fig. 3 is a schematic structural diagram of an electronic device 300 according to an embodiment of the present application, as shown in the figure, the electronic device 300 includes an application processor 310, a memory 320, a communication interface 330, and one or more programs 321, where the one or more programs 321 are stored in the memory 320 and configured to be executed by the application processor 310, and the one or more programs 321 include instructions for performing the following steps:
receiving a data request aiming at a target service system from a requester;
judging whether a preset switch is turned on within a preset time interval;
if so, acquiring a simulation value of the data requested by the requester from a local database through a pre-configured section, and sending the simulation value to the requester.
It can be seen that, in the embodiment of the present application, a data request from a requester for a target service system is received first, and then it is determined whether a preset switch is turned on within a preset time interval, and if it is determined that the preset switch is turned on within the preset time interval, an analog value of data requested by the requester is obtained from a local database through a pre-configured section, and the analog value is sent to the requester. Therefore, the simulation value of the data requested by the requester can be obtained from the local database by cutting into the preset section, and the simulation value is fed back to the requester, namely, when a developer transfers the third-party service system, the logic for calling the third-party service system does not need to be annotated in the original service logic and a section of logic for simulating and returning to the third-party service system is not needed to be added, and for different application scenes, codes do not need to be modified to simulate different data return values, so that the efficiency of joint debugging testing is improved, meanwhile, the potential hidden danger caused by production due to logic modification of intrusive service codes is avoided, and the safety of the joint debugging testing is improved.
In one possible example, the instructions in the one or more programs 321 are further to: and after judging whether a preset switch is turned on within the preset time interval, if not, sending the data request to the target service system.
In one possible example, the instructions in the one or more programs 321 are further to: before judging whether a preset switch is turned on within a preset time interval, displaying a target base table when a switch setting request is detected, wherein the target base table is used for storing switch data; and acquiring switch data input by a user through the target base table, wherein the switch data is used for reflecting the preset switch.
In one possible example, the instructions in the one or more programs 321 are further to: before judging whether a preset switch is turned on within a preset time interval, displaying a target attribute file when a switch setting request is detected, wherein the target attribute file is used for storing switch data; and acquiring switch data input by a user through the target attribute file, wherein the switch data is used for reflecting the preset switch.
In one possible example, the instructions in the one or more programs 321 are further to: if so, acquiring a simulation value of the data requested by the requester from a local database through a pre-configured section, and acquiring the section configured in the initialized XML file before sending the simulation value to the requester; or, obtaining the section configured by way of annotation.
In one possible example, in the case that the preconfigured cut plane includes a cut-in time, if yes, obtaining a simulated value of the data requested by the requesting party from a local database through the preconfigured cut plane, and sending the simulated value to the requesting party, the instructions in the one or more programs 321 are further configured to: and acquiring the simulation value of the data requested by the requester from a local database through a pre-configured section according to the cut-in time.
In one possible example, in the case that the request is a request for a simulated value of data, the simulated value is obtained from a local database through a pre-configured section, and the simulated value is sent to the request, the instructions in the one or more programs 321 are further configured to: determining the data type of the data requested by the requester according to the data request; randomly simulating the simulated values of the data types by the local database.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 4 is a block diagram of functional units of a local joint debugging test apparatus 400 according to an embodiment of the present application, where the local joint debugging test apparatus 400 includes:
a receiving unit 401, configured to receive a data request from a requester for a target service system;
a judging unit 402, configured to judge whether a preset switch is turned on within a preset time interval;
a communication unit 403, configured to, if yes, obtain a simulated value of the data requested by the requestor from a local database through a pre-configured tangent plane, and send the simulated value to the requestor.
The local joint debugging test apparatus 400 may further include a storage unit 404 for storing program codes and data of electronic devices. The storage unit 404 may be a memory.
It can be seen that, in the embodiment of the present application, a data request from a requester for a target service system is received first, and then it is determined whether a preset switch is turned on within a preset time interval, and if it is determined that the preset switch is turned on within the preset time interval, an analog value of data requested by the requester is obtained from a local database through a pre-configured section, and the analog value is sent to the requester. Therefore, the simulation value of the data requested by the requester can be obtained from the local database by cutting into the preset section, and the simulation value is fed back to the requester, namely, when a developer transfers the third-party service system, the logic for calling the third-party service system does not need to be annotated in the original service logic and a section of logic for simulating and returning to the third-party service system is not needed to be added, and for different application scenes, codes do not need to be modified to simulate different data return values, so that the efficiency of joint debugging testing is improved, meanwhile, the potential hidden danger caused by production due to logic modification of intrusive service codes is avoided, and the safety of the joint debugging testing is improved.
In one possible example, the communication unit 403 is further configured to: and after judging whether a preset switch is turned on within the preset time interval, if not, sending the data request to the target service system.
In one possible example, the local joint debugging test apparatus further includes a switch configuration unit 405: the device comprises a display unit, a control unit and a display unit, wherein the display unit is used for displaying a target base table when a switch setting request is detected before whether a preset switch is turned on within the preset time interval is judged, and the target base table is used for storing switch data; and acquiring switch data input by a user through the base table, wherein the switch data is used for reflecting the preset switch.
In one possible example, the local joint debugging test apparatus further includes a switch configuration unit 405: the device comprises a display unit, a storage unit and a display unit, wherein the display unit is used for displaying a target attribute file when a switch setting request is detected before whether a preset switch is turned on within the preset time interval is judged, and the target attribute file is used for storing switch data; and acquiring switch data input by a user through the target attribute file, wherein the switch data is used for reflecting the preset switch.
In one possible example, the local joint debugging test apparatus further includes a tangent plane configuration unit 406: if so, acquiring a simulation value of the data requested by the requester from a local database through a pre-configured section, and acquiring the section configured in the initialized XML file before sending the simulation value to the requester; or, obtaining the section configured by way of annotation.
In a possible example, in a case that the preconfigured cut plane includes a cut-in time, if yes, obtaining a simulated value of the data requested by the requesting party from a local database through the preconfigured cut plane, and sending the simulated value to the requesting party, the communication unit 403 is further configured to: and acquiring the simulation value of the data requested by the requester from a local database through a pre-configured section according to the cut-in time.
In a possible example, if so, in terms of obtaining a simulation value of the data requested by the requester from a local database through a pre-configured tangent plane and sending the simulation value to the requester, the sending unit 403 is specifically configured to: determining the data type of the data requested by the requester according to the data request; randomly simulating the simulated values of the data types by the local database.
It can be understood that, since the embodiment of the local joint debugging test method and the embodiment of the local joint debugging test apparatus are different presentation forms of the same technical concept, the content of the embodiment of the local joint debugging test method in the present application should be synchronously adapted to the embodiment of the local joint debugging test apparatus, and is not described herein again.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device. Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1.一种本地联调测试方法,其特征在于,包括:1. a local joint debugging test method, is characterized in that, comprises: 接收来自请求方针对目标业务系统的数据请求;Receive data requests from the requester for the target business system; 判断预设时间间隔内预设开关是否打开;Determine whether the preset switch is turned on within the preset time interval; 若是,则通过预先配置的切面从本地数据库中获取所述请求方请求的数据的模拟值,并向所述请求方发送所述模拟值。If so, obtain the simulated value of the data requested by the requester from the local database through a preconfigured aspect, and send the simulated value to the requester. 2.根据权利要求1所述的方法,其特征在于,所述判断预设时间间隔内预设开关是否打开之后,所述方法还包括:2. The method according to claim 1, wherein after judging whether the preset switch is turned on within a preset time interval, the method further comprises: 若否,则向所述目标业务系统发送所述数据请求。If not, send the data request to the target service system. 3.根据权利要求1所述的方法,其特征在于,所述判断预设时间间隔内预设开关是否打开之前,所述方法包括:3. The method according to claim 1, wherein, before judging whether a preset switch is turned on within a preset time interval, the method comprises: 在检测到开关设置请求时,显示目标基表,所述目标基表用于存储开关数据;When a switch setting request is detected, a target base table is displayed, and the target base table is used to store switch data; 通过所述目标基表获取用户输入的开关数据,所述开关数据用于反映所述预设开关。The switch data input by the user is acquired through the target base table, and the switch data is used to reflect the preset switch. 4.根据权利要求1所述的方法,其特征在于,所述判断预设时间间隔内预设开关是否打开之前,所述方法包括:4. The method according to claim 1, wherein, before judging whether the preset switch is turned on within a preset time interval, the method comprises: 在检测到开关设置请求时,显示目标属性文件,所述目标属性文件用于存储开关数据;When a switch setting request is detected, a target property file is displayed, and the target property file is used to store switch data; 通过所述目标属性文件获取用户输入的开关数据,所述开关数据用于反映所述预设开关。The switch data input by the user is acquired through the target property file, and the switch data is used to reflect the preset switch. 5.根据权利要求1所述的方法,其特征在于,所述若是,则通过预先配置的切面从本地数据库中获取所述请求方请求的数据的模拟值,并向所述请求方发送所述模拟值之前,所述方法还包括:5 . The method according to claim 1 , wherein, if said yes, obtain an analog value of the data requested by the requester from a local database through a preconfigured aspect, and send the requester to the requester. 6 . Before simulating the value, the method further includes: 获取初始化XML文件里配置的所述切面;或者,Get the aspect configured in the initialization XML file; or, 获取通过注解的方式配置的所述切面。Get the aspect configured by annotation. 6.根据权利要求1-5任一项所述的方法,其特征在于,所述若是,则通过预先配置的切面从本地数据库中获取所述请求方请求的数据的模拟值,并向所述请求方发送所述模拟值,包括:6. The method according to any one of claims 1-5, characterized in that, if said yes, obtain an analog value of the data requested by the requester from a local database through a preconfigured aspect, and report it to the said The requester sends the simulated value, including: 根据所述数据请求确定所述请求方请求的数据的数据类型;determining the data type of the data requested by the requester according to the data request; 通过所述本地数据库随机模拟所述数据类型的所述模拟值。The simulated value of the data type is randomly simulated by the local database. 7.一种本地联调测试装置,其特征在于,包括:7. A local joint debugging test device is characterized in that, comprising: 接收单元,用于接收来自请求方针对目标业务系统的数据请求;a receiving unit, configured to receive a data request from the requester for the target service system; 判断单元,用于判断预设时间间隔内预设开关是否打开;a judging unit for judging whether a preset switch is turned on within a preset time interval; 通信单元,用于若是,则通过预先配置的切面从本地数据库中获取所述请求方请求的数据的模拟值,并向所述请求方发送所述模拟值。A communication unit, configured to obtain the simulated value of the data requested by the requester from the local database through a preconfigured aspect, and send the simulated value to the requester. 8.根据权利要求7所述的装置,其特征在于,所述通信单元还用于在所述判断预设时间间隔内预设开关是否打开之后,若否,则向所述目标业务系统发送所述数据请求。8. The device according to claim 7, wherein the communication unit is further configured to, after judging whether the preset switch is turned on within the preset time interval, if not, send the information to the target service system. the data request. 9.一种电子设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-6任一项所述的方法中的步骤的指令。9. An electronic device comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured by the processor Executing, the program includes instructions for performing the steps in the method of any of claims 1-6. 10.一种计算机可读存储介质,其特征在于,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-6中任一项所述的方法的部分或全部步骤。10. A computer-readable storage medium, characterized in that it stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform part of the method according to any one of claims 1-6 or all steps.
CN202110222481.0A 2021-02-26 2021-02-26 Local joint debugging test method and related device Pending CN112925711A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110222481.0A CN112925711A (en) 2021-02-26 2021-02-26 Local joint debugging test method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110222481.0A CN112925711A (en) 2021-02-26 2021-02-26 Local joint debugging test method and related device

Publications (1)

Publication Number Publication Date
CN112925711A true CN112925711A (en) 2021-06-08

Family

ID=76172528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110222481.0A Pending CN112925711A (en) 2021-02-26 2021-02-26 Local joint debugging test method and related device

Country Status (1)

Country Link
CN (1) CN112925711A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297012A (en) * 2022-08-03 2022-11-04 重庆奥普泰通信技术有限公司 Off-line testing method and device for SDN controller, controller and medium
CN117251385A (en) * 2023-11-20 2023-12-19 深圳大道云科技有限公司 method and device for acquiring mock data, terminal equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016021161A (en) * 2014-07-15 2016-02-04 株式会社日立製作所 Simulator system, gateway system test apparatus, and gateway system test method
CN109446063A (en) * 2018-09-18 2019-03-08 深圳壹账通智能科技有限公司 Interface test method, device, computer equipment and storage medium
CN110532184A (en) * 2019-08-29 2019-12-03 深圳前海环融联易信息科技服务有限公司 Method, apparatus, computer equipment and the storage medium of more scenario simulation responses
CN110851364A (en) * 2019-11-12 2020-02-28 深圳市前海随手数据服务有限公司 Software testing method, system and related equipment
CN110851468A (en) * 2018-08-01 2020-02-28 北京京东尚科信息技术有限公司 Method and device for making simulation response to test request of client

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016021161A (en) * 2014-07-15 2016-02-04 株式会社日立製作所 Simulator system, gateway system test apparatus, and gateway system test method
CN110851468A (en) * 2018-08-01 2020-02-28 北京京东尚科信息技术有限公司 Method and device for making simulation response to test request of client
CN109446063A (en) * 2018-09-18 2019-03-08 深圳壹账通智能科技有限公司 Interface test method, device, computer equipment and storage medium
CN110532184A (en) * 2019-08-29 2019-12-03 深圳前海环融联易信息科技服务有限公司 Method, apparatus, computer equipment and the storage medium of more scenario simulation responses
CN110851364A (en) * 2019-11-12 2020-02-28 深圳市前海随手数据服务有限公司 Software testing method, system and related equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297012A (en) * 2022-08-03 2022-11-04 重庆奥普泰通信技术有限公司 Off-line testing method and device for SDN controller, controller and medium
CN115297012B (en) * 2022-08-03 2024-02-06 重庆奥普泰通信技术有限公司 Offline testing method and device of SDN controller, controller and medium
CN117251385A (en) * 2023-11-20 2023-12-19 深圳大道云科技有限公司 method and device for acquiring mock data, terminal equipment and readable storage medium
CN117251385B (en) * 2023-11-20 2024-04-02 深圳大道云科技有限公司 method and device for acquiring mock data, terminal equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11294983B2 (en) Inferred user identity in content distribution
CN107395614B (en) Single sign-on method and system
CN105610810B (en) A data processing method, client and server
CN109286633A (en) Single sign-on method, device, computer equipment and storage medium
JP2019502192A (en) Method and device for application information risk management
US9971908B2 (en) Method and apparatus for determining permission of application program
CN105095788B (en) The method, apparatus and system of private data guard
CN108737328B (en) Browser user agent identification method, system and device
CN114139135B (en) Equipment login management method, device and storage medium
CN111460394A (en) Copyright file verification method and device and computer readable storage medium
CN103890734A (en) Telemetry file hash and conflict detection
CN113656780A (en) Cross-link access control method and device
KR20190127124A (en) Method and apparatus for verifying integrity of source code and related data using blockchain
CN103559221B (en) A kind of method, device and browser for carrying out multimedia-data procession
CN111104685B (en) Dynamic updating method and device for two-dimension code
CN112925711A (en) Local joint debugging test method and related device
CN104683299A (en) Control method for software registration, authentication server and terminal
CN109902505A (en) A kind of storage of Electronic Signature, verification method and device
US20160110531A1 (en) Information processing apparatus, terminal apparatus and information processing method
CN106878345A (en) A kind of method and device for distorting protection
CN103001934A (en) Terminal application login method and terminal application login system
CN103561000A (en) Multimedia data authentication method and device and browser
CN110995658A (en) Gateway protection method, device, computer equipment and storage medium
CN111443976A (en) Application program generation method and device, electronic equipment and storage medium
CN111107143A (en) Network file transmission detection method, device and system

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210608

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载