CN105302728B - The method of testing and device of SAP interfaces - Google Patents

The method of testing and device of SAP interfaces Download PDF

Info

Publication number
CN105302728B
CN105302728B CN201510850270.6A CN201510850270A CN105302728B CN 105302728 B CN105302728 B CN 105302728B CN 201510850270 A CN201510850270 A CN 201510850270A CN 105302728 B CN105302728 B CN 105302728B
Authority
CN
China
Prior art keywords
structure type
title
input domain
data
domain
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
CN201510850270.6A
Other languages
Chinese (zh)
Other versions
CN105302728A (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.)
China Minsheng Banking Corp Ltd
Original Assignee
China Minsheng Banking Corp 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 China Minsheng Banking Corp Ltd filed Critical China Minsheng Banking Corp Ltd
Priority to CN201510850270.6A priority Critical patent/CN105302728B/en
Publication of CN105302728A publication Critical patent/CN105302728A/en
Application granted granted Critical
Publication of CN105302728B publication Critical patent/CN105302728B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention provides a kind of method of testing and device of SAP interfaces, this method includes creating the header line of test cases storage file using the input domain title of preset format according to SAP interface documents;Foundation SAP interface documents, create multiple data rows of test cases storage file, and each data row of test cases storage file includes the data of input and connects the first default separator and/or the 3rd default separator of the data inputted;Header line and all data row writes are entered into test cases storage file, to obtain test cases storage file;Header line and every group of data row are read from test cases storage file;The function according to corresponding to header line and every group of data row create SAP interfaces;Judge the structure type of each input domain in the header line of test cases storage file, the corresponding data in data row is assigned to by input domain to preset assignment method accordingly according to the structure type of each input domain;SAP interfaces are called.

Description

