CN104239015B - The extended method of script - Google Patents

The extended method of script Download PDF

Info

Publication number
CN104239015B
CN104239015B CN201310242302.5A CN201310242302A CN104239015B CN 104239015 B CN104239015 B CN 104239015B CN 201310242302 A CN201310242302 A CN 201310242302A CN 104239015 B CN104239015 B CN 104239015B
Authority
CN
China
Prior art keywords
server end
xml
client
script
rpc
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.)
Expired - Fee Related
Application number
CN201310242302.5A
Other languages
Chinese (zh)
Other versions
CN104239015A (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.)
SHENZHEN WDK TECHNOLOGY Co Ltd
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
SHENZHEN WDK TECHNOLOGY Co Ltd
Shanghai Feixun Data Communication Technology 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 SHENZHEN WDK TECHNOLOGY Co Ltd, Shanghai Feixun Data Communication Technology Co Ltd filed Critical SHENZHEN WDK TECHNOLOGY Co Ltd
Priority to CN201310242302.5A priority Critical patent/CN104239015B/en
Publication of CN104239015A publication Critical patent/CN104239015A/en
Application granted granted Critical
Publication of CN104239015B publication Critical patent/CN104239015B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The present invention provides a kind of extended methods of script, can support a variety of automatized scripts.It orders the function of providing that cannot meet when needing of automatic test when automatized script language, needs to be extended the order of script.The method of the present invention uses one client of scripting language, and a server end is write with other programming languages, corresponding expansion module is added on server end to realize function that needs extend, client and server end passes through XML RPC(XML Remote Procedure Call, i.e. XML remote method call)Agreement is communicated.When executing the explosion command in automatized script language, it will be ordered by client and parameter send server end to, server end is parsed, after the calculating of expansion module, result of calculation is returned into client, client returns result to the order after receiving, order, which executes, to be terminated to return the result.

Description

