CN103019931B - The check processing method and apparatus of Asn.1 interface - Google Patents

The check processing method and apparatus of Asn.1 interface Download PDF

Info

Publication number
CN103019931B
CN103019931B CN201210486662.5A CN201210486662A CN103019931B CN 103019931 B CN103019931 B CN 103019931B CN 201210486662 A CN201210486662 A CN 201210486662A CN 103019931 B CN103019931 B CN 103019931B
Authority
CN
China
Prior art keywords
response
asn
interface
server
expression formula
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.)
Active
Application number
CN201210486662.5A
Other languages
Chinese (zh)
Other versions
CN103019931A (en
Inventor
谢青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210486662.5A priority Critical patent/CN103019931B/en
Publication of CN103019931A publication Critical patent/CN103019931A/en
Application granted granted Critical
Publication of CN103019931B publication Critical patent/CN103019931B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present invention provides a kind of check processing method and apparatus of Asn.1 interface, and the method comprises: carry out a feature operation to an Asn.1 interface of the management software that first server is loaded, obtaining request structure and response structure body; By the parameter value in amendment appealing structure body, obtain multiple text request scripts that this Asn.1 interface is corresponding; Repeat said process, obtain the text request script that each Asn.1 interface is corresponding; From first server, back up out database, generate corresponding expression formula according to each response structure body and be stored in text request script; Database and each text request script are returned in second server; In second server, generate request message and response message according to each text request script and be issued to tested process, obtaining response; The content of application expression formula to response verifies, and to complete the detection to Asn.1 interface, thus solves problems of the prior art.

Description

The check processing method and apparatus of Asn.1 interface
Technical field
The embodiment of the present invention relates to computer technology, particularly relates to a kind of check processing method and apparatus of Asn.1 interface.
Background technology
In large-scale management software, a general large software is made up of a lot of process, a process provides some ASN 1 (AbstractSyntaxNotationOne, referred to as Asn.1) interface, therefore, when testing this software, need to verify whether the Asn.1 interface that each process provides can normally work.In prior art, mainly through providing a test code for each ASN.1 interface, but also provide an XML script for each function scene that each Asn.1 interface is corresponding, then each test code and corresponding each XML script are combined the detection generating each test request and come each Asn.1 interface, if the rreturn value of test is identical with the rreturn value of expection, then illustrate that Asn.1 interface is normal operating conditions.
Realizing in process of the present invention, inventor finds in prior art, each Asn.1 interface is all different, and function scene corresponding to each Asn.1 interface is also different, correspondingly, each test code is all different with each XML script, therefore, need grand in each test code to enumerate and enumerated value numeral one_to_one corresponding in corresponding each XML script, generate each test request to complete the detection of ASN.1 interface, cause detection efficiency low, simultaneously, test code and XML script are dissimilar file, cause the maintenance difficulties of test code and XML script large.
Summary of the invention
The invention provides a kind of check processing method and apparatus of Asn.1 interface, in order to solve the large problem of low and test code and XML script the maintenance difficulties of detection efficiency in prior art.
On the one hand, the embodiment of the present invention provides a kind of check processing method of Asn.1 interface, comprising:
A feature operation is carried out to an Asn.1 interface of the management software that first server is loaded, from output journal, obtains appealing structure body and the response structure body of the printing of described Asn.1 interface; By the parameter value in amendment described request structure, text request script corresponding under obtaining multiple different scene; Repeat said process, text request script corresponding under obtaining the multiple different scene of each Asn.1 interface of described management software;
From described first server, backing up out the database for storing configuration data under working environment, generating corresponding expression formula according to each described response structure body and being also stored in described text request script; Described database and each described text request script are returned in the second server being mounted with described management software; Described first server and described second server have identical working environment;
In described second server, generate request message and response message according to each described text request script and be issued to tested process, obtaining corresponding response;
Apply the content of described expression formula to described response to verify, to complete the detection to described Asn.1 interface.
In conjunction with on the one hand, in the first mode in the cards on the one hand, describedly generate request and response message according to each described text request script and be issued to tested process, the response obtaining correspondence comprises:
Apply the parameter value automatic filling described request message in described text request script;
Described request message and empty response message are issued to tested process;
Obtain described response, and the Content Transformation of described response is become character string structure form.
In conjunction with one side or the first mode in the cards on the one hand, in the mode in the cards of the second on the one hand, the content of the described expression formula of described application to described response verifies, and comprises the detection of described Asn.1 interface to complete:
Apply the content of described expression formula to described response to verify, if the content of described response is consistent with described expression formula, then detect successfully; If inconsistent, then detect failure, and the content of described response is outputted in the result file; Carry out the verification of all or part of described expression formula successively.
On the other hand, the embodiment of the present invention provides a kind of check processing device of Asn.1 interface, comprising:
Acquisition module, for carrying out a feature operation to an Asn.1 interface of the management software that first server is loaded, obtains appealing structure body and the response structure body of described Asn.1 interface printing from output journal; By the parameter value in amendment described request structure, text request script corresponding under obtaining multiple different scene; Repeat said process, text request script corresponding under obtaining the multiple different scene of each Asn.1 interface of described management software;
First processing module, for backing up out the database for storing configuration data under working environment from described first server, generating corresponding expression formula according to each described response structure body and being also stored in described text request script; Described database and each described text request script are returned in the second server being mounted with described management software; Described first server and described second server have identical working environment;
Second processing module, in described second server, generates request message and response message according to each described text request script and is issued to tested process, obtaining corresponding response;
Detection module, verifies for applying the content of described expression formula to described response, to complete the detection to described Asn.1 interface.
In conjunction with on the other hand, in the first mode in the cards on the other hand, described second processing module specifically for:
Apply the parameter value automatic filling described request message in described text request script;
Described request message and empty response message are issued to tested process;
Obtain described response, and the Content Transformation of described response is become character string structure form.
In conjunction with on the other hand or in the first mode in the cards on the other hand, described detection module specifically for:
Verifying for applying the content of described expression formula to described response, if the content of described response is consistent with described expression formula, then detecting successfully; If inconsistent, then detect failure, and the content of described response outputs in the result file; Carry out the verification of all or part of described expression formula successively.
The check processing method and apparatus of Asn.1 interface provided by the invention, by by from first server obtain text request script corresponding under the multiple different scene of each Asn.1 interface of management software and be used for storing working environment under the database of configuration data, return to and be mounted with in the second server of management software, make first server and second server have identical working environment; Then, in second server, generate request message and response message according to each text request script and be issued to tested process, obtaining corresponding response; The content of application expression formula to response verifies, to complete the detection to Asn.1 interface.Under there is identical working environment in second server and first server, the request message generated by each text request script under the different scenes of each Asn.1 interface has carried out the detection to Asn.1 interface, improve detection efficiency, simultaneously, do not need for different Asn.1 interfaces provides different test codes, and simple to each text request script maintenance process.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the check processing embodiment of the method one of Asn.1 interface of the present invention;
Fig. 2 is the process flow diagram of the check processing embodiment of the method two of Asn.1 interface of the present invention;
Fig. 3 is the structural representation of the check processing device embodiment one of Asn.1 interface of the present invention.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the process flow diagram of the check processing embodiment of the method one of Asn.1 interface of the present invention, and as shown in Figure 1, the method for the present embodiment can comprise:
Step 101, a feature operation is carried out to an Asn.1 interface of the management software that first server is loaded, from output journal, obtain appealing structure body and response structure body that Asn.1 interface prints; By the parameter value in amendment appealing structure body, text request script corresponding under obtaining multiple different scene.
In the present embodiment, tested management software is loaded in first server, then a feature operation such as query function etc. is carried out to an Asn.1 interface of this management reason software, due to all relevant informations about this time feature operation can be recorded in output journal, therefore, the appealing structure body that Asn.1 interface prints can be obtained from output journal, the response structure that Asn.1 interface prints can also be obtained from output journal simultaneously, then this appealing structure body is generated a text request script, text request script correspond to a scene of this Asn.1 interface, because this Asn.1 interface can comprise multiple scene, the text request script of the correspondence of each scene is all not identical, therefore, in order to obtain this Asn.1 interface different scenes under corresponding text request script, can with the text request script obtained in this output journal for template, the parameter value of appealing structure body in amendment text request script, also revise the expression formula in text request script simultaneously, thus text request script corresponding under the multiple scene of this Asn.1 interface can be obtained.
It should be noted that, the appealing structure body transmitted by Asn.1 interface and response structure body all meet Asn.1 structure, and wherein, Asn.1 structure is one to start and the nested tree structure body terminated with bracket, this Asn.1 structure is consistent with prior art, repeats no more herein.
Step 102, repetition said process, text request script corresponding under obtaining the multiple different scene of each Asn.1 interface of management software.
In the present embodiment, repeat the process of step 101, namely, after text request script corresponding under the multiple different scene of acquisition Asn.1 interface, to obtain text request script corresponding under the multiple different scene of other Asn.1 interface, then other each Asn.1 interface all performs step 101 accordingly, thus text request script corresponding under the multiple different scene of each Asn.1 interface of this management software can be obtained.
Step 103, from first server, backing up out database for storing configuration data under working environment, generating corresponding expression formula according to each response structure body and being also stored in text request script.
In the present embodiment, back up for the database storing configuration data under working environment from this first server of loading this management software, obtain the database of this backup.The response structure body that each Asn.1 interface prints can also be obtained from output journal simultaneously, for an Asn.1 interface, expression formula is generated according to response structure body, namely this appealing structure body correspond to this expression formula, and this expression formula is also expected results that this request correspond to, wherein this expression formula can comprise at least one expression formula, according to the parameter of this appealing structure body of amendment, the correlation parameter in this expression formula can be revised accordingly, thus the expression formula that the request under multiple scene that can obtain correspond to, and each expression formula is stored in corresponding text request script, now, each text request script comprises appealing structure body and corresponding expression formula.Wherein, expression formula can be:
EXPECTED_TRUE(AsnRsp.trailDetailInfoList.size()==3);
EXPECTED_TRUE(AsnRsp.trailDetailInfoList[0].trailname.comp(“EPL”)==1);
EXPECTED_TRUE(AsnRsp.trailDetailInfoList[0].trailed>0);
EXPECTED_TRUE(AsnRsp.trailDeteailInfoList[0].alarmstatus==255)。This expression formula comprises four expression formulas, it should be noted that, above-mentioned expression formula is illustratively, and the present invention is not as limit.
Step 104, database and each text request script returned to be mounted with in the second server of management software; First server and second server have identical working environment.
In the present embodiment, the database of this obtained backup and all text request scripts are returned to the second server being mounted with this management software, after the database of this backup and each text request script are downloaded to this second server, be then the database of this backup by the database recovery of second server, thus configuration data is identical with first server under making the working environment of second server database purchase, thus make first server and second server have identical working environment, wherein, working environment comprises software environment and hardware environment, due to the environment that software environment is a dynamic change, namely in different servers, software environment is different, therefore, in order to make second server and first server, there is identical working environment, the software environment of second server also should be reverted to the software environment of first server, and hardware environment comprises the connection of hardware device, hardware device position residing in the server and each hardware device, therefore also needs the hardware environment in first server to be transplanted in second server.
Step 105, in second server, generate request message and response message according to each text request script and be issued to tested process, obtaining corresponding response.
In the present embodiment, database recovery in second server is after the database backing up out from first server, again each text request script is generated each request message and response message, it should be noted that, a text request script can generate a request message and a response message, wherein, response message can be the message of acquisition request response.Then each request message generated and response message are issued in tested process, wherein, this tested process is for providing the tested process of Asn.1 interface (the Asn.1 interface that namely each text request script is corresponding), after tested process receives each request message, according to the working environment (namely recovering the working environment after the database backed up) in second server and each response message, generate the response that each request message is corresponding, thus response corresponding to each text request script can be obtained from tested process.
Step 106, the content of application expression formula to response verify, to complete the detection to Asn.1 interface.
In the present embodiment, owing to storing corresponding expression formula in each text request script, and each text request script has corresponding response, then the content of the expression formula stored in applicating text request script to response corresponding to text request script verifies, thus completes the detection of Asn.1 interface.If the content verifying a response is identical with corresponding expression formula, then illustrate that Asn.1 interface can normally work under this scene, accordingly, if the expression formula of content all with corresponding verifying all responses corresponding to Asn.1 interface is identical, then illustrate that this Asn.1 interface can normally work.
The check processing method of the Asn.1 interface that the embodiment of the present invention one provides, by by from first server obtain text request script corresponding under the multiple different scene of each Asn.1 interface of management software and be used for storing working environment under the database of configuration data, return to and be mounted with in the second server of management software, make first server and second server have identical working environment; Then, in second server, generate request message and response message according to each text request script and be issued to tested process, obtaining corresponding response; The content of application expression formula to response verifies, to complete the detection to Asn.1 interface.Under there is identical working environment in second server and first server, the request message generated by each text request script under the different scenes of each Asn.1 interface has carried out the detection to Asn.1 interface, improve detection efficiency, simultaneously, do not need for different Asn.1 interfaces provides different test codes, and simple to each text request script maintenance process.
Fig. 2 is the process flow diagram of the check processing embodiment of the method two of Asn.1 interface of the present invention, and as shown in Figure 2, the method for the present embodiment can comprise:
Step 201, a feature operation is carried out to an Asn.1 interface of the management software that first server is loaded, from output journal, obtain appealing structure body and response structure body that Asn.1 interface prints; By the parameter value in amendment appealing structure body, text request script corresponding under obtaining multiple different scene.
Step 202, repetition said process, text request script corresponding under obtaining the multiple different scene of each Asn.1 interface of management software.
Step 203, from first server, backing up out database for storing configuration data under working environment, generating corresponding expression formula according to each response structure body and being also stored in text request script.
Step 204, database and each text request script returned to be mounted with in the second server of management software; First server and second server have identical working environment.
In the present embodiment, the specific implementation process of step 201 ~ step 204 is consistent with the specific implementation process of step 101 ~ step 104 in the embodiment of the present invention one, see the record in above-described embodiment, can repeat no more in detail herein.
Step 205, in second server, the parameter value automatic filling request message in applicating text request script.
In the present embodiment, database recovery in second server is after the database backing up out from first server, by the parameter value automatic filling request message in applicating text request script, wherein, can realize the parameter value automatic filling request message in applicating text request script by FillAsn1Req function, particularly, according to reqstructstring obtain applicating text request script corresponding be which Asn.1 interface, namely request type corresponding to Asn.1 interface is obtained, then each field in text request script is traveled through, content according to reqstructring fills request type corresponding to text request script with the mapping relations that field name is identical, thus generation request message.
Step 206, the response message of request message and sky is issued to tested process.
In the present embodiment, after step 205 generates request message, then generate the response message that each request message is corresponding, this response message is empty response message, for the response that this request message of acquisition request is corresponding.Then request message and empty response message are issued to tested process, wherein, by SendAsn1Msg function, request message and empty response message can be issued to tested process.
Step 207, acquisition response, and the Content Transformation of response is become character string structure form.
In the present embodiment, tested process is for providing the tested process of above-mentioned each Asn.1 interface (the Asn.1 interface that namely each text request script is corresponding), after tested process receives each request message, according to the response message of the working environment (i.e. the database of this backup) in second server and each sky, generate the response that each request message is corresponding, thus response corresponding to each text request script can be obtained from tested process, further, also obtained response is converted to character string structure form.
Step 208, the content of application expression formula to response verify, if the content of response is consistent with expression formula, then detect successfully; If inconsistent, then detect failure, and the content of response is outputted in the result file; Carry out the verification of all or part of expression formula successively.
In the present embodiment, apply the content of expression formula to response stored in each text request script to verify, particularly, can be verified the response converting character string structure form to by this expression formula of CheckRsp function application, particularly, Asn.1 interface can be applied under a scene corresponding expression formula with obtain the content responded and verify, if the content of response is consistent with expression formula, then illustrate the detection success of this Asn.1 interface under this scene, by that analogy, this Asn.1 interface can be applied under different scene corresponding expression formula to verify with the content of the response obtained, if the content of response is consistent with expression formula, detection success to this Asn.1 interface is then described.If content and the expression formula of response are inconsistent, then detect failure, Asn.1 interface cisco unity malfunction is described, then the content of the response corresponding to detecting unsuccessfully is outputted in the result file.
In addition, all or part of expression formula can be applied successively verify, due to response content corresponding to expression formula can comprise at least one expression formula, so in checking procedure, an expression formula can be applied verify, also can apply whole expression formulas and verify.It should be noted that, can also only verify interested critical field in the content of response, instead of the content of whole response is all verified, such as, ID of trace route path (IDentity in response contents, be called for short ID), creation-time etc., only can verify its value and meet a certain condition (being such as greater than 0) and be and detect successfully.
It should be noted that, step 204 ~ step 208 can be realized by software, and the process of the correspondence realized by software is:
In addition, the present embodiment is when testing multiple Asn.1 interface, can also by response contents that previous Asn.1 interface the is fed back padding data as request message corresponding to next Asn.1 interface, such as: before the information in all paths of inquiry, need the ID list inquiring about all paths, then could obtain the ID in all paths according to the ID list in all paths, then inquire about the routing information in each path according to the ID in all paths.
The check processing method of the Asn.1 interface that the embodiment of the present invention two provides, by by from first server obtain text request script corresponding under the multiple different scene of each Asn.1 interface of management software and be used for storing working environment under the database of configuration data, return to and be mounted with in the second server of management software, make first server and second server have identical working environment; In second server, the parameter value automatic filling request message in applicating text request script; Request message and empty response message are issued to tested process; Obtain response, and the Content Transformation of response is become character string structure form; The content of application expression formula to response verifies, if the content of response is consistent with expression formula, then detects successfully; If inconsistent, then detect failure, and the content of response is outputted in the result file; Carry out the verification of all or part of expression formula successively.Under there is identical working environment in second server and first server, the request message generated by each text request script under the different scenes of each Asn.1 interface has carried out the detection to Asn.1 interface, improve detection efficiency, simultaneously, do not need for different Asn.1 interfaces provides different test codes, and simple to each text request script maintenance process.
Especially exemplified by example, the above embodiment of the present invention is described in detail below: two the Asn.1 interfaces supposing the tested process needing checking one management software, first Asn.1 interface is route searching interface, second Asn.1 interface is the interface of query path, wherein, the scene that this route searching interface is corresponding is full search and incremental search, and the scene that the interface of this query path is corresponding is inquire about the path concrete with inquiry one, all paths.First a feature operation (namely carrying out full search) is carried out to first Asn.1 interface of the management software that first server is loaded, a feature operation (path that namely inquiry one is concrete) is carried out to second Asn.1 interface, then from output journal, obtain appealing structure body and the response structure body of first Asn.1 interface printing, appealing structure body and the response structure body of second Asn.1 interface printing can also be obtained from output journal.It should be noted that the database also needing to back up and back up out from first server for storing configuration data under working environment.
First Asn.1 interface: the appealing structure body printed by first Asn.1 interface generates full search text request script, and this full search text request script can be:
Meanwhile, also the response structure body printed according to this Asn.1 interface is generated expression formula, wherein, this response structure body is not shown, and the expression formula that this full search is corresponding is:
EXPECTED_TRUE(AsnEtherSearchTrailRsp.listofEtherTrailID.size()==20);
EXPECTED_TRUE(AsnEtherSearchTrailRsp.listofEtherTrailID[0]>0);
Then generated expression formula is stored in full search text request script, full search text request script is now:
Because the searchStrategy that full search is corresponding is 27, and searchStrategy corresponding to incremental search is 23, therefore, can modify to parameter value corresponding in full search text request script request structure, according to the amendment of this parameter value, can the be corresponding expression formula that text request script stores also be modified, thus incremental search text request script can be obtained, this incremental search text request script can be:
By said process, text request script corresponding under the different scenes of first Asn.1 interface can be obtained.
2nd Asn.1 interface: the path request script that the appealing structure body generated query one article second Asn.1 interface printed is concrete, the concrete Path text request script of this inquiry one can be:
Meanwhile, also the response structure body that prints according to this Asn.1 interface is generated expression formula, wherein, this response structure body is not shown, and expression formula corresponding to this inquiry concrete path is:
Then generated expression formula is stored in the concrete Path text request script of inquiry one, the concrete Path text request script of inquiry now is:
Because the parameter value inquiring about concrete path corresponding is AsnIntListSEQUENCEOFINTEGER'583'H, and ID list is that empty parameter value corresponding to all paths of inquiring about is for empty, therefore, can modify to parameter corresponding in the concrete Path text request script request structure of inquiry one, according to the amendment of this parameter, can the be corresponding expression formula that text request script stores also be modified, thus ID list can be obtained for all Path text request scripts of empty inquiry, this ID list for all Path text request scripts of empty inquiry can be:
By said process, text request script corresponding under the different scenes of second Asn.1 interface can be obtained.
After text request script corresponding under the different scenes of acquisition first Asn.1 interface and the 2nd Asn.1 interface, the database of backup and above-mentioned each text request script are returned to and is mounted with in the second server of management software; First server and second server have identical working environment.In second server, according to the AsnEtherSearchTrailReq in full search text request script and incremental search text request script can know these two text request scripts corresponding be route searching interface, thus parameter value in application full search text request script and incremental search text request script respectively automatic filling be the request message that route searching interface is corresponding, then request message and empty response message are handed down to tested process; Simultaneously according to the concrete Path text request script of inquiry one and ID be AsnEtherGetTailInfoReq in all Path text request scripts of empty inquiry can know these two text request scripts corresponding be query path interface, thus the concrete Path text request script of application query one and ID be all Path text request scripts of empty inquiry respectively automatic filling be the request message that query path interface is corresponding, then request message and empty response message are handed down to tested process.
Then can obtain four responses from tested process, and be character string structure form by the Content Transformation of each response, then apply the content of each expression formula to each response and verify, detailed process can be:
First Asn.1 interface is detected: the AsnEtherSearchTrailRsp.listofEtherTrailID.size () in application full search text request script and the content of AsnEtherSearchTrailRsp.listofEtherTrailID [0] to corresponding response in this full search text request script verify, if check results is respectively 20, when being greater than 0, then the detection success that text request script is corresponding.AsnEtherSearchTrailRsp.listofEtherTrailID.size (), AsnEtherSearchTrailRsp.listofEtherTrailID [0] content to corresponding response in application incremental search text request script verifies, if check results is respectively 10, when being greater than 0, then the detection success that incremental search text request script is corresponding.
Thus can determine that first Asn.1 interface detects successfully.
Second Asn.1 interface is detected: the content of the AsnEtherGetTrailInfoRsp.trailDetailInfoList.size () in the Path text request script that application query one is concrete and AsnEtherGetTrailInfoRsp.trailDetailInfoList [0] .trailname.compare (" EPL ") in text request script to corresponding response verifies, if when check results is respectively 1,1, then the detection success that the Path text request script that inquiry one is concrete is corresponding.Application ID list is that the content of the AsnEtherGetTrailInfoRsp.trailDetailInfoList.size () in all Path text request scripts of empty inquiry and AsnEtherGetTrailInfoRsp.trailDetailInfoList [0] .trailname.compare (" EPL ") in text request script to corresponding response verifies, if when check results is respectively 1,1, then ID list is the detection success that all Path text request scripts of empty inquiry are corresponding.Thus can determine that second Asn.1 interface detects successfully.
Further, can also be after a restore database, repeat to issue repeatedly request message and response message, namely text request script can be the list of an appealing structure body and expression formula, issues request message and the content verifying the response returned in order respectively.Such as can accomplish that first query path is restarted and search for query path again, namely, first can issue request message corresponding to the concrete Path text request script of inquiry one to tested carrying out, issue the request message that full search text request script is corresponding again, and then to issue ID list be the request message etc. that all Path text request scripts of empty inquiry are corresponding.
Further, various embodiments of the present invention provide database recovery function, therefore can also do the action of some Update Tables, such as, delete a paths, then verify number of paths and are reduced one.Therefore can also be the database of backup by the database recovery in second server when issuing next request message to tested process, so delete a paths can not have influence on response corresponding to next request message, therefore, impact can not be there is each other.
Large software (comprising enterprise-level telesoftware) generally all can use Asn.1 interface as interactive interface in realization, Asn.1 interface causes data configuration when testing authentication because of software and logic scene complexity, expected results checking is all very difficult, certain input is done in early stage by the above embodiment of the present invention, complete basic function design, the rreturn value verification that the data of all use Asn.1 interfaces are driven piles fast and responded can be supported, newly test code need not be write when reaching newly-increased scene in existing Asn.1 interface, only need amendment to the parameter value in appealing structure body corresponding to this Asn.1 interface and corresponding expression formula, text request script corresponding under can obtaining this newly-increased scene, therefore, only need a small amount of work, this is to the concrete extraordinary accumulative effect of large software, text request script can infinitely be inherited, newly-increased text request script is very easy and convenient.
TDD (Test-DrivenDevelopment is being by the above embodiment of the present invention, be called for short TDD), OneTrack, agile developments etc. have can accomplish quick left-hand seat, and to the nucleus module of unit testing, Core Feature, emphasis scene can rapid Covers.On long terms, enterprise-level large software can obtain good close beta checking and test code covers, and make under less input, the quality of software has greatly improved.
Fig. 3 is the structural representation of the check processing device embodiment one of Asn.1 interface of the present invention, as shown in Figure 3, the device of the present embodiment can comprise: acquisition module 11, first processing module 12, second processing module 13 and detection module 14, wherein, acquisition module 11, for carrying out a feature operation to an Asn.1 interface of the management software that first server is loaded, obtains appealing structure body and the response structure body of Asn.1 interface printing from output journal; By the parameter value in amendment appealing structure body, text request script corresponding under obtaining multiple different scene; Repeat said process, text request script corresponding under obtaining the multiple different scene of each Asn.1 interface of management software.First processing module 12, for backing up out the database for storing configuration data under working environment from first server, generating corresponding expression formula according to each response structure body and being also stored in text request script; Database and each text request script being returned to is mounted with in the second server of management software; First server and second server have identical working environment.Second processing module 13, in second server, generates request message and response message according to each text request script and is issued to tested process, obtaining corresponding response.Detection module 14 verifies for applying the content of expression formula to response, to complete the detection to Asn.1 interface.
The device of the present embodiment, may be used for the technical scheme performing embodiment of the method shown in Fig. 1, it realizes principle and technique effect is similar, see the record in above-described embodiment, can repeat no more in detail herein.
In the embodiment two of the check processing device of Asn.1 interface of the present invention, the device of the present embodiment is on the basis of Fig. 3 shown device structure, and the second above-mentioned processing module 13 is specifically for parameter value automatic filling request message in applicating text request script; Request message and empty response message are issued to tested process; Obtain response, and the Content Transformation of response is become character string structure form.
Further, above-mentioned detection module 14 specifically for: for apply expression formula to response content verify, if response content consistent with expression formula, then detect successfully; If inconsistent, then detect failure, and the content of response outputs in the result file; Carry out the verification of all or part of expression formula successively.
The device of the present embodiment, may be used for the technical scheme performing embodiment of the method shown in Fig. 2, it realizes principle and technique effect is similar, see the record in above-described embodiment, can repeat no more in detail herein.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (6)

1. a check processing method for Asn.1 interface, is characterized in that, comprising:
A feature operation is carried out to an Asn.1 interface of the management software that first server is loaded, from output journal, obtains appealing structure body and the response structure body of the printing of described Asn.1 interface; By the parameter value in amendment described request structure, text request script corresponding under obtaining multiple different scene; Repeat said process, text request script corresponding under obtaining the multiple different scene of each Asn.1 interface of described management software;
From described first server, backing up out the database for storing configuration data under working environment, generating corresponding expression formula according to each described response structure body and being also stored in described text request script; Described database and each described text request script are returned in the second server being mounted with described management software; Described first server and described second server have identical working environment;
In described second server, generate request message and response message according to each described text request script and be issued to tested process, obtaining corresponding response;
In described second server, apply the content of described expression formula to described response and verify, to complete the detection to described Asn.1 interface.
2. method according to claim 1, is characterized in that, describedly generates request and response message according to each described text request script and is issued to tested process, and the response obtaining correspondence comprises:
Apply the parameter value automatic filling described request message in described text request script;
Described request message and empty response message are issued to tested process;
Obtain described response, and the Content Transformation of described response is become character string structure form.
3. method according to claim 1 and 2, is characterized in that, the content of the described expression formula of described application to described response verifies, and comprises the detection of described Asn.1 interface to complete:
Apply the content of described expression formula to described response to verify, if the content of described response is consistent with described expression formula, then detect successfully; If inconsistent, then detect failure, and the content of described response is outputted in the result file; Carry out the verification of all or part of described expression formula successively.
4. a check processing device for Asn.1 interface, is characterized in that, comprising:
Acquisition module, for carrying out a feature operation to an Asn.1 interface of the management software that first server is loaded, obtains appealing structure body and the response structure body of described Asn.1 interface printing from output journal; By the parameter value in amendment described request structure, text request script corresponding under obtaining multiple different scene; Repeat said process, text request script corresponding under obtaining the multiple different scene of each Asn.1 interface of described management software;
First processing module, for backing up out the database for storing configuration data under working environment from described first server, generating corresponding expression formula according to each described response structure body and being also stored in described text request script; Described database and each described text request script are returned in the second server being mounted with described management software; Described first server and described second server have identical working environment;
Second processing module, in described second server, generates request message and response message according to each described text request script and is issued to tested process, obtaining corresponding response;
Detection module, verifies for applying the content of described expression formula to described response in described second server, to complete the detection to described Asn.1 interface.
5. device according to claim 4, is characterized in that, described second processing module specifically for:
Apply the parameter value automatic filling described request message in described text request script;
Described request message and empty response message are issued to tested process;
Obtain described response, and the Content Transformation of described response is become character string structure form.
6. the device according to claim 4 or 5, is characterized in that, described detection module specifically for:
Verifying for applying the content of described expression formula to described response, if the content of described response is consistent with described expression formula, then detecting successfully; If inconsistent, then detect failure, and the content of described response outputs in the result file; Carry out the verification of all or part of described expression formula successively.
CN201210486662.5A 2012-11-26 2012-11-26 The check processing method and apparatus of Asn.1 interface Active CN103019931B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210486662.5A CN103019931B (en) 2012-11-26 2012-11-26 The check processing method and apparatus of Asn.1 interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210486662.5A CN103019931B (en) 2012-11-26 2012-11-26 The check processing method and apparatus of Asn.1 interface

Publications (2)

Publication Number Publication Date
CN103019931A CN103019931A (en) 2013-04-03
CN103019931B true CN103019931B (en) 2015-12-02

Family

ID=47968556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210486662.5A Active CN103019931B (en) 2012-11-26 2012-11-26 The check processing method and apparatus of Asn.1 interface

Country Status (1)

Country Link
CN (1) CN103019931B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714860B (en) * 2013-12-16 2018-04-10 航天信息股份有限公司 A kind of cipher key backup device of invoice
CN105446825B (en) * 2014-06-12 2020-08-11 阿里巴巴集团控股有限公司 Database testing method and device
CN104516794B (en) * 2014-12-12 2017-11-14 国家电网公司 Backup method, the apparatus and system of database file
CN111309584B (en) * 2018-12-11 2024-02-23 迈普通信技术股份有限公司 Data processing method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1641601A (en) * 2004-01-04 2005-07-20 华为技术有限公司 Software unit measuring method
CN1845514A (en) * 2005-04-07 2006-10-11 华为技术有限公司 Software module testing method
CN102096631A (en) * 2009-12-11 2011-06-15 华为技术有限公司 Interface testing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1641601A (en) * 2004-01-04 2005-07-20 华为技术有限公司 Software unit measuring method
CN1845514A (en) * 2005-04-07 2006-10-11 华为技术有限公司 Software module testing method
CN102096631A (en) * 2009-12-11 2011-06-15 华为技术有限公司 Interface testing method and device

Also Published As

Publication number Publication date
CN103019931A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CN110309071B (en) Test code generation method and module, and test method and system
CN109614568B (en) Page generation method and device
US8151247B2 (en) Test data management
CN104077217B (en) The compiling dissemination method and system of code file
CN108572823B (en) Front-end and back-end development management method and system based on interface engine
CN102591654B (en) A kind of code generator based on SSH framework and method
US20110289489A1 (en) Concurrent cross browser testing
CN103019931B (en) The check processing method and apparatus of Asn.1 interface
CN104657274B (en) software interface test method and device
CN108923997B (en) Cloud service node automatic testing method and device based on python
CN112181854B (en) Method, device, equipment and storage medium for generating process automation script
CN107729031A (en) Code administration method, apparatus, computer equipment and computer-readable recording medium
CN114281680B (en) Web automatic testing method and system
CN104750463B (en) A kind of developing plug method and system
CN108460068A (en) Method, apparatus, storage medium and the terminal that report imports and exports
CN110865806B (en) Code processing method, device, server and storage medium
US20130339798A1 (en) Methods for automated software testing and devices thereof
CN104252413A (en) Automatic script generation method, device and system
CN104598374A (en) Failure script correcting method and equipment
CN111949537A (en) Interface test method, device, equipment and medium
KR100969877B1 (en) Test automating system
CN112181407B (en) Service realization processing method, device, system, electronic equipment and storage medium
CN112306498A (en) Code generation method, ERP system and readable storage medium
CN113656301A (en) Interface testing method, device, equipment and storage medium
CN107085553B (en) Input box testing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210423

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right