The method of testing and device of SAP interfaces
Technical field
The present embodiments relate to technical field of measurement and test, more particularly to a kind of method of testing and device of SAP interfaces.
Background technology
It is by SAP that system, which is applied with product (System Applications and Products, abbreviation SAP) interface, The product of company's exploitation.It is the ERP software that the current whole world ranks the first.SAP function includes:Product cost, project meeting Meter, analysis of making a profit, inquiry quotation, order management etc..User uses SAP product, is exactly to carry out far call to SAP interfaces. In order to ensure that the SAP interfaces called are perfect, it is necessary to test SAP interfaces.
In the prior art, the calling method, system for the SAP interfaces completed to the calling of SAP interfaces using exploitation, so to SAP The test of interface calls method, system to realize dependent on SAP.Existing SAP interface interchanges are directed to a set of program of each interface exploitation, open Degree of raising difficult questions is big, difficult in maintenance.Method, system is called only to call limited long-range SAP interface due to specific, so can not realize Test to SAP full dose interfaces;The test of a variety of input conditions is also difficult to each interface.
The content of the invention
The embodiment of the present invention provides a kind of method of testing and device of SAP interfaces, simplifies the method for calling of SAP interfaces, SAP interfaces are called using the character string of prescribed form as input, total interface, which calls, shares same set of program, without for each The a set of program of interface exploitation, the input data of character string forms cause test cases to be easy to create, manage and safeguard.
The embodiment of the present invention provides a kind of method of testing of SAP interfaces, including:
The header line of test cases storage file is created using the input domain title of preset format according to SAP interface documents; The input domain title of the preset format includes:Atomic structure type input field title and/or structure structure type input domain Title and/or table structure type input domain title, the header line are connected by the title of all input domains with the first default separator Connect and form;
Foundation SAP interface documents, create multiple data rows of the test cases storage file, the test cases storage Each data row of file is pre- including the data inputted and the first default separator of the data of the connection input and/or the 3rd If separator;
The header line and all data row writes are entered into test cases storage file, to obtain test cases storage text Part;
Header line and data row are read from the test cases storage file;
The function according to corresponding to the header line and data row create SAP interfaces;
The structure type of each input domain in the header line of the test cases storage file is judged, according to each input Corresponding data in the data row is assigned to input domain by the structure type in domain to preset assignment method accordingly;It is described default Assignment method is:Atomic structure type input field assignment method and/or structure structure type input domain assignment method and/or table Structure type input domain assignment method;
The SAP interfaces are called.
The embodiment of the present invention provides a kind of test device of SAP interfaces, including:
Header line creation module, for creating test case using the input domain title of preset format according to SAP interface documents The header line of example storage file;The input domain title of the preset format includes:Atomic structure type input field title and/or knot Structure body structure type input domain title and/or table structure type input domain title, the header line by all input domains title It is formed by connecting with the first default separator;
Data row creation module, for according to SAP interface documents, creating multiple data of the test cases storage file OK, the first of the data of data and the connection input of each data row of the test cases storage file including input is pre- If separator and/or the 3rd default separator;
Writing module, for the header line and all data row writes to be entered into test cases storage file, to be surveyed Try case storage file;
Read module, for reading header line and data row from the test cases storage file;
Function creation module, for the function according to corresponding to the header line and data row establishment SAP interfaces;
Assignment module, the structure class of each input domain in header line for judging the test cases storage file Type, the corresponding data in the data row is assigned to presetting assignment method accordingly according to the structure type of each input domain Input domain;The default assignment method is:Atomic structure type input field assignment method and/or structure structure type input domain Assignment method and/or table structure type input domain assignment method;
Calling module, for being called to the SAP interfaces.
The embodiment of the present invention provides a kind of method of testing and device of SAP interfaces, and this method passes through according to SAP interfaces text Shelves create the header line of test cases storage file using the input domain title of preset format;The input domain title bag of preset format Include:Atomic structure type input field title and/or structure structure type input domain title and/or table structure type input domain mark Topic, header line are formed by connecting by the title of all input domains with the first default separator;According to SAP interface documents, test is created Multiple data rows of case storage file, each data row of test cases storage file include data and the connection input of input Data the first default separator and/or the 3rd default separator;Header line and all data row writes are entered into test cases Storage file, to obtain test cases storage file;Header line and data row are read from test cases storage file;According to mark Topic row and data row create function corresponding to SAP interfaces;Judge each input domain in the header line of test cases storage file Structure type, according to the structure type of each input domain with accordingly preset assignment method by data row corresponding data assign It is worth to input domain;Default assignment method is:Atomic structure type input field assignment method and/or structure structure type input domain Assignment method and/or table structure type input domain assignment method;SAP interfaces are called.Simplify the called side of SAP interfaces Formula, SAP interfaces are called using the character string of prescribed form as input, total interface, which calls, shares same set of program, without for The a set of program of each interface exploitation, the input data of character string forms cause test cases to be easy to create, manage and safeguard.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the flow chart of the method for testing embodiment one of SAP interfaces of the present invention;
Fig. 2 is the flow chart that table structure type input domain title is generated in the embodiment one of the inventive method;
Fig. 3 be the inventive method embodiment one in the flow chart of table structure type input domain assignment;
Fig. 4 is the structural representation of the test device embodiment one of SAP interfaces of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is the flow chart of the method for testing embodiment one of SAP interfaces of the present invention, as shown in figure 1, this method includes:
Step 101, test cases storage file is created using the input domain title of preset format according to SAP interface documents Header line.
Wherein, the input domain title of preset format includes:Atomic structure type input field title and/or structure structure class Type input domain title and/or table structure type input domain title, header line is preset by the title of all input domains with first to be separated Symbol is formed by connecting.
In the present embodiment, the first default separator can be " | ", or except the second default separator and the 3rd is preset Other separators outside separator, do not limit in the present embodiment.
Specifically, atomic structure type input field title is included if creating the header line of test cases storage file, Creating atomic structure type input field title is specially:Atomic structure type mark is represented with the input domain title of atomic structure type Topic.
If creating the header line of test cases storage file includes the title of structure structure type input domain, create The title of structure structure type input domain is specially:
Structure structure type input domain is represented using the complete trails title of each member of structure structure type input domain The title of each member;The complete trails title of each member is all using drawing near for structure input domain title and member Level member Name is spliced with the second default separator;The title of each member is connected with the first default separator, shape Into structure structure type input domain title.
Wherein, the second default separator can be " ", or except the first default separator and the 3rd default separator Other outer separators, do not limit in the present embodiment.
The title of above described structure structure type one member of input domain can be expressed as:" structure structure type inputs The title of the nearest one-level members of name ... of the name intermediate level member of the farthest level member of domain name ".
If creating the header line of test cases storage file includes table structure type input domain title, table structure is created Type input field title specifically includes the following steps, and Fig. 2 is to generate table structure type in the embodiment one of the inventive method The flow chart of input domain title, as shown in Fig. 2 establishment table structure type input domain title concretely comprises the following steps:
Step 201, the title of the member of the structure structure type corresponding to the row of table structure type is obtained.
In the present embodiment, the member for the structure that the row of table structure type includes is n, then the table structure type obtained The title of the member of structure structure type corresponding to row is respectively the name of the member 1 of the corresponding structure structure type of row Claim, the title ... of the member 2 of the corresponding structure structure type of row, the member n's of the corresponding structure structure type of row Title.
Step 202, the title of the member of all structure structure types is connected with the 3rd default separator, and before most Structure structure type member title front end and last structure structure type member title rear end use First default bracket has included.
In the present embodiment, the 3rd default separator can be ", ", or except the first default separator and second is preset Other outside separator preset separators, are not limited in the present embodiment.First default bracket can be " { } ", or go out Second presets other brackets of bracket, is not limited in the present embodiment.
Specifically, by after step 202, being embodied as:" { the name of the member 1 of the corresponding structure structure type of row Claim, the title ... of the member 2 of the corresponding structure structure type of row, the member n's of the corresponding structure structure type of row Title } ";
Step 203, table structure type input domain title is added in the front end of the left bracket of the first default bracket, and in table knot Structure type input field title front end and the rear end of the first default bracket right parenthesis have been included using the second default bracket.
Specifically, it is by table knot in the front end addition table structure type input domain title of the left bracket of the first default bracket Structure type input field title is placed in beginning.Then it is embodied as:" table structure type input domain title { the corresponding structure of row The title of the member 1 of structure type, the title ... of the member 2 of the corresponding structure structure type of row, the corresponding structure of row The member n of body structure type title } ".
Wherein, the second default bracket can be " [] ", or other brackets in addition to the first default bracket, this implementation Do not limited in example.
In the present embodiment, in table structure type input domain title front end and the rear end of the first default bracket right parenthesis using the After two default brackets have included, it is embodied as:" [table structure type input domain title be { the corresponding structure structure type of row The title of member 1, the title ... of the member 2 of the corresponding structure structure type of row, the corresponding structure structure type of row Member n title] ".
In the present embodiment, for example, the input of SAP interfaces has three input domains, it is specially:
First input domain is atomic structure type input field:Param1;Second input domain is structure structure type Input domain:Structure1, Structure1 include member:Field1,Field2;3rd input domain is that table structure type is defeated Enter domain:The row TableRow, TableRow that Table1, Table1 include structure structure type include member Field1, Field2.The entitled Param1 of the first input domain then created, the entitled Structure1.Field1 of the second input domain | Structure1.Field2, entitled [Table1 { Field1, the Field2 }] of the 3rd input domain.Pass through the first default separation After symbol connection, the title behavior of whole interface input domain:Param1| Structure1.Field1|Structure1.Field2 |[Table1{Field1,Field2}]。
Step 102, according to SAP interface documents, multiple data rows of establishment test cases storage file, test cases storage Each data row of file includes the data of input and the first default separator of the data of connection input and/or the 3rd default point Every symbol.
In the present embodiment, the data of input include:Data corresponding to atomic structure type input field and/or structure structure Data corresponding to data corresponding to type input field and/or table structure type input domain.
In the present embodiment, if not including data corresponding to table structure type input domain in data row, the number of input is connected According to default separator be the first default separator, if not only having included the bag again of data corresponding to table structure type input domain in data row Data corresponding to data corresponding to atomic structure type input field and/or structure structure type input domain are included, then presets and separates Symbol includes the first default separator and the 3rd default separator.First default separator is used to connect atomic structure type input field Data corresponding to corresponding data and/or structure structure type input domain.
Wherein, the data of table structure type input domain, by the data of all rows of the 3rd default separator connection table.Table Every a line data as the member data of the structure structure type corresponding to the row of table with the 3rd default separator connection and Into.
For example, continuation of the previous cases, atomic structure type input field Param1 data are " 11 ", and structure structure type is defeated The member Field1 data for entering domain Structure1 are " SAP ", and member Field2 data are " abc ", then structure structure type Inputting numeric field data is:SAP|abc.Table structure type input domain is by two row data, the structure structure type of the first row TableRow member Field1 data are " a1 ", and member Field2 data are " b1 ", the structure structure type of the second row TableRow member Field1 data are " a2 ", and member Field2 data are " b2 ", then table structure type input domain number According to for a1, b1, a2, b2.Whole data behavior:11|SAP|abc|a1,b1,a2,b2.
Step 103, header line and all data row writes are entered into test cases storage file, to obtain test cases storage File.
Continue above-mentioned example, two row data rows, i.e., the test case of two test cases are included in test cases storage file Example storage file content can be:
Param1|Structure1.Field1|Structure1.Field2|[Table1{Field1,Field2}]
11|SAP|abc|a1,b1,a2,b2
12|SAP|def|x1,y1,x2,y2
Step 104, header line and data row are read from test cases storage file.
Step 105, the function according to corresponding to header line and data row create SAP interfaces.
For example, interface name is func1, IRfcFunction function= Repository.CreateFunction (" func1 "), wherein repository are the connection letter of server where long-range SAP Breath.
Step 106, the structure type of each input domain in the header line of test cases storage file is judged, according to each Corresponding data in data row is assigned to input domain by the structure type of input domain to preset assignment method accordingly.
Wherein, default assignment method is:Atomic structure type input field assignment method and/or the input of structure structure type Domain assignment method and/or table structure type input domain assignment method.
Further, however, it is determined that the header line of test cases storage file includes input domain for the defeated of atomic structure type Enter domain, then according to the input domain of atomic structure type with atomic structure type input field assignment method by the corresponding number in data row Specifically included according to input domain is assigned to:
Using program assembly, the data type of the input domain of atomic structure type is obtained, the data of character type are converted into After corresponding data type, the data of atomic structure type input field are assigned to input domain.
Specifically, using program assembly, the metadata of the input domain of atomic structure type is obtained, is obtained from metadata former The data type of the input domain of minor structure type, after the data of character type are converted into corresponding data type, by atom knot The data of structure type input field are assigned to input domain.
For example, Param1 data are 11.Using SAPNCo components, Param1 data type is obtained: Function [" Param1 "] .Metadata.DataType, this data type are integer, so first turning " 11 " before assignment Integer is turned to, assignment method is:function.SetValue("Param1",Convert.ToInt32("11")).
If it is determined that the header line of test cases storage file includes the input domain that input domain is structure structure type, then According to the input domain of structure structure type with structure structure type input domain assignment method by the corresponding data in data row Input domain is assigned to specifically include:
According to the title of the input domain of structure structure type, drawing for structure structure type is obtained from respective function With determining the data type of each member of structure structure type, the data of structure structure type input domain be assigned to The corresponding member of structure structure type.
For example, from title Structure1.Field1 | Structure1.Field2 obtains structure inputs domain name Claim Structure1, the reference function.GetStructure (" Structure1 ") of structure is obtained from function, is sentenced The person of being broken into Field1, Field2 data type are all character string type, to Field1, Field2 assignment: Function.GetStructure (" Structure1 ") .SetValue (" Field1 ", " SAP "), function.GetStructure("Structure1").SetValue("Field1","abc")。
If it is determined that the header line of test cases storage file includes the input domain that input domain is table structure type, then basis Corresponding data in data row is assigned to input domain by table structure type with table structure type input domain assignment method can specifically divide For following steps, Fig. 3 be the inventive method embodiment one in the flow chart of table structure type input domain assignment, such as scheme Shown in 3, table structure type input domain assignment concretely comprises the following steps:
Step 301, table structure type input domain enantiomorph structure type is obtained according to the title of table structure type Membership.
In the present embodiment, the membership of table structure type input domain enantiomorph structure type is expressed as x.Continue Upper example, table structure type input domain is entitled [Table1 { Field1, Field2 }], and the membership of corresponding structure is x =2.
Step 302, according to the group number of the data of membership's computational chart structure type input domain of structure structure type.
In the present embodiment, table structure type input numeric field data is a1, b1, a2, b2, by the input numeric field data of table structure type It is divided into y groups, y is equal to the sum divided by x of table structure type input numeric field data.Y=4/2=2.The first group of table structure class then obtained The data of type input domain are that the data of a1, b1, the second groups of table structure type input domains are a2, b2.
Step 303, for the data of every group of table structure type input domain, a line is created for table structure type, and by every group The data of table structure type input domain are assigned to the member of row enantiomorph structure type.
For example, create a line, IRfcStructure row1=function.GetTable (" for table Table1 ") .Append () is its assignment: row1.SetValue("Field1","a1");row1.SetValue(" Field2","b1").The assignment mode of second group of data is similar, and this is no longer going to repeat them.
Step 107, SAP interfaces are called.
For example, interface interchange method is:function.Invoke().
The method of testing for the SAP interfaces that the present embodiment provides, including:According to SAP interface documents using the defeated of preset format Enter the header line that domain title creates test cases storage file;The input domain title of preset format includes:Atomic structure type is defeated Enter domain title and/or structure structure type input domain title and/or table structure type input domain title, header line is by all defeated The title for entering domain is formed by connecting with the first default separator;According to SAP interface documents, the multiple of test cases storage file are created Data row, each data row of test cases storage file include first default point of the data of input and the data of connection input Every symbol and the 3rd default separator;Header line and all data row writes are entered into test cases storage file, to obtain test case Example storage file;Header line and data row are read from test cases storage file;SAP is created according to header line and data row to connect Function corresponding to mouthful;The structure type of each input domain in the header line of test cases storage file is judged, according to each defeated Corresponding data in data row is assigned to input domain by the structure type for entering domain to preset assignment method accordingly;Default assignment side Method is:Atomic structure type input field assignment method and/or structure structure type input domain assignment method and/or table structure class Type input domain assignment method;SAP interfaces are called.The method of calling of SAP interfaces is simplified, with the character of prescribed form Go here and there to input to call SAP interfaces, total interface, which calls, shares same set of program, without for a set of journey of each interface exploitation Sequence, the input data of character string forms cause test cases to be easy to create, manage and safeguard.
The specific embodiment of the method for the corresponding present invention, the present invention also propose a kind of test device of SAP interfaces.Fig. 4 is The structural representation of the test device embodiment one of SAP interfaces of the present invention, as shown in figure 4, the survey of SAP interfaces provided by the invention Trial assembly put including:Header line creation module 401, data row creation module 402, writing module 403, read module 404, function wound Model block 405, assignment module 406, calling module 407.
Wherein, header line creation module 401, for being created according to SAP interface documents using the input domain title of preset format Build the header line of test cases storage file;The input domain title of preset format includes:Atomic structure type input field title and/ Or structure structure type input domain title and/or table structure type input domain title, header line by all input domains title It is formed by connecting with the first default separator.Data row creation module 402, for according to SAP interface documents, creating test cases and depositing Multiple data rows of file are stored up, each data row of test cases storage file includes the data of input and the data of connection input The first default separator and/or the 3rd default separator.Writing module 403, for by header line and all data row writes Enter test cases storage file, to obtain test cases storage file.Read module 404, for from test cases storage file Middle reading header line and data row.Function creation module 405, corresponding to creating SAP interfaces according to header line and data row Function.Assignment module 406, the structure type of each input domain in header line for judging test cases storage file, root The corresponding data in data row is assigned to input domain to preset assignment method accordingly according to the structure type of each input domain;In advance If assignment method is:Atomic structure type input field assignment method and/or structure structure type input domain assignment method and/or Table structure type input domain assignment method.Calling module 407, for being called to SAP interfaces.
The test device for the SAP interfaces that the present embodiment is provided can perform the technical scheme of embodiment of the method shown in Fig. 1, Its implementing principle and technical effect is similar, and here is omitted.
Further, atomic structure type input field title is included if creating the header line of test cases storage file, Then header line creation module 401, is specifically used for:Atomic structure category title is represented with the input domain title of atomic structure type.
Further, if the header line for creating test cases storage file includes the mark of structure structure type input domain Topic, then header line creation module 401, is specifically used for:Using the complete trails title of each member of structure structure type input domain Represent the title of each member of structure structure type input domain;The complete trails title of each member uses structure structure type All level member Names to draw near of input domain title and member are spliced with the second default separator;Will each into The title of member is connected with the first default separator, forms structure structure type input domain title.
Further, table structure type input domain title is included if creating the header line of test cases storage file, Header line creation module 401, is specifically used for:Obtain the name of the member of the structure structure type corresponding to the row of table structure type Claim;The title of the member of all structure structure types is connected with the 3rd default separator, and in most preceding structure structure The title rear end of the member of the front end of the title of the member of type and last structure structure type is using the first default bracket Include;Table structure type input domain title is added in the front end of the left bracket of the first default bracket, and is inputted in table structure type Domain name claims front end and the rear end of the first default bracket right parenthesis to be included using the second default bracket.
Further, however, it is determined that the header line of test cases storage file includes input domain for the defeated of atomic structure type Enter domain, then assignment module 406, is specifically used for:Using program assembly, the data type of the input domain of atomic structure type is obtained, After the data of character type are converted into corresponding data type, the data of atomic structure type input field are assigned to input Domain.
Further, however, it is determined that the header line of test cases storage file includes input domain for structure structure type Input domain, then assignment module 406, is specifically used for:According to the title of the input domain of structure structure type, obtained from respective function The reference of structure structure type is taken, determines the data type of each member of structure structure type, by structure structure class The data of type input domain are assigned to the corresponding member of structure structure type.
Further, however, it is determined that the header line of test cases storage file includes the input that input domain is table structure type Domain, then assignment module 406, is specifically used for:Table structure type input domain enantiomorph is obtained according to the title of table structure type The membership of structure type;According to the group of the data of membership's computational chart structure type input domain of structure structure type Number;For the data of every group of table structure type input domain, a line is created for table structure type, and every group of table structure type is inputted The data in domain are assigned to the member of structure structure type corresponding to row.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to The technical scheme described in foregoing embodiments can so be modified, either which part or all technical characteristic are entered Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology The scope of scheme.