The extended method of script
【Technical field】
The present invention relates to the extended methods for automatized script language.
【Background technology】
Automatized script Programming with Pascal Language is often used in automated testing method to realize test measurand, due to tested pair As varied, generally require to be extended the order of automatized script language.The automatized script language of mainstream is all at present The expansion interface i.e. API of C language is provided, C language programming can be used to realize the extension of order.If publication date is 2009 4 The moon 1, the patent document that number of patent application is 200710161587.4 realize automatized script language:The order of TCL language Extended method, to extend the function of TCL scripts.
The existing method for being extended order by the API of script is bound with script itself, identical Function, different scripts needs according to respective method to write different explosion commands to realize, brings overlapping development Efficiency.Moreover, a part of the explosion command as script analysis program, when expanded function when something goes wrong, can cause Script resolver is run unstable, to influence the execution of automatized script.
【Invention content】
The technical issues of present invention need to solve is to overcome the shortcomings of above-mentioned, provides a kind of nonexpondable script of primary development The extended method of language.
In order to solve the above technical problems, the present invention devises a kind of extended method of script comprising following step Suddenly:
step1:To meet the needs of automatic test, the order of automatized script is extended, specifies an extension The title of order;
step2:Using the client of one support XML-RPC agreement of scripting language, in the client using extension The title of order and the format of defined parameters.
step3:A server end is write, XML-RPC server ends interface and addition are defined in server end and is expanded Corresponding expansion module is ordered in exhibition, and XML-RPC server end interfaces include the IP address of the computer where server end, socket The analysis mode of port and command parameter.
step4:When Run Script program, when running to the explosion command, by client by the title of explosion command and Parameter is sent to server end according to the format defined by XML-RPC agreements, and XML-RPC server end interfaces arrive Explosion command and parameter are parsed later, according to the analysis mode of the command parameter predefined, call corresponding extension Module is executed, and expansion module is calculated, and after being finished, result of calculation is returned to visitor by XML-RPC agreements Family end, client returns result to explosion command again, and after explosion command returns, explosion command execution terminates.
Compared with prior art, the present invention in, the expansion module of the explosion command of perform script language independently is realized, with show Have different from script binding;After server end realizes expansion module, XML- can be passed through in various scripts RPC interfaces call, and reach the nonexpondable function of primary development.Expansion module concentrates on server end and is implemented separately and script Analysis program is run independently of each other, and expansion module goes wrong, and does not influence the operation of script other parts function.
It is transported moreover, the server end and script that are extended using the present invention execute to be located on different computers Row, realize Distributed Calculation, can by script than it is relatively time-consuming or consumption resource extension calculate other performances more The characteristics of carrying out operation on good server, make full use of Distributed Calculation improves the performance of automation platform, meets complicated ring The requirement in border.
【Description of the drawings】
Fig. 1 is the embodiment figure of the extended method of script of the present invention.
【Specific implementation mode】
The invention will be further described with embodiment below in conjunction with the accompanying drawings.
The present invention provides a kind of extended methods of script, can support a variety of automatized scripts.Work as automatized script The function that the order of language provides cannot meet when needing of automatic test, need to be extended the order of script. The method of the present invention uses one client of scripting language, a server end is write with other programming languages, in server Corresponding expansion module is added on end to realize function that needs extend, client and server end passes through XML-RPC(XML Remote Procedure Call, i.e. XML remote method call)Agreement is communicated.Being executed in automatized script language should When explosion command, it will be ordered by client and parameter send server end to, server end is parsed, by expansion module Calculating after, result of calculation is returned into client, client returns result to the order after receiving, order, which executes, to be terminated It returns the result.
The extended method of script of the present invention, specific steps are as follows:
step1:To meet the needs of automatic test, the order of automatized script is extended, specifies an extension The title of order;
step2:Using the client of one support XML-RPC agreement of scripting language, in the client using extension The title of order and the format of defined parameters.
step3:A server end is write, XML-RPC server ends interface and addition are defined in server end and is expanded Corresponding expansion module is ordered in exhibition, and XML-RPC server end interfaces include the IP address of the computer where server end, socket The analysis mode of port and command parameter.
step4:As shown in Figure 1, working as Run Script program, when running to the explosion command, extension is ordered by client The title and parameter of order are sent to server end, XML-RPC server ends according to the format defined by XML-RPC agreements Interface parses explosion command and parameter after, according to the analysis mode of the command parameter predefined, calls Corresponding expansion module is executed, and expansion module is calculated, and after being finished, result of calculation is assisted by XML-RPC View returns to client, and client returns result to explosion command again, and after explosion command returns, which executes knot Beam,.
The present invention, as the agreement communicated between automation language scripts and expansion module, is being expanded using XML-RPC agreements The explosion command that script is realized in module is opened up, the result of calculation that expansion module generates is returned by XML-RPC communications protocol Back to script, the extension and distributed execution, this method that realize script order extend the function of script, Adapt to the automatized script exploitation of mainstream.
The advantage of the invention is that:
1, versatility:The expansion module for the script that this method carries out can be docked with a variety of scripts, real Now across the feature of script, a variety of scripts are supported.
2, manageability:For expansion module on backstage based on unified management, can improve program operation efficiency and Robustness.
3, scalability is strong, and the extension of function module need to only be executed in server end, and current most programming language is equal It supports XML-RPC agreements, the characteristic for the language grasped can be made full use of to be designed.
Above-described is only embodiments of the present invention, it should be noted here that for those of ordinary skill in the art For, without departing from the concept of the premise of the invention, improvement can also be made, but these belong to the protection model of the present invention It encloses.

Claims (1)

1. a kind of extended method of script, which is characterized in that include the following steps:
step1:To meet the needs of automatic test, the order of automatized script is extended, specifies an explosion command Title;
step2:Using the client of one support XML-RPC agreement of scripting language, explosion command is used in the client Title and defined parameters format;
step3:A server end is write, define XML-RPC server ends interface and addition in server end orders with extension It includes the IP address of the computer where server end, the ends socket to enable corresponding expansion module, XML-RPC server end interfaces The analysis mode of mouth and command parameter;
step4:When Run Script program, when running to the explosion command, by client by the title and parameter of explosion command, Server end is sent to by XML-RPC agreements according to the format defined, XML-RPC server ends interface is right after Explosion command and parameter are parsed, according to the analysis mode of the command parameter predefined, call corresponding expansion module into Row executes, and expansion module is calculated, and after being finished, result of calculation is returned to client by XML-RPC agreements, visitor Family end returns result to explosion command again, and after explosion command returns, explosion command execution terminates.
CN201310242302.5A 2013-06-18 2013-06-18 The extended method of script Expired - Fee Related CN104239015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310242302.5A CN104239015B (en) 2013-06-18 2013-06-18 The extended method of script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310242302.5A CN104239015B (en) 2013-06-18 2013-06-18 The extended method of script

