CN107168864A - Code stream generation method and device - Google Patents
Code stream generation method and device Download PDFInfo
- Publication number
- CN107168864A CN107168864A CN201610130432.3A CN201610130432A CN107168864A CN 107168864 A CN107168864 A CN 107168864A CN 201610130432 A CN201610130432 A CN 201610130432A CN 107168864 A CN107168864 A CN 107168864A
- Authority
- CN
- China
- Prior art keywords
- code stream
- template
- assignment
- code
- generation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of code stream generation method and device, it is related to communication technique field, methods described includes:Code stream template is obtained, the code stream template includes at least one interface field;Assignment is carried out respectively to each interface field in the code stream template;According to the code stream template generation code stream after assignment.The present invention carries out assignment respectively to each interface field in code stream template, according to the code stream template generation code stream after assignment, code stream can be generated as needed, so as to the problem of effectively prevent due to lacking code stream during code tester, code can be tested, the problem of in the presence of quick determination code, shorten the construction cycle of code.
Description
Technical field
The present invention relates to communication technique field, more particularly to a kind of code stream generation method and device.
Background technology
In the engineering of software development of communications industry, either develop, or test, it is required for
Miscellaneous code stream, although these code streams can be obtained by software packet capturing at the scene, but a lot
Software development be that exploitation is leading, that is to say, that by staff after completion code compiling,
Field adjustable can just be removed.
But due to lacking code stream during code tester, so, code can be caused not carry out
Test, and or delayed test (until code stream can acquire normally, code could be entered
Row test), it is impossible to quickly determine and there is problem in code, had a strong impact on the exploitation of code
Cycle.
The content of the invention
In view of the above problems, it is proposed that the present invention overcomes above mentioned problem or extremely to provide one kind
A kind of code stream generation method and device partially solved the above problems.
According to one aspect of the present invention, there is provided a kind of code stream generation method, methods described bag
Include:
Code stream template is obtained, the code stream template includes at least one interface field;
Assignment is carried out respectively to each interface field in the code stream template;
According to the code stream template generation code stream after assignment.
Alternatively, it is described that assignment is carried out respectively to each interface field in the code stream template, enter one
Step includes:
The configuration file after user is set is received, according to the configuration file to the code stream template
In each interface field carry out assignment respectively.
Alternatively, it is described that assignment is carried out respectively to each interface field in the code stream template, enter one
Step includes:
The data input instruction of user is detected, according to the data input instruction to the code stream mould
Each interface field carries out assignment respectively in plate.
Alternatively, after the code stream template generation code stream according to after assignment, methods described is also
Including:
Add identifier in the code stream of generation, the identifier be used to distinguishing destination server and
/ or target interface.
Alternatively, after the code stream template generation code stream according to after assignment, methods described is also
Including:
The code stream of generation is transmitted according to the identifier so that the destination server and
/ or target interface code is tested according to the code stream received.
According to another aspect of the present invention, there is provided a kind of code stream generating means, described device
Including:
Template acquiring unit, for obtaining code stream template, the code stream template includes at least one
Interface field;
Field assignment unit, for being assigned respectively to each interface field in the code stream template
Value;
Stream generation unit, for according to the code stream template generation code stream after assignment.
Alternatively, the field assignment unit, is further used for receiving the configuration after user is set
File, is assigned respectively according to the configuration file to each interface field in the code stream template
Value.
Alternatively, the field assignment unit, is further used for detecting that the data input of user refers to
Order, is assigned respectively according to the data input instruction to each interface field in the code stream template
Value.
Alternatively, described device also includes:
Adding device is identified, for adding identifier in the code stream of generation, the identifier is used
In differentiation destination server and/or target interface.
Alternatively, described device also includes:
Code stream transmitting element, for the code stream of generation to be transmitted according to the identifier, with
The destination server and/or target interface is set to be surveyed according to the code stream received to code
Examination.
The present invention carries out assignment respectively to each interface field in code stream template, according to the code after assignment
Flow template generates code stream, code stream can be generated as needed, so as to effectively prevent due to code
The problem of lacking code stream in test process, code can be tested, it is quick to determine in code
The problems of, shorten the construction cycle of code.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantage and benefit
It will be clear understanding for those of ordinary skill in the art.Accompanying drawing is only used for showing to be preferable to carry out
The purpose of mode, and it is not considered as limitation of the present invention.And in whole accompanying drawing, use
Identical reference symbol represents identical part.In the accompanying drawings:
Fig. 1 is the flow chart of the code stream generation method of one embodiment of the present invention;
Fig. 2 is the flow chart of the code stream generation method of one embodiment of the present invention;
Fig. 3 is the structured flowchart of the code stream generating means of one embodiment of the present invention.
Embodiment
With reference to the accompanying drawings and examples, the embodiment to the present invention makees further detailed
Description.Following examples are used to illustrate the present invention, but are not limited to the scope of the present invention.
It will be appreciated that some code streams, be it is relatively common, for example:The code stream of S10 types
In, include " identification request number of times ", " identification response times " and " identification response overall delay "
In the code stream of information, and LTE base values, include " the up packet loss in community user face "
The code stream of " the descending packet loss in community user face " information, these code streams can showing in product
, obtained by software packet capturing, and preserve into local file.(these code streams, although,
It can be obtained, but be directed to for code by software packet capturing at the scene of product, in many cases,
All it is that exploitation is leading, in engineer according to demand, completes after code compilation, can just go
Field adjustable, so that it is determined that the problem of code.
Certainly, also there are some code streams, be the difficult acquisition of comparison, for example:The code stream of eNB types
In, include:" alien frequencies switches out number of success between eNB " and " alien frequencies switches out standard between eNB
Standby number of success " information, due to needing the cooperation of some special screnes, it is difficult to obtain, so
Test Engineer and Developmental Engineer are needed, according to demand document and the standard hand of communications protocol
It is dynamic to make code stream, and preserve into file, Comparision it is cumbersome.
Fig. 1 is the flow chart of the code stream generation method of one embodiment of the present invention;Reference picture 1,
Methods described includes:
S101:Code stream template is obtained, the code stream template includes at least one interface field;
It will be appreciated that the executive agent of embodiments of the present invention is the clothes for generating code stream
Business device, can also be the other equipment with similar functions certainly, present embodiment is not added with to this
To limit.
It should be noted that the code stream template is the template for generating code stream.
In the specific implementation, due to during code tester, being related to multiple interfaces, such as:
UU, X2, S6a, S10 or S11 interface etc., and interface field needed for every kind of interface is not
It is identical, code stream is generated as needed for ease of user, and the code stream template can be to be connect for a certain
Mouthful code stream template, that is to say, that only related in the code stream template with it is a certain interface related
Interface field, so, a variety of code stream templates may be present, user can be according to self-demand selection pair
The code stream template answered, to obtain code stream template.
Certainly, it is sometimes desirable to which various interfaces are configured, if code stream template is for a certain
The code stream template of individual interface, in addition it is also necessary to which option code flow template is selected respectively successively so that effect
Rate is relatively low, so, the code stream template can be the code stream template for multiple interfaces, that is,
Say, be related in the code stream template and multiple interface related interface fields.
S102:Assignment is carried out respectively to each interface field in the code stream template;
It should be noted that when carrying out assignment respectively to each interface field in the code stream template,
Assignment can be carried out using the numerical value of acquiescence, also assignment can be carried out using the numerical value of storage, it is described to deposit
The numerical value that the numerical value of storage is used when can be for last progress assignment.
It will be appreciated that carrying out assignment respectively to each interface field in the code stream template, may be used also
By the way of user's assignment, that is to say, that the operational order based on user is come to the code stream
Each interface field carries out assignment respectively in template.
In the specific implementation, the operational order based on user can be in several ways come to the code
Each interface field carries out assignment respectively in flow template, below in two ways exemplified by:
First way:The configuration file after user is set is received, according to the configuration file pair
Each interface field carries out assignment respectively in the code stream template.
Which can be divided each interface field in the code stream module by user in configuration file
Numerical value is not set, each interface field institute in the code stream module is identified from the configuration file
The numerical value set respectively, according to the numerical value identified to each interface field in the code stream template point
Assignment is not carried out, and the processes such as numerical identification and assignment are only related to due to during, so, very
Easily realize.
The second way:The data input instruction of user is detected, according to the data input instruction
Assignment is carried out respectively to each interface field in the code stream template.
Which is detected typically by the application program (APP) with interactive function interface and used
The data input instruction at family, by the data input instruction that detects to each in the code stream template
Interface field carries out assignment respectively, it will be understood that, in interactive function interface generally have with
Each interface field distinguishes corresponding data frame in the code stream template, is in the data of data frame
The data input instruction detected, so, data input instruction is that number is write in data frame
According to instruction, interactive function interface can be related to due to during, therefore, the operation of user compared with
To be convenient.
Certainly, it can also come to enter each interface field in the code stream template respectively by other means
Row assignment, present embodiment is not any limitation as to this.
By taking S1-MME interface as an example, its interface field includes at least one in following field:
Certainly, other fields are may also include, present embodiment is not any limitation as to this.
S103:According to the code stream template generation code stream after assignment.
It should be noted that each interface field carries out assignment respectively in the code stream template
Afterwards, you can according to the code stream template generation code stream after assignment.
Present embodiment carries out assignment respectively to each interface field in code stream template, after assignment
Code stream template generation code stream, code stream can be generated as needed, thus effectively prevent due to
The problem of lacking code stream during code tester, code can be tested, quickly determine generation
The problem of in the presence of code, shorten the construction cycle of code.
Fig. 2 is the flow chart of the code stream generation method of one embodiment of the present invention;Reference picture 2,
Methods described includes:
S201:Code stream template is obtained, the code stream template includes at least one interface field;
S202:Assignment is carried out respectively to each interface field in the code stream template;
S203:According to the code stream template generation code stream after assignment;
Step S201~S203 is identical with step S101~S103 of the embodiment shown in Fig. 1,
It will not be repeated here.
S204:Identifier is added in the code stream of generation, the identifier is used to distinguish target clothes
Business device and/or target interface.
It will be appreciated that due to may relate to polytype server in some projects,
By taking NSSP projects as an example, its can be related to it is soft adopt resolution server, it is hard adopt resolution server and
Synthesis server, and these three servers by containing multiple interfaces respectively, for example:UU、
X2, S6a, S10 and S11 interface etc., in the case where there are a variety of servers, generated code
, can be in the code stream of generation after stream, it is understood that there may be in the problem of can not sending, present embodiment
Identifier is added, certainly, the identifier is used to distinguish destination server and/or target interface.
In the specific implementation, the identifier can be determined by user, that is to say, that in user's choosing
Take after destination server and/or target interface, the destination server and/or mesh chosen according to user
Tag splice mouthful determines the identifier.
It should be noted that after the code stream template generation code stream after according to assignment, can be by life
Into code stream be transmitted according to the identifier so that the destination server and/or target
Interface is tested code according to the code stream received.
When the code stream of generation is transmitted according to the identifier, SDTP, FTP can be passed through
, certainly, can also by other means or Web Service are transmitted, present embodiment
This is not any limitation as.
Fig. 3 is the structured flowchart of the code stream generating means of one embodiment of the present invention;Reference picture
3, described device includes:
Template acquiring unit 301, for obtaining code stream template, the code stream template is included at least
One interface field;
Field assignment unit 302, for being carried out respectively to each interface field in the code stream template
Assignment;
Stream generation unit 303, for according to the code stream template generation code stream after assignment.
In a kind of optional embodiment of the present invention, the field assignment unit is further used
In receiving the configuration file after user is set, according to the configuration file in the code stream template
Each interface field carries out assignment respectively.
In a kind of optional embodiment of the present invention, the field assignment unit is further used
In the data input instruction of detection user, according to the data input instruction to the code stream template
In each interface field carry out assignment respectively.
In a kind of optional embodiment of the present invention, described device also includes:
Adding device is identified, for adding identifier in the code stream of generation, the identifier is used
In differentiation destination server and/or target interface.
In a kind of optional embodiment of the present invention, described device also includes:
Code stream transmitting element, for the code stream of generation to be transmitted according to the identifier, with
The destination server and/or target interface is set to be surveyed according to the code stream received to code
Examination.
For device embodiments, because it is substantially similar to method embodiment, so
What is described is fairly simple, and related part illustrates referring to the part of method embodiment.
It should be noted that in all parts of the device of the present invention, to be realized according to it
Function and logical partitioning has been carried out to part therein, still, the present invention is not only restricted to this, can
To be repartitioned or be combined to all parts as needed.
The all parts embodiment of the present invention can realize with hardware, or with one or
The software module run on multiple processors is realized, or is realized with combinations thereof.The present apparatus
In, PC is by realizing internet to equipment or device remote control, accurately control device
Or device is the step of each operate.The present invention is also implemented as described here for performing
Method some or all equipment or program of device (for example, computer program and
Computer program product).Computer-readable Jie can be stored in by being achieved in that the program of the present invention
In matter, and the file or document that program is produced produces data report and cpk with can be statistical
Report etc., can carry out batch testing and count to power amplifier.It should be noted that above-mentioned embodiment
The present invention will be described rather than limits the invention, and those skilled in the art exist
Replacement embodiment can be designed without departing from the scope of the appended claims.In right
It is required that in, any reference symbol between bracket should not be configured to the limit to claim
System.Word "comprising" does not exclude the presence of element or step not listed in the claims.It is located at
Word "a" or "an" before element does not exclude the presence of multiple such elements.This hair
It is bright can be by means of including the hardware of some different elements and by means of properly programmed meter
Calculation machine is realized.In if the unit claim of equipment for drying is listed, if in these devices
Dry can be embodied by same hardware branch.Word first, second, Yi Ji
Third use does not indicate that any order.These words can be construed to title.
Embodiment of above is merely to illustrate the present invention, and not limitation of the present invention, relevant
The those of ordinary skill of technical field, without departing from the spirit and scope of the present invention,
It can also make a variety of changes and modification, therefore all equivalent technical schemes fall within the present invention
Category, scope of patent protection of the invention should be defined by the claims.
Claims (10)
1. a kind of code stream generation method, it is characterised in that methods described includes:
Code stream template is obtained, the code stream template includes at least one interface field;
Assignment is carried out respectively to each interface field in the code stream template;
According to the code stream template generation code stream after assignment.
2. the method as described in claim 1, it is characterised in that described to the code stream mould
Each interface field carries out assignment respectively in plate, further comprises:
The configuration file after user is set is received, according to the configuration file to the code stream template
In each interface field carry out assignment respectively.
3. the method as described in claim 1, it is characterised in that described to the code stream mould
Each interface field carries out assignment respectively in plate, further comprises:
The data input instruction of user is detected, according to the data input instruction to the code stream mould
Each interface field carries out assignment respectively in plate.
4. such as method according to any one of claims 1 to 3, it is characterised in that described
After the code stream template generation code stream after assignment, methods described also includes:
Add identifier in the code stream of generation, the identifier be used to distinguishing destination server and
/ or target interface.
5. method as claimed in claim 4, it is characterised in that it is described according to assignment after
After code stream template generation code stream, methods described also includes:
The code stream of generation is transmitted according to the identifier so that the destination server and
/ or target interface code is tested according to the code stream received.
6. a kind of code stream generating means, it is characterised in that described device includes:
Template acquiring unit, for obtaining code stream template, the code stream template includes at least one
Interface field;
Field assignment unit, for being assigned respectively to each interface field in the code stream template
Value;
Stream generation unit, for according to the code stream template generation code stream after assignment.
7. device as claimed in claim 6, it is characterised in that the field assignment unit,
It is further used for receiving the configuration file after user is set, according to the configuration file to the code
Each interface field carries out assignment respectively in flow template.
8. device as claimed in claim 6, it is characterised in that the field assignment unit,
It is further used for detecting the data input instruction of user, according to the data input instruction to described
Each interface field carries out assignment respectively in code stream template.
9. the device as any one of claim 6~8, it is characterised in that the dress
Putting also includes:
Adding device is identified, for adding identifier in the code stream of generation, the identifier is used
In differentiation destination server and/or target interface.
10. device as claimed in claim 9, it is characterised in that described device also includes:
Code stream transmitting element, for the code stream of generation to be transmitted according to the identifier, with
The destination server and/or target interface is set to be surveyed according to the code stream received to code
Examination.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610130432.3A CN107168864A (en) | 2016-03-08 | 2016-03-08 | Code stream generation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610130432.3A CN107168864A (en) | 2016-03-08 | 2016-03-08 | Code stream generation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107168864A true CN107168864A (en) | 2017-09-15 |
Family
ID=59848656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610130432.3A Pending CN107168864A (en) | 2016-03-08 | 2016-03-08 | Code stream generation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107168864A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109241746A (en) * | 2018-08-29 | 2019-01-18 | 腾讯科技(深圳)有限公司 | Code process method, apparatus calculates equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1858717A (en) * | 2005-05-08 | 2006-11-08 | 中兴通讯股份有限公司 | Data coding and decoding method and its coding and decoding device |
CN101599036A (en) * | 2009-07-30 | 2009-12-09 | 杭州华三通信技术有限公司 | A kind of simulate interruption report fault method and device fast |
CN101901187A (en) * | 2010-07-09 | 2010-12-01 | 北京红旗胜利科技发展有限责任公司 | Decoding program test method and system |
CN102662630A (en) * | 2012-04-24 | 2012-09-12 | 广州市广晟微电子有限公司 | Code generation method |
CN103729287A (en) * | 2012-10-16 | 2014-04-16 | 百度在线网络技术(北京)有限公司 | Testing method and device for front end java script module |
CN103810196A (en) * | 2012-11-09 | 2014-05-21 | 阿里巴巴集团控股有限公司 | Method for testing performance of database on basis of business model |
CN104636254A (en) * | 2015-01-16 | 2015-05-20 | 北京创毅视讯科技有限公司 | Method and device for generating test case, testing method and testing equipment |
CN104778118A (en) * | 2013-12-30 | 2015-07-15 | 深圳键桥通讯技术股份有限公司 | Improvement method for automatic testing technology |
CN105117347A (en) * | 2015-09-24 | 2015-12-02 | 上海爱数软件有限公司 | Test data simulation method and system and automation test method and system |
-
2016
- 2016-03-08 CN CN201610130432.3A patent/CN107168864A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1858717A (en) * | 2005-05-08 | 2006-11-08 | 中兴通讯股份有限公司 | Data coding and decoding method and its coding and decoding device |
CN101599036A (en) * | 2009-07-30 | 2009-12-09 | 杭州华三通信技术有限公司 | A kind of simulate interruption report fault method and device fast |
CN101901187A (en) * | 2010-07-09 | 2010-12-01 | 北京红旗胜利科技发展有限责任公司 | Decoding program test method and system |
CN102662630A (en) * | 2012-04-24 | 2012-09-12 | 广州市广晟微电子有限公司 | Code generation method |
CN103729287A (en) * | 2012-10-16 | 2014-04-16 | 百度在线网络技术(北京)有限公司 | Testing method and device for front end java script module |
CN103810196A (en) * | 2012-11-09 | 2014-05-21 | 阿里巴巴集团控股有限公司 | Method for testing performance of database on basis of business model |
CN104778118A (en) * | 2013-12-30 | 2015-07-15 | 深圳键桥通讯技术股份有限公司 | Improvement method for automatic testing technology |
CN104636254A (en) * | 2015-01-16 | 2015-05-20 | 北京创毅视讯科技有限公司 | Method and device for generating test case, testing method and testing equipment |
CN105117347A (en) * | 2015-09-24 | 2015-12-02 | 上海爱数软件有限公司 | Test data simulation method and system and automation test method and system |
Non-Patent Citations (1)
Title |
---|
蔡志贤: "软件自动化测试的研究与实践", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109241746A (en) * | 2018-08-29 | 2019-01-18 | 腾讯科技(深圳)有限公司 | Code process method, apparatus calculates equipment and storage medium |
CN109241746B (en) * | 2018-08-29 | 2022-01-28 | 腾讯科技(深圳)有限公司 | Code processing method and device, computing equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107665233B (en) | Database data processing method and device, computer equipment and storage medium | |
CN106294120B (en) | Method, apparatus and computer program product for testing code | |
CN105787364A (en) | Automated testing method, device and system for task | |
CN106383764B (en) | A kind of collecting method and equipment | |
CN108804304B (en) | Test case generation method and device, storage medium and electronic equipment | |
CN109976999B (en) | Method and device for measuring coverage rate of test cases | |
US10055329B2 (en) | Detection of antipatterns through statistical analysis | |
CN109672722B (en) | Data deployment method and device, computer storage medium and electronic equipment | |
CN110134583B (en) | Software testing and data processing method and device | |
CN113760697A (en) | Interface testing method and device, electronic equipment and storage medium | |
JPWO2017141893A1 (en) | Software analysis apparatus and software analysis method | |
CN108243033A (en) | A kind of method given a mark to video quality, cloud server terminal and system | |
CN112306495A (en) | Picture verification method and device, computer equipment and computer-readable storage medium | |
CN106301975A (en) | A kind of data detection method and device thereof | |
CN106201887B (en) | A kind of verification method and device of off-line data task | |
TW201518950A (en) | Cloud auto-test system, method and non-transitory computer readable storage medium of the same | |
JP2013198158A (en) | Hardware protocol stack | |
CN107168864A (en) | Code stream generation method and device | |
KR101794016B1 (en) | Method of analyzing application objects based on distributed computing, method of providing item executable by computer, server performing the same and storage media storing the same | |
CN110209571A (en) | Test method and device, storage medium, the computer equipment of more new interface | |
CN107025294B (en) | Information acquisition method and device | |
CN113691972B (en) | Service configuration method and device of android system | |
CN113611348B (en) | Dotting method and device, electronic equipment and storage medium | |
CN115576831A (en) | Test case recommendation method, device, equipment and storage medium | |
CN111651346B (en) | Method and device for testing front-end component, storage medium and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170915 |