CN111831550A - Joint debugging test method and device - Google Patents
Joint debugging test method and device Download PDFInfo
- Publication number
- CN111831550A CN111831550A CN202010501380.2A CN202010501380A CN111831550A CN 111831550 A CN111831550 A CN 111831550A CN 202010501380 A CN202010501380 A CN 202010501380A CN 111831550 A CN111831550 A CN 111831550A
- Authority
- CN
- China
- Prior art keywords
- bank
- application
- mock
- head office
- loan service
- 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
Links
- 238000010998 test method Methods 0.000 title claims abstract description 27
- 230000001960 triggered effect Effects 0.000 claims abstract description 12
- 238000012360 testing method Methods 0.000 claims description 48
- 230000005540 biological transmission Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 10
- 238000012546 transfer Methods 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 3
- 238000000034 method Methods 0.000 abstract description 13
- 230000008569 process Effects 0.000 abstract description 5
- 238000004891 communication Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000012797 qualification Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- RWSOTUBLDIXVET-UHFFFAOYSA-N Dihydrogen sulfide Chemical compound S RWSOTUBLDIXVET-UHFFFAOYSA-N 0.000 description 1
- 101100348848 Mus musculus Notch4 gene Proteins 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3664—Environments for testing or debugging software
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)
Abstract
The embodiment of the invention provides a joint debugging test method and a device, the method comprises the steps of firstly obtaining key information required by loan service application, wherein the key information comprises a head office name and an application type of a bank corresponding to the loan service application; then, determining the code number of the head office of the bank according to the head office name of the bank, and determining the mock message according to the code number of the head office and the application type; saving the mock message by calling a saving interface of the loan service system; and generating an association link of the loan service application, and automatically loading the application information in the mock message when the association link is triggered. The whole process is automatically realized through the system without the participation of testers, the mock message can be stored and the application information can be automatically input by the loan service system, and the manpower is saved. Meanwhile, the realization of automation can also greatly reduce the time cost caused by the fact that a tester fills application information by hands.
Description
Technical Field
The invention relates to the technical field of computer software application, in particular to a joint debugging test method and device.
Background
When software product development is complete, joint debugging tests are typically performed. The joint debugging test mainly tests the correctness of interfaces among all test units and whether data streams among all test units are realized according to design.
When actually performing joint debugging test, for example, joint debugging test of related application of bank loan, a tester needs to perform the following steps: 1) constructing a transaction sheet of a transaction System (N-Trading System, NTS), manually operating on the NTS to initiate loan application/qualification prequalification, and opening an application page of loan service; 2) manually checking whether a mock switch of the gateway system is closed, if not, manually closing the mock switch, and refreshing the cache of the gateway system; 3) manually filling and submitting application information on an application page of the loan service; 4) the application information is transmitted to the gateway system for processing, and the gateway system sends the processed application information to the bank.
In the joint debugging test process, the tester is required to fill in the application information by hand, and the labor is wasted. Moreover, because different banks need to fill different application information, the number of the application information is generally 40-80, and the time for filling the application information by a tester through a pure hand is about 15-20 minutes, so that the time cost for filling the application information through the pure hand is high.
Disclosure of Invention
To overcome the above problems or at least partially solve the above problems, embodiments of the present invention provide a joint debugging testing method and apparatus.
In a first aspect, an embodiment of the present invention provides a joint debugging test method, including:
obtaining key information required by loan service application, wherein the key information comprises a head office name and an application type of a bank corresponding to the loan service application;
determining the code number of the head office of the bank based on the head office name of the bank, and determining a mock message according to the code number of the head office and the application type; the mock message comprises application information corresponding to the loan service application;
calling a storage interface of a loan service system to store the mock message;
and generating a related link of the loan service application, and automatically loading the application information in the mock message when the related link is triggered.
Preferably, the joint debugging test method further includes:
determining the identification information of the bank in the gateway system according to the code number of the head office;
judging whether the gateway system has configuration information corresponding to the bank or not based on the identification information;
and if the configuration information corresponding to the bank exists in the gateway system, determining that the testing environment of the bank is available, and automatically closing a mock switch in the gateway system.
Preferably, the joint debugging test method further includes:
and if the gateway system does not have the configuration information corresponding to the bank, determining that the testing environment of the bank is unavailable, and automatically starting the mock switch.
Preferably, the invoking a storage interface of the loan service system to store the mock message specifically includes:
constructing a transmission parameter of the storage interface based on the key information and the mock message;
sending an interface request to the save interface based on the transfer parameter;
and receiving a return code of the storage interface aiming at the interface request, and if the return code is equal to a preset value, determining that the mock message is successfully stored.
Preferably, the determining a mock message according to the head office code number and the application type specifically includes:
determining the mock message based on the head office code number, the application type and a lock _ mock table;
and the lock _ mock table is used for storing the corresponding relation between the code number of the head office of the bank, the application type and the mock message.
Preferably, the key information further includes: applying a corresponding transaction order number by the loan service; correspondingly, the generating of the association link of the loan service application specifically includes:
and generating the association link based on the transaction order number, the code number of the city and the application type.
Preferably, the generating the association link based on the transaction order number, the code number of the city where the transaction order is located, and the application type specifically includes:
determining a loan service domain name and an interface name;
and splicing the loan service domain name, the interface name, the transaction order number, the code number of the city and the application type to obtain the associated link.
In a second aspect, an embodiment of the present invention provides a joint debugging testing apparatus, including: the system comprises a key information acquisition module, a mock message determination module, an application information storage module and an automatic loading module. Wherein,
the key information acquisition module is used for acquiring key information required by loan service application, and the key information comprises a head office name and an application type of a bank corresponding to the loan service application;
the mock message determining module is used for determining the code number of the head office of the bank based on the head office name of the bank and determining the mock message according to the code number of the head office and the application type; the mock message comprises application information corresponding to the loan service application;
the application information storage module is used for calling a storage interface of the loan service system to store the mock message;
and the automatic loading module is used for generating an associated link of the loan service application and automatically loading the application information in the mock message when the associated link is triggered.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the joint debugging testing method according to the first aspect when executing the program.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the joint debugging test method according to the first aspect.
The method comprises the steps of firstly obtaining key information required by loan service application, wherein the key information comprises a head office name and an application type of a bank corresponding to the loan service application; then, determining the code number of the head office of the bank according to the head office name of the bank, and determining the mock message according to the code number of the head office and the application type; saving the mock message by calling a saving interface of the loan service system; and generating an association link of the loan service application, and automatically loading the application information in the mock message when the association link is triggered. The whole process is automatically realized through the system without the participation of testers, the mock message can be stored and the application information can be automatically input by the loan service system, and the manpower is saved. Meanwhile, the realization of automation can also greatly reduce the time cost caused by the fact that a tester fills application information by hands.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a joint debugging test method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a joint debugging test system according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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 invention.
As shown in fig. 1, an embodiment of the present invention provides a joint debugging test method, including:
s1, obtaining key information required by the loan application, wherein the key information comprises the head office name and the application type of a bank corresponding to the loan application;
s2, determining the code number of the bank 'S head office based on the name of the bank' S head office, and determining the mock message according to the code number of the head office and the application type; the mock message comprises application information corresponding to the loan service application;
s3, calling a storage interface of the loan service system to store the mock message;
and S4, generating a related link of the loan service application, and automatically loading the application information in the mock message when the related link is triggered.
Specifically, in the joint debugging Test method provided in the embodiment of the present invention, the execution subject may be an External Test (E-Test) System, and joint debugging Test for loan application between an N-tracking System (NTS) and a bank is implemented by the E-Test System.
Step S1 is performed first. The loan transaction application refers to a related application related to a certain transaction order in the NTS and needing to transact loan transaction with a bank. The key information required by the loan application comprises the general bank name and the application type of the bank corresponding to the loan application. The bank corresponding to the loan application refers to the bank receiving the loan, i.e. applying for the loan from the bank. The application type refers to the type of the loan service application, and may specifically include loan application, qualification prequalification, and the like.
Then, step S2 is executed. The head _ bank _ code of the bank refers to a unique identifier of a head bank of the bank, and may be specifically represented by an acronym of english, or may be represented by a certain abbreviation included in english, such as "CITIC", "ABC", "CCB", "ICBC", and the like. The name of the bank and the code number of the bank are in one-to-one correspondence, so that the code number of the bank can be determined according to the name of the bank. Because different banks correspond to different application types of loan service application and the required application information is different, the embodiment of the invention obtains the mock message by simulating the application information through the interface, the mock message contains the application information corresponding to the loan service application, and the mock message corresponds to the head office code and the application type one by one, so that the corresponding mock message can be determined through the head office code and the application type.
Step S3 is then performed. The loan service system is a system for applying for loan transaction, so as to realize the connection between the NTS and the bank system. And saving the mock message in the loan service system by calling a saving interface of the loan service system. The path of the loan servicing system's save interface may specifically be "/loan/application/save".
Finally, step S4 is performed. The association link can be obtained by splicing a plurality of fields and has the function of establishing a link for finding the mock message, so that the application information in the mock message can be automatically loaded when the association link is triggered, and the automatic entry of the application information is realized.
The joint debugging test method provided by the embodiment of the invention comprises the steps of firstly obtaining key information required by loan service application, wherein the key information comprises a head office name and an application type of a bank corresponding to the loan service application; then, determining the code number of the head office of the bank according to the head office name of the bank, and determining the mock message according to the code number of the head office and the application type; saving the mock message by calling a saving interface of the loan service system; and generating an association link of the loan service application, and automatically loading the application information in the mock message when the association link is triggered. The whole process is automatically realized through the system without the participation of testers, the mock message can be stored and the application information can be automatically input by the loan service system, and the manpower is saved. Meanwhile, the realization of automation can also greatly reduce the time cost caused by the fact that a tester fills application information by hands.
On the basis of the above embodiment, in the joint debugging test method provided in the embodiment of the present invention, the key information further includes: the city of the bank, the branch code of the bank and the transaction order number corresponding to the loan service application. The city of the bank refers to a city-level address of the bank, such as city a, city b, and the like. The branch code of the bank refers to the code of a branch in a certain area under a branch set in a city where the head office of the bank is located, and is the unique identifier of the branch. For example, bank a has a code of "1002210150004" for branch in the a1 area under the branch established in city a. The transaction sheet number corresponding to the loan transaction application refers to the sheet number corresponding to the transaction sheet in the NTS, and is used for identifying the transaction sheet, such as 'JY 0512011912250015'.
On the basis of the embodiment, the head office name, the application type and the city of the bank corresponding to the loan application can be selected on the interface of the E-Test system, the branch code of the bank and the transaction order number corresponding to the loan application are input, and then an 'instant creation' button on the interface is triggered, so that the application information can be automatically input through the E-Test system.
On the basis of the embodiment, the obtaining of the general bank name corresponding to the loan application can be realized through a select control, and a tester triggers the select control to dynamically select from a database of the E-Test system. The acquisition of the application type can be specifically realized through a radio control, a tester triggers the radio control to select the application type displayed on an interface of the E-Test system, and the application type can be selected as default to 'loan application'. The acquisition of the city where the bank is located can be specifically realized through a select control, and a tester triggers the select control to dynamically select from a database of the E-Test system. The transaction order number corresponding to the loan transaction application may be specifically determined from the NTS system and entered by the tester. The branch code of the bank can be manually input by a tester.
Since in the prior art the tester checks by hand whether the mock switch of the gateway system has been turned off, it takes about 5-10 minutes. Moreover, the loan service application may fail because the application information cannot be successfully sent to the bank because the tester forgets to check. Therefore, on the basis of the above embodiment, the joint debugging test method provided by the embodiment of the present invention further includes:
determining the identification information of the bank in the gateway system according to the code number of the head office;
judging whether the gateway system has configuration information corresponding to the bank or not based on the identification information;
and if the configuration information corresponding to the bank exists in the gateway system, determining that the testing environment of the bank is available, and automatically closing a mock switch in the gateway system.
Specifically, the gateway system is an entrance for network transmission between the NTS and an external organization, and the external organization in the embodiment of the present invention is a bank. The gateway system can set whether the application information is allowed to be sent to the banks aiming at different banks through the mock switch. The purpose of the gateway system for designing the mock switch is to get rid of dependence on the testing environment of the bank, and when the testing environment of the bank is available, the mock switch can be turned off to realize the testing environment of the directly connected bank. When the testing environment of the bank is unavailable, the testing environment of the bank can be simulated by turning on the mock switch in a mock mode. Such as: the testing environment of the bank A exists for a long time and can be used for a long time, so that the mock switch is turned off; the testing environment of the bank B is often unstable or unavailable and cannot be used for a long time, so that a mock switch needs to be started to disconnect network transmission between the NTS and the bank, and application information cannot be sent to the bank at the moment so as to get rid of dependence on the testing environment of the bank; the bank C provides a corresponding test environment according to the requirement, so that whether the mock switch is turned on or turned off can be determined according to whether the bank C is configured with the corresponding test environment.
Therefore, firstly, according to the code number of the head office of the bank, the identification information (provider _ id) of the bank in the gateway system is determined. The identification information of the bank in the gateway system refers to information used for uniquely identifying the bank in the gateway system, and corresponds to the code number of the head office of the bank one by one. And then, judging whether the gateway system has configuration information corresponding to the bank or not according to the identification information. The configuration information corresponding to the bank refers to information obtained by configuring the bank by the gateway system, and is used for representing whether the testing environment of the bank is available. If the configuration information corresponding to the bank exists in the gateway system, the testing environment of the bank is available, the testing environment of the bank is not required to be simulated in a mock mode, the gateway system can be automatically closed at the moment, and the application information is transmitted to the bank system for testing.
The gateway system comprises a service database, a gateway bank configuration (gate _ provider _ api) table can be stored in the service database in advance, the configuration information of the mock switch is maintained through the gate _ provider _ api table, namely the configuration information (mock _ type) of the mock switch is stored in the gate _ provider _ api table, and if the testing environment of the bank is available, the provider _ id of the bank in the gateway system and the configuration information corresponding to the bank are also stored in the gate _ provider _ api table. Therefore, when determining whether the gateway system has the configuration information corresponding to the bank according to the identification information of the bank, the configuration information corresponding to the bank may be specifically searched in the gate _ provider _ api table by the provider _ id of the bank in the gateway system.
The automatic closing of the mock switch in the gateway system may specifically be to modify the mock _ type in the gate _ provider _ api table, for example, the automatic closing of the mock switch corresponds to setting the mock _ type to 0. The modified statement of mock _ type can be expressed as: update gate _ provider _ api set _ type 0where provider _ id 1004.
After the mock _ type is modified, a refresh cache interface of the gateway system can be called to refresh the cache of the gateway system, so that the configuration information of the latest mock switch in the service database of the gateway system takes effect immediately. The path of the refresh cache interface of the gateway system may be denoted as "/admin/gate/refresh".
The joint debugging test method provided by the embodiment of the invention determines the identification information of the bank in the gateway system through the code number of the head office of the bank, judges whether the configuration information corresponding to the bank exists in the gateway system according to the identification information of the bank in the gateway system, if the configuration information corresponding to the bank exists, the test environment of the bank is available, and at the moment, the mock switch in the gateway system is automatically closed. The problem that the testing personnel forget to check and the checking cost is high can be solved by automatically closing the mock switch; and the realization of automation can reduce the time cost brought by the gateway detection carried out by a tester by hand, so that the application information filling and the gateway detection can be completed within 30 seconds, and the efficiency of loan service application is greatly improved.
On the basis of the above embodiment, if there is no configuration information corresponding to the bank in the gateway system, it is determined that the testing environment of the bank is unavailable, and the mock switch is automatically turned on.
Specifically, if the gateway system does not have configuration information corresponding to the bank, it indicates that the testing environment of the bank is not available, and therefore the mock switch needs to be automatically turned on, so that the NTS and the bank are disconnected from network transmission, and the testing environment of the bank is simulated in a mock manner.
For example, automatically turning on the mock switch may correspond to setting mock _ type to 1. The modified statement of mock _ type can be expressed as: update gate _ provider _ api set _ type 1where provider _ id 1004.
According to the joint debugging test method provided by the embodiment of the invention, when the configuration information corresponding to the bank does not exist in the gateway system, the test environment of the bank is indicated to be unavailable, and the mock switch in the gateway system is automatically started at the moment. The problem that a tester forgets to check and the checking cost is high can be solved by automatically starting the mock switch; and the realization of automation can reduce the time cost brought by the gateway detection performed by a tester by hand, so that the application information filling and the gateway detection can be completed within 30 seconds.
On the basis of the above embodiment, the invoking a storage interface of the loan service system to store the mock message specifically includes:
constructing a transmission parameter of the storage interface based on the key information and the mock message;
sending an interface request to the save interface based on the transfer parameter;
and receiving a return code of the storage interface aiming at the interface request, and determining that the mock message is successfully stored if the return code meets a preset requirement.
Specifically, in the embodiment of the present invention, when the saving interface of the loan service system is called, an interface request needs to be sent to the saving interface of the loan service system, where the interface request includes a transfer parameter that needs to be saved by the saving interface.
Firstly, constructing and storing transmission parameters of an interface according to the key information and the mock message, wherein the transmission parameters comprise the key information and the mock message. The transfer parameters are specifically as follows:
businessCode: represents a transaction order number (business _ lose);
appId: indicates the subject of the loan service application, in the embodiment of the present invention, the fixed delivery value nts;
type: the application type (application _ type) is represented, the qualification prereview is represented by the value of 1, and the loan application is represented by the value of 4;
params: representing a mock message (mock _ data);
branchBankCode: represents branch _ bank _ code;
headBank code: represents a head _ bank _ code;
cityCode: a code number (city _ id) indicating the city where the bank is located.
After the transmission parameter is constructed, triggering an interface request of a storage interface, acquiring a return code (res.status _ code) sent by the storage interface aiming at the interface request, judging whether the interface request is successful according to the res.status _ code, namely judging whether the res.status _ code is equal to a preset value, if so, determining that the interface request is successful and the mock message is successfully stored, otherwise, determining that the interface request is failed and the mock message is unsuccessfully stored. The preset value may be set as needed, for example, 200. That is, if res.status _ code is 200, the interface request is successful, and the mock message is successfully stored; otherwise, the interface request fails, and the mock message fails to be stored.
And calling a storage interface of the loan service system to store the mock message, wherein the step can be realized by the following codes:
in the embodiment of the invention, the transmission parameter of the storage interface is constructed to realize the calling of the storage interface of the loan service system, and the automatic storage of the mock message is realized through the storage interface, so that the automatic loading of the application information can be realized by directly utilizing the mock message which is automatically stored subsequently, and the filling speed of the application information is accelerated.
On the basis of the above embodiment, the determining a mock message according to the head office code number and the application type specifically includes:
determining the mock message based on the head office code number, the application type and a lock _ mock table;
and the lock _ mock table is used for storing the corresponding relation between the code number of the head office of the bank, the application type and the mock message.
Specifically, in the embodiment of the invention, when the mock message is determined, a pre-constructed lock _ mock table is specifically adopted, and the lock _ mock table is pre-stored in a database of the E-Test system. The local _ mock table stores the corresponding relationship among the head _ bank _ code, the application type and the mock message. The structure of the lock _ mock table is specifically shown in table 1.
TABLE 1 local _ mock Table
Name (name) | Data type | Length of | Decimal point | Is not null | Virtualization | Key with a key body | Note |
id | int | 32 | 0 | √ | 1 | Serial number | |
head_bank_code | varchar | 50 | 0 | √ | Code of the head office | ||
type | int | 3 | 0 | √ | Type (B) | ||
mock_data | text | 0 | 0 | √ | |||
desc | text | 0 | 0 | Remarks for note |
And searching the corresponding mock _ data in the local _ mock table through the determined bank head office code number and the obtained application type, namely determining the mock message.
In the embodiment of the invention, the mock message is searched in the pre-constructed local _ mock table by utilizing the code number and the application type of the head office of the bank, so that the determination of the mock message is quicker and more convenient and is easy to realize.
On the basis of the above embodiment, the determining the code number of the head office of the bank based on the head office name of the bank specifically includes:
acquiring a serial number corresponding to the name of the head office of the bank;
determining a head office code number of the bank corresponding to the serial number based on a bank configuration table;
the bank configuration table is used for storing the corresponding relation between the serial number corresponding to the name of the head office of the bank and the code number of the head office of the bank.
Specifically, in the embodiment of the present invention, when the total bank code number of the bank is determined, a bank configuration (bank _ config) table that is constructed in advance is specifically adopted, and the bank _ config table is stored in advance in a database of the E-Test system. The bank _ config table stores a correspondence between a serial number (id) corresponding to a bank head line name and a bank head line code. In the database of the E-Test system, the head office name of each bank has a number for distinguishing the head office names of different banks.
Therefore, the number corresponding to the bank's head office name is first determined. And after triggering the selec control by a tester, dynamically selecting the name of the head bank of the bank from the database of the E-Test system, and automatically determining the number corresponding to the name of the head bank of the bank.
After the number corresponding to the name of the head bank of the bank is determined, the corresponding head _ bank _ code can be searched in the bank _ config table through the number. The specific statements sought may be as follows: select head _ bank _ code from bank _ config where id is 1.
In the embodiment of the invention, the head _ bank _ code is searched in the pre-constructed bank _ config table by using the serial number corresponding to the head bank name of the bank, so that the head _ bank _ code can be determined more quickly and conveniently and is easy to realize.
On the basis of the above embodiment, the key information further includes: applying a corresponding transaction order number by the loan service;
correspondingly, the generating of the association link of the loan service application specifically includes:
and generating the association link based on the transaction order number, the code number of the city and the application type.
Specifically, in the embodiment of the present invention, when the association link of the loan application is generated, the known transaction order number, the code number of the city where the bank is located, and the application type of the loan application may be specifically used for generating, which not only can ensure the uniqueness of the association link, but also simplifies the generation process of the association link.
On the basis of the above embodiment, the generating the association link based on the transaction order number, the code number of the city where the transaction order is located, and the application type specifically includes:
determining a loan service domain name and an interface name;
and splicing the loan service domain name, the interface name, the transaction order number, the code number of the city and the application type to obtain the associated link.
Specifically, the loan service domain name and the interface name may be in a fixed form, for example, the loan service domain name is fixed to "constants. The loan service domain name, the interface name, the transaction order number, the code number (cityID) of the city where the bank is located and the application type of the loan service application are spliced to obtain an association link (application _ url), which can be specifically realized by the following codes:
apply_url=constants.LOAN_OP3_URL+“/bankInfoIndex?businessCode=%s&from=nts&cityID=%s&type=%s”%(business_code,city_id,apply_type)
return apply_ulr
and after the associated link is obtained, displaying the associated link on an interface of the E-Test system, providing a jump function, namely adding a function key for 'jump immediately', and triggering the associated link after the function key is clicked. And when the associated link is triggered, jumping to an application information filling interface, and automatically loading the application information in the mock message for automatic filling. That is, on the interface of the E-Test system, the tester clicks the function key of "jump immediately", directly opens the service application page, and after selecting the head office, branch office, the page will directly display the filled application information, and the tester does not need to fill items by items.
In summary, the joint debugging test method provided in the embodiment of the present invention solves the problem of low efficiency of the tester filling the application information purely manually by automatically triggering the operation of storing the application information; through automatic closing gateway mock switch, solve the tester and forget the inspection, and the inspection is with high costs problem. The effects that the application information filling and the gateway checking are completed within 30 seconds are achieved. A visual web platform is specifically constructed and used for selecting a bank, an application type and a city where the bank is located, and inputting information such as a transaction order number and a branch code. And dynamically matching mock messages according to the configuration of different banks and triggering the storage operation. And detecting whether the gateway service mock switch is closed or not according to the configuration of different banks, and triggering closing operation if the gateway service mock switch is not closed.
As shown in fig. 2, on the basis of the above embodiment, an embodiment of the present invention provides a joint debugging test apparatus, including: the system comprises a key information acquisition module 21, a mock message determination module 22, an application information storage module 23 and an automatic loading module 24. Wherein,
the key information acquisition module 21 is configured to acquire key information required by a loan service application, where the key information includes a head office name and an application type of a bank corresponding to the loan service application;
the mock message determining module 22 is configured to determine a head office code number of the bank based on the head office name of the bank, and determine a mock message according to the head office code number and the application type; the mock message comprises application information corresponding to the loan service application;
the application information storage module 23 is configured to call a storage interface of the loan service system to store the mock message;
the automatic loading module 24 is configured to generate an association link of the loan service application, and automatically load the application information in the mock message when the association link is triggered.
Specifically, the functions of the modules in the joint debugging test apparatus provided in the embodiment of the present invention correspond to the operation flows of the steps in the method embodiments one to one, and the implementation effects are also consistent.
On the basis of the above embodiment, the joint debugging test device further includes: a mock switch automatic control module; the mock switch automatic control module comprises: an identification information determining submodule, a judging submodule and an automatic control submodule. Wherein,
the identification information determining submodule is used for determining the identification information of the bank in the gateway system according to the code number of the head office;
the judging submodule is used for judging whether the gateway system has configuration information corresponding to the bank or not based on the identification information;
and the automatic control sub-module is used for determining that the testing environment of the bank is available and automatically closing a mock switch in the gateway system if the configuration information corresponding to the bank exists in the gateway system.
On the basis of the above embodiment, the automatic control sub-module is further configured to determine that the testing environment of the bank is unavailable if the configuration information corresponding to the bank does not exist in the gateway system, and automatically turn on the mock switch.
On the basis of the above embodiment, the application information storage module specifically includes: the device comprises a transfer function construction submodule, an interface request sending submodule and a receiving submodule. Wherein,
the transfer function constructing submodule is used for constructing the transfer parameters of the storage interface based on the key information and the mock message;
the interface request sending submodule is used for sending an interface request to the storage interface based on the transmission parameter;
and the receiving submodule is used for receiving a return code of the storage interface aiming at the interface request, and if the return code is equal to a preset value, the mock message is determined to be successfully stored.
On the basis of the above embodiment, the mock message determining module is specifically configured to:
determining the mock message based on the head office code number, the application type and a lock _ mock table;
and the lock _ mock table is used for storing the corresponding relation between the code number of the head office of the bank, the application type and the mock message.
On the basis of the above embodiment, the automatic loading module is specifically configured to:
and generating the association link based on the transaction order number, the code number of the city and the application type.
On the basis of the above embodiment, the automatic loading module is specifically configured to:
determining a loan service domain name and an interface name;
and splicing the loan service domain name, the interface name, the transaction order number, the code number of the city and the application type to obtain the associated link.
As shown in fig. 3, on the basis of the above embodiment, an embodiment of the present invention provides an electronic device, including: a processor (processor)301, a memory (memory)302, a communication Interface (Communications Interface)303, and a communication bus 304; wherein,
the processor 301, the memory 302 and the communication interface 303 complete communication with each other through the communication bus 304. The memory 302 stores program instructions executable by the processor 301, and the processor 301 is configured to call the program instructions in the memory 302 to perform the joint debugging test method provided by the above-mentioned embodiments of the methods.
It should be noted that, when being implemented specifically, the electronic device in this embodiment may be a server, a PC, or another device, as long as the structure includes the processor 301, the communication interface 303, the memory 302, and the communication bus 304 shown in fig. 3, where the processor 301, the communication interface 303, and the memory 302 complete mutual communication through the communication bus 304, and the processor 301 may call a logic instruction in the memory 302 to execute the above method. The embodiment does not limit the specific implementation form of the electronic device.
The logic instructions in memory 302 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone article of manufacture. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes 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 method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Further, an embodiment of the present invention discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer is capable of executing the joint debugging testing method provided by the above-mentioned method embodiments.
On the basis of the foregoing embodiments, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to execute the joint debugging test method provided by the foregoing embodiments when executed by a processor.
The above-described embodiments of the apparatus are merely illustrative, and 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A joint debugging test method, comprising:
obtaining key information required by loan service application, wherein the key information comprises a head office name and an application type of a bank corresponding to the loan service application;
determining the code number of the head office of the bank based on the head office name of the bank, and determining a mock message according to the code number of the head office and the application type; the mock message comprises application information corresponding to the loan service application;
calling a storage interface of a loan service system to store the mock message;
and generating a related link of the loan service application, and automatically loading the application information in the mock message when the related link is triggered.
2. The joint debugging test method according to claim 1, further comprising:
determining the identification information of the bank in the gateway system according to the code number of the head office;
judging whether the gateway system has configuration information corresponding to the bank or not based on the identification information;
and if the configuration information corresponding to the bank exists in the gateway system, determining that the testing environment of the bank is available, and automatically closing a mock switch in the gateway system.
3. The joint debugging test method according to claim 2, further comprising:
and if the gateway system does not have the configuration information corresponding to the bank, determining that the testing environment of the bank is unavailable, and automatically starting the mock switch.
4. The joint debugging test method according to claim 1, wherein the step of calling a saving interface of a loan service system to save the mock message specifically comprises:
constructing a transmission parameter of the storage interface based on the key information and the mock message;
sending an interface request to the save interface based on the transfer parameter;
and receiving a return code of the storage interface aiming at the interface request, and if the return code is equal to a preset value, determining that the mock message is successfully stored.
5. The joint debugging test method according to claim 1, wherein the determining a mock message according to the head office code number and the application type specifically comprises:
determining the mock message based on the head office code number, the application type and a lock _ mock table;
and the lock _ mock table is used for storing the corresponding relation between the code number of the head office of the bank, the application type and the mock message.
6. The joint debugging testing method according to any one of claims 1-5, wherein the key information further comprises: applying a corresponding transaction order number by the loan service; accordingly, the number of the first and second electrodes,
the generating of the association link of the loan service application specifically includes:
and generating the association link based on the transaction order number, the code number of the city and the application type.
7. The joint debugging test method according to claim 6, wherein the generating of the association link based on the transaction order number, the code number of the city where the transaction order is located, and the application type specifically comprises:
determining a loan service domain name and an interface name;
and splicing the loan service domain name, the interface name, the transaction order number, the code number of the city and the application type to obtain the associated link.
8. A joint debugging test device, comprising:
the system comprises a key information acquisition module, a loan transaction processing module and a loan transaction processing module, wherein the key information acquisition module is used for acquiring key information required by loan transaction application, and the key information comprises a head office name and an application type of a bank corresponding to the loan transaction application;
the mock message determining module is used for determining the code number of the head office of the bank based on the head office name of the bank and determining the mock message according to the code number of the head office and the application type; the mock message comprises application information corresponding to the loan service application;
the application information storage module is used for calling a storage interface of the loan service system and storing the mock message;
and the automatic loading module is used for generating an association link of the loan service application and automatically loading the application information in the mock message when the association link is triggered.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the joint debugging test method according to any of claims 1-7 when executing the program.
10. A non-transitory computer readable storage medium, having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, realizes the steps of the joint debugging test method according to one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010501380.2A CN111831550A (en) | 2020-06-04 | 2020-06-04 | Joint debugging test method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010501380.2A CN111831550A (en) | 2020-06-04 | 2020-06-04 | Joint debugging test method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111831550A true CN111831550A (en) | 2020-10-27 |
Family
ID=72897935
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010501380.2A Pending CN111831550A (en) | 2020-06-04 | 2020-06-04 | Joint debugging test method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111831550A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113094279A (en) * | 2021-04-25 | 2021-07-09 | 深圳前海微众银行股份有限公司 | Test data construction method, device and system and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018050051A1 (en) * | 2016-09-13 | 2018-03-22 | 深圳中兴飞贷金融科技有限公司 | Loan system utilizing mobile app |
CN108600255A (en) * | 2018-05-07 | 2018-09-28 | 平安普惠企业管理有限公司 | Mock service management method, device, computer equipment and storage medium |
CN110716919A (en) * | 2019-09-23 | 2020-01-21 | 贝壳技术有限公司 | Mock testing method, Mock testing device and storage medium |
-
2020
- 2020-06-04 CN CN202010501380.2A patent/CN111831550A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018050051A1 (en) * | 2016-09-13 | 2018-03-22 | 深圳中兴飞贷金融科技有限公司 | Loan system utilizing mobile app |
CN108600255A (en) * | 2018-05-07 | 2018-09-28 | 平安普惠企业管理有限公司 | Mock service management method, device, computer equipment and storage medium |
CN110716919A (en) * | 2019-09-23 | 2020-01-21 | 贝壳技术有限公司 | Mock testing method, Mock testing device and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113094279A (en) * | 2021-04-25 | 2021-07-09 | 深圳前海微众银行股份有限公司 | Test data construction method, device and system and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111858296B (en) | Interface testing method, device, equipment and storage medium | |
CN108347356B (en) | Multi-protocol unit testing method and device, electronic equipment and storage medium | |
CN111597110B (en) | Page test method and device, electronic equipment and storage medium | |
CN109165017A (en) | Data verification method, device and computer storage medium | |
CN112115337A (en) | Method and device for displaying data, electronic equipment and computer readable storage medium | |
CN105955838A (en) | System halt reason check method and device | |
US20220070280A1 (en) | System for real-time management of session objects and for application programming interface (api) mocking | |
CN111831550A (en) | Joint debugging test method and device | |
CN107291612B (en) | Test method and device | |
CN112561690B (en) | Method, system, equipment and storage medium for testing credit card staged service interface | |
CN108345508B (en) | Interface call testing method and device | |
CN109951549B (en) | Network page access method and device and computer readable storage medium | |
CN111382062B (en) | Joint debugging test method and device for real estate transaction system and external institution business system | |
CN111428463A (en) | Short message processing method and device, electronic equipment and storage medium | |
CN117131545A (en) | Data processing method and device, storage medium and terminal | |
CN110968497A (en) | Tree-shaped interceptor-based request verification method, device, medium and electronic equipment | |
US20220004403A1 (en) | Methods of providing an integrated interface that includes a virtual mobile device | |
CN114691527A (en) | Unit test case generation method, apparatus, device, medium, and program product | |
CN114238352A (en) | Micro-service processing method and related device | |
US20220058192A1 (en) | Request orchestration | |
CN112181802A (en) | Test method and device | |
CN110011894B (en) | Barrage message simulation method and device | |
CN114428723A (en) | Test system, system test method, related device and storage medium | |
CN109542919A (en) | A kind of method and system of uniform data verifying | |
CN117389904A (en) | Page test method and device, computer storage medium and electronic equipment |
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 |