Publications (2)

Publication Number Publication Date
CN104239015A CN104239015A (en) 2014-12-24
CN104239015B true CN104239015B (en) 2018-09-28

Family

ID=52227166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310242302.5A Expired - Fee Related CN104239015B (en) 2013-06-18 2013-06-18 The extended method of script

Country Status (1)

Country Link
CN (1) CN104239015B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107015827B (en) * 2017-03-20 2020-06-16 深圳市共进电子股份有限公司 Embedded system and method for automatically operating third-party extension program thereof
CN110347409B (en) * 2019-07-12 2021-07-16 威创集团股份有限公司 Automatic control method, client and server

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114953A (en) * 2007-07-03 2008-01-30 中兴通讯股份有限公司 Automatized test method for broadband accessing server
CN101150463A (en) * 2007-11-14 2008-03-26 华为技术有限公司 Testing method and system
CN101170785A (en) * 2006-10-24 2008-04-30 中兴通讯股份有限公司 Device and method for TCL to test base station software
CN101321093A (en) * 2008-06-06 2008-12-10 宁波高新区深联科技有限公司 System for supporting on-site development and debugging of wireless sensor network
CN101398778A (en) * 2007-09-29 2009-04-01 中兴通讯股份有限公司 Automatic integration test method
CN101551778A (en) * 2009-05-08 2009-10-07 刘志方 Test method of supporting Python extension

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170785A (en) * 2006-10-24 2008-04-30 中兴通讯股份有限公司 Device and method for TCL to test base station software
CN101114953A (en) * 2007-07-03 2008-01-30 中兴通讯股份有限公司 Automatized test method for broadband accessing server
CN101398778A (en) * 2007-09-29 2009-04-01 中兴通讯股份有限公司 Automatic integration test method
CN101150463A (en) * 2007-11-14 2008-03-26 华为技术有限公司 Testing method and system
CN101321093A (en) * 2008-06-06 2008-12-10 宁波高新区深联科技有限公司 System for supporting on-site development and debugging of wireless sensor network
CN101551778A (en) * 2009-05-08 2009-10-07 刘志方 Test method of supporting Python extension

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XML- RPC技术及其应用分析;姚鹤岭;《河海大学常州分校学报》;20050630;第12卷(第2期);见第24-36页 *

Also Published As

Publication number Publication date
CN104239015A (en) 2014-12-24

Similar Documents

Publication Publication Date Title
CN102866944B (en) Pressure testing system and method
WO2014048215A1 (en) Development, compiling and debugging method and device for application
WO2016029792A1 (en) Hardware device debugging method, device and system
CN103246606B (en) The performance test methods of ESB platform and system
US9477579B2 (en) Embedded software debug system with partial hardware acceleration
CN104935639A (en) Intelligent terminal, and applied distributed exploitation system and method
CN102855175B (en) Automated testing method and device
CN104239015B (en) The extended method of script
Kavoussanakis et al. Bonfire: The clouds and services testbed
CN115480753A (en) Application integration system and corresponding computer device and storage medium
WO2016011764A1 (en) Communication method and system based on assembled communication protocol stack
CN104714884A (en) Method for checking consistency of web application and Android application
CN105141484A (en) Android equipment remote debugging method based on cloud server
CN102681861B (en) Method and device for installing software
CN104834594B (en) Web system method of testing and device
JP2023541896A (en) Systems and methods for implementing transcloud application templates
CN104063227B (en) A kind of instruction learning method based on Internet of Things
CN105407150A (en) Remote control method of application program
CN102736926A (en) Upgrade method, device and batch upgrade system based on task template
CN107608887A (en) A kind of method for creating virtual opetrating system test server
KR20180119392A (en) Apparatus and method for protocol modeling
CN103415085A (en) Automatic generation method of general MAC protocol processor
CN104731707A (en) Transplanting method for iSCSI consistency testing software IscsiSim between platforms
CN114172816A (en) Network simulation test platform
CN111611148B (en) Compatibility concurrent test method and system for iOS system application software

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
PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20200325

Granted publication date: 20180928

PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20200925

Granted publication date: 20180928

PP01 Preservation of patent right
PP01 Preservation of patent right

Effective date of registration: 20201111

Granted publication date: 20180928

PD01 Discharge of preservation of patent
PD01 Discharge of preservation of patent

Date of cancellation: 20210511

Granted publication date: 20180928

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180928

Termination date: 20210618