Claims (14)

  1. A kind of 1. method of testing of SAP interfaces, it is characterised in that including:
    The header line of test cases storage file is created using the title of the input domain of preset format according to SAP interface documents;Institute Stating the title of the input domain of preset format includes:Atomic structure type input field title and/or structure structure type input domain Title and/or table structure type input domain title, the header line are connected by the title of all input domains with the first default separator Connect and form;
    Foundation SAP interface documents, create multiple data rows of the test cases storage file, the test cases storage file Each data row include the data of input and the first default separator of the data of the connection input and/or the 3rd default point Every symbol;
    The header line and all data row writes are entered into test cases storage file, to obtain test cases storage file;
    Header line and data row are read from the test cases storage file;
    The function according to corresponding to the header line and data row create SAP interfaces;
    The structure type of each input domain in the header line of the test cases storage file is judged, according to each input domain Corresponding data in the data row is assigned to input domain by structure type to preset assignment method accordingly;The default assignment Method is:Atomic structure type input field assignment method and/or structure structure type input domain assignment method and/or table structure Type input field assignment method;
    The SAP interfaces are called.
  2. 2. according to the method for claim 1, it is characterised in that include if creating the header line of test cases storage file Atomic structure type input field title, then creating the atomic structure type input field title is specially:
    Atomic structure category title is represented with the input domain title of atomic structure type.
  3. 3. according to the method for claim 1, it is characterised in that include if creating the header line of test cases storage file The title of structure structure type input domain, the then title for creating the structure structure type input domain are specially:
    The structure structure type input domain is represented using the complete trails title of each member of structure structure type input domain The title of each member;The complete trails title of each member uses structure structure type input domain title and the member All level member Names to draw near be spliced with the second default separator;
    The title of each member is connected with the first default separator, forms the structure structure type input domain mark Topic.
  4. 4. according to the method for claim 1, it is characterised in that include if creating the header line of test cases storage file Table structure type input domain title, then create the table structure type input domain title and specifically include:
    Obtain the title of the member of the structure structure type corresponding to the row of the table structure type;
    The title of the member of all structure structure types is connected with the 3rd default separator, and in most preceding structure The title rear end of the member of the front end of the title of the member of structure type and last structure structure type is default using first Bracket has included;
    Table structure type input domain title is added in the front end of the left bracket of the first default bracket, and in table structure type input domain Title front end and the rear end of the first default bracket right parenthesis have been included using the second default bracket.
  5. 5. according to the method for claim 4, it is characterised in that if it is determined that the header line of test cases storage file includes Input domain is the input domain of atomic structure type, then is assigned according to the input domain of atomic structure type with atomic structure type input field Corresponding data in data row is assigned to input domain and specifically included by value method:
    Using program assembly, the data type of the input domain of atomic structure type is obtained, the data of character type are converted into correspondingly Data type after, the data of atomic structure type input field are assigned to input domain.
  6. 6. according to the method for claim 5, it is characterised in that if it is determined that the header line of test cases storage file includes Input domain is the input domain of structure structure type, then defeated with structure structure type according to the input domain of structure structure type Enter domain assignment method the corresponding data in data row be assigned into input domain to specifically include:
    According to the title of the input domain of structure structure type, the reference of structure structure type is obtained from respective function, really The data of structure structure type input domain are assigned to knot by the data type of each member of the fixed structure structure type The corresponding member of structure body structure type.
  7. 7. according to the method for claim 6, it is characterised in that if it is determined that the header line of test cases storage file includes Input domain is the input domain of table structure type, then according to the table structure type with table structure type input domain assignment method by number Input domain is assigned to according to the corresponding data in row to specifically include:
    The membership of table structure type input domain enantiomorph structure type is obtained according to the title of table structure type;
    According to the group number of the data of membership's computational chart structure type input domain of structure structure type;
    For the data of every group of table structure type input domain, a line is created for table structure type, and every group of table structure type is defeated The data for entering domain are assigned to the member of structure structure type corresponding to row.
  8. A kind of 8. test device of SAP interfaces, it is characterised in that including:
    Header line creation module, for creating test cases using the title of the input domain of preset format according to SAP interface documents The header line of storage file;The title of the input domain of the preset format includes:Atomic structure type input field title and/or knot Structure body structure type input domain title and/or table structure type input domain title, the header line by all input domains title It is formed by connecting with the first default separator;
    Data row creation module, for according to SAP interface documents, creating multiple data rows of the test cases storage file, The first of the data of data and the connection input of each data row of the test cases storage file including input is default Separator and/or the 3rd default separator;
    Writing module, for the header line and all data row writes to be entered into test cases storage file, to obtain test case Example storage file;
    Read module, for reading header line and data row from the test cases storage file;
    Function creation module, for the function according to corresponding to the header line and data row establishment SAP interfaces;
    Assignment module, the structure type of each input domain in header line for judging the test cases storage file, root The corresponding data in the data row is assigned to input to preset assignment method accordingly according to the structure type of each input domain Domain;The default assignment method is:Atomic structure type input field assignment method and/or structure structure type input domain assignment Method and/or table structure type input domain assignment method;
    Calling module, for being called to the SAP interfaces.
  9. 9. device according to claim 8, it is characterised in that include if creating the header line of test cases storage file Atomic structure type input field title, then the header line creation module, is specifically used for:
    Atomic structure category title is represented with the input domain title of atomic structure type.
  10. 10. device according to claim 8, it is characterised in that if being wrapped in the header line of establishment test cases storage file The title of structure structure type input domain is included, then the header line creation module, is specifically used for:
    The structure structure type input domain is represented using the complete trails title of each member of structure structure type input domain The title of each member;The complete trails title of each member uses structure structure type input domain title and the member All level member Names to draw near be spliced with the second default separator;By the title of each member with the One default separator connection, forms the structure structure type input domain title.
  11. 11. device according to claim 8, it is characterised in that if being wrapped in the header line of establishment test cases storage file Table structure type input domain title is included, then the header line creation module, is specifically used for:
    Obtain the title of the member of the structure structure type corresponding to the row of the table structure type;By all structures The title of the member of structure type is connected with the 3rd default separator, and the title of the member in most preceding structure structure type Front end and the title rear end of member of last structure structure type included using the first default bracket;Preset and include first Number left bracket front end addition table structure type input domain title, it is and pre- in table structure type input domain title front end and first If the rear end of bracket right parenthesis has been included using the second default bracket.
  12. 12. device according to claim 11, it is characterised in that if it is determined that being wrapped in the header line of test cases storage file The input domain that input domain is atomic structure type is included, then the assignment module, is specifically used for:
    Using program assembly, the data type of the input domain of atomic structure type is obtained, the data of character type are converted into correspondingly Data type after, the data of atomic structure type input field are assigned to input domain.
  13. 13. device according to claim 12, it is characterised in that if it is determined that being wrapped in the header line of test cases storage file The input domain that input domain is structure structure type is included, then the assignment module, is specifically used for:
    According to the title of the input domain of structure structure type, the reference of structure structure type is obtained from respective function, really The data of structure structure type input domain are assigned to knot by the data type of each member of the fixed structure structure type The corresponding member of structure body structure type.
  14. 14. device according to claim 13, it is characterised in that if it is determined that being wrapped in the header line of test cases storage file The input domain that input domain is table structure type is included, then assignment module, is specifically used for:
    The membership of table structure type input domain enantiomorph structure type is obtained according to the title of table structure type;According to The group number of the data of membership's computational chart structure type input domain of structure structure type;It is defeated for every group of table structure type Enter the data in domain, create a line for table structure type, and the data of every group of table structure type input domain are assigned to corresponding to row The member of structure structure type.
CN201510850270.6A 2015-11-27 2015-11-27 The method of testing and device of SAP interfaces Active CN105302728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510850270.6A CN105302728B (en) 2015-11-27 2015-11-27 The method of testing and device of SAP interfaces

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510850270.6A CN105302728B (en) 2015-11-27 2015-11-27 The method of testing and device of SAP interfaces

Publications (2)

Publication Number Publication Date
CN105302728A CN105302728A (en) 2016-02-03
CN105302728B true CN105302728B (en) 2018-03-23

Family

ID=55200017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510850270.6A Active CN105302728B (en) 2015-11-27 2015-11-27 The method of testing and device of SAP interfaces

Country Status (1)

Country Link
CN (1) CN105302728B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556269B (en) * 2021-07-29 2023-04-28 中国电力科学研究院有限公司 SAP client performance test method, system, electronic equipment and storage medium
CN115146604B (en) * 2022-07-01 2023-06-13 广州高专资讯科技有限公司 Method, device, equipment and storage medium for generating interface technical document

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7620939B2 (en) * 2005-04-04 2009-11-17 Parasoft Corporation Automatic configuration of regression test controls
WO2011080709A2 (en) * 2009-12-29 2011-07-07 Limont Group Inc. Shop floor interaction center
CN103116508A (en) * 2013-01-18 2013-05-22 浙江吉利汽车研究院有限公司杭州分公司 Universal interface and implement method of service access point (SAP) system
CN103631713A (en) * 2013-11-04 2014-03-12 中安消技术有限公司 ERP software automated testing system and method
CN103744991A (en) * 2014-01-21 2014-04-23 国家电网公司 Method for XML-based data transmission between SAP systems

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030158767A1 (en) * 2001-12-28 2003-08-21 Nwafor John I. Method and system for adaptive software system interface and external database synchronization
US8584100B2 (en) * 2009-12-10 2013-11-12 Sap Ag Bridging code changes and testing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7620939B2 (en) * 2005-04-04 2009-11-17 Parasoft Corporation Automatic configuration of regression test controls
WO2011080709A2 (en) * 2009-12-29 2011-07-07 Limont Group Inc. Shop floor interaction center
CN103116508A (en) * 2013-01-18 2013-05-22 浙江吉利汽车研究院有限公司杭州分公司 Universal interface and implement method of service access point (SAP) system
CN103631713A (en) * 2013-11-04 2014-03-12 中安消技术有限公司 ERP software automated testing system and method
CN103744991A (en) * 2014-01-21 2014-04-23 国家电网公司 Method for XML-based data transmission between SAP systems

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SAP接口技术研究与实现;刘洋;《中国优秀硕士学位论文全文数据库》;20090531;1-76页 *
中国人寿业务系统与SAP ERP数据接口系统的设计与数据分析;浦勇;《中国优秀硕士学位论文全文数据库》;20130504;1-58页 *

Also Published As

Publication number Publication date
CN105302728A (en) 2016-02-03

Similar Documents

Publication Publication Date Title
CN103218288B (en) Information Authentication
CN104484216B (en) Service interface document and on-line testing instrument generation method, device
US7283988B1 (en) Code generator for a distributed processing system
US20090006472A1 (en) Automatic Designation of XBRL Taxonomy Tags
CN108921295A (en) A kind of emergency event Emergency decision model building method of knowledge based graphical spectrum technology
US8219523B2 (en) Data quality enrichment integration and evaluation system
WO2010139226A1 (en) Service component and application software development method and system based on the service component
CN108196880A (en) Software project knowledge mapping method for automatically constructing and system
US11106743B2 (en) Binding traits to case nodes
CN107273122A (en) Based on decoupling mechanism can iteration set up operation system method and its terminal
US7685114B2 (en) Systems and methods for mapping text
US10817662B2 (en) Expert system for automation, data collection, validation and managed storage without programming and without deployment
CN108845942A (en) Product feature management method, device, system and storage medium
CN106294299A (en) A kind of report form generation method and device
US10924551B2 (en) IRC-Infoid data standardization for use in a plurality of mobile applications
CN107612833A (en) A kind of URI method for routing and relevant apparatus based on storage system
CN109002470A (en) Knowledge mapping construction method and device, client
CN111694547A (en) Automatic coding data processing application design tool based on data state change
CN105302728B (en) The method of testing and device of SAP interfaces
CN110188132A (en) A kind of method for interchanging data and system
CN105488014A (en) Generating method and device of interface test case message in XML format
US10505873B2 (en) Streamlining end-to-end flow of business-to-business integration processes
CN110109675A (en) Intelligent contract processing method, device and computer readable storage medium
US20120078967A1 (en) Integration of a Framework Application and a Task Database
CN105426183B (en) A kind of form validation method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant