CN104239015A - Script language extension method - Google Patents

Script language extension method Download PDF

Info

Publication number
CN104239015A
CN104239015A CN201310242302.5A CN201310242302A CN104239015A CN 104239015 A CN104239015 A CN 104239015A CN 201310242302 A CN201310242302 A CN 201310242302A CN 104239015 A CN104239015 A CN 104239015A
Authority
CN
China
Prior art keywords
client
xml
script
server end
explosion command
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.)
Granted
Application number
CN201310242302.5A
Other languages
Chinese (zh)
Other versions
CN104239015B (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 invention provides a script language extension method capable of supporting various automated scripts. When functions provided by commands of automated script languages cannot meet the requirement on automated testing, the commands of the script languages have to be extended. The method includes: compiling a client with the script languages, compiling a server with other programming languages, adding corresponding extension modules on the server to realize the functions needing to be extended, and enabling the client to communicate with the server through an XML-RPC (XML Remote Procedure Call) protocol; when the extension commands are executed in the automated script languages, transmitting the commands and parameters to the server through the client, parsing through the server, returning computation results to the client after computation of the extension module, returning the results to the commands after the client receives the results, and returning results after the commands are executed.

Description

The extended method of script
[technical field]
The present invention relates to the extended method for automatized script language.
[background technology]
In automated testing method, the Programming with Pascal Language of normal use automatized script realizes testing measurand, because measurand is varied, often needs to expand the order of automatized script language.The automatized script language of current main flow both provides expansion interface and the API of C language, can use the expansion of C language programming realization order.As publication date be on April 1st, 2009, number of patent application be 200710161587.4 patent documentation achieve automatized script language: the extended method of the order of TCL language, thus the function of expansion TCL script.
The method that the existing API by script carries out explosion command is all bound with script itself, identical function, and different scripts needs to write different explosion commands to realize according to respective method, brings the efficiency of overlapping development.And explosion command, as a part for script analysis program, when expanded function goes wrong, can cause the instability that script resolver runs, thus affect the execution of automatized script.
[summary of the invention]
The technical matters that the present invention need solve overcomes above-mentioned deficiency, provides the extended method of the nonexpondable script of a kind of primary development.
For solving above-mentioned technical matters, the present invention devises a kind of extended method of script, and it comprises the following steps:
Step1: for meeting the demand of automatic test, expand the order of automatized script, specifies the title of an explosion command;
Step2: use scripting language one to support the client of XML-RPC agreement, use the title of explosion command and the form of defined parameters in the client.
Step3: write a server end, at server end definition XML-RPC server end interface and add the expansion module corresponding with explosion command, XML-RPC server end interface comprises the analysis mode of the IP address of the computer at server end place, socket port and command parameter.
Step4: when Run Script program, when running to this explosion command, by client by the title of explosion command and parameter, server end is sent to by XML-RPC agreement according to the form defined, XML-RPC server end interface is to resolving explosion command and parameter afterwards, according to the analysis mode of the good command parameter of predefine, call corresponding expansion module to perform, expansion module calculates, after being finished, result of calculation is returned to client by XML-RPC agreement, result is returned to explosion command by client again, after explosion command returns, this explosion command performs end.
Compared with prior art, in the present invention, the expansion module performing the explosion command of script independently realizes, and binds different from existing with script; After server end realizes expansion module, XML-RPC interface interchange can be passed through in various script, reach the nonexpondable function of primary development.Expansion module concentrates on server end and realizes separately, and the separate operation of script analysis program, and expansion module goes wrong, and does not affect the operation of other partial functions of script.
And, the server end using the present invention to carry out expanding and script perform can be positioned on different computers and run, realize Distributed Calculation, expansion that is more consuming time in script or consumption of natural resource can be calculated in the enterprising row operation of the better server of other performances, make full use of the feature of Distributed Calculation, improve the performance of robotization platform, meet the requirement of complex environment.
[accompanying drawing explanation]
Fig. 1 is the embodiment figure of the extended method of script of the present invention.
[embodiment]
Below in conjunction with drawings and embodiments, the invention will be further described.
The invention provides a kind of extended method of script, can multiple automatized script be supported.When the function that the order of automatized script language provides can not meet the needs of automatic test, need to expand the order of script.The inventive method uses scripting language's client, a server end is write with other programming languages, server end adds corresponding expansion module realize the function needing expansion, client and server end by XML-RPC(XML Remote Procedure Call, i.e. XML remote method invocation (RMI)) agreement carries out communication.When performing this explosion command in automatized script language, order and parameter is sent to server end by client, server end is resolved, after the calculating of expansion module, result of calculation is returned to client, after client receives, result is returned to this order, order performs end and returns results.
The extended method of script of the present invention, concrete step is as follows:
Step1: for meeting the demand of automatic test, expand the order of automatized script, specifies the title of an explosion command;
Step2: use scripting language one to support the client of XML-RPC agreement, use the title of explosion command and the form of defined parameters in the client.
Step3: write a server end, at server end definition XML-RPC server end interface and add the expansion module corresponding with explosion command, XML-RPC server end interface comprises the analysis mode of the IP address of the computer at server end place, socket port and command parameter.
Step4: as shown in Figure 1, when Run Script program, when running to this explosion command, by client by the title of explosion command and parameter, server end is sent to by XML-RPC agreement according to the form defined, XML-RPC server end interface is to resolving explosion command and parameter afterwards, according to the analysis mode of the good command parameter of predefine, call corresponding expansion module to perform, expansion module calculates, after being finished, result of calculation is returned to client by XML-RPC agreement, result is returned to explosion command by client again, after explosion command returns, this explosion command performs end, .
The present invention adopts XML-RPC agreement as the agreement of communication between robotization language scripts and expansion module, the explosion command of script is realized in expansion module, the result of calculation that expansion module generates returns to script by XML-RPC communications protocol, achieve the expansion of script order and distributed execution, the method extends the function of script, can adapt to the automatized script exploitation of main flow.
The invention has the advantages that:
1, versatility: the expansion module of the script that this method is carried out can dock with multiple script, realizes the feature across script, supports multiple script.
2, manageability: on backstage based on unified management, efficiency and the robustness of program operation can be improved for expansion module.
3, extensibility is strong, and the expansion of functional module only need perform at server end, and current most programming language all supports XML-RPC agreement, and the characteristic that can make full use of the language grasped designs.
Above-described is only embodiments of the present invention, it should be pointed out that for the person of ordinary skill of the art at this, without departing from the concept of the premise of the invention, can also make improvement, but these all belongs to protection scope of the present invention.

Claims (1)

1. an extended method for script, is characterized in that, comprises the following steps:
Step1: for meeting the demand of automatic test, expand the order of automatized script, specifies the title of an explosion command;
Step2: use scripting language one to support the client of XML-RPC agreement, use the title of explosion command and the form of defined parameters in the client.
Step3: write a server end, at server end definition XML-RPC server end interface and add the expansion module corresponding with explosion command, XML-RPC server end interface comprises the analysis mode of the IP address of the computer at server end place, socket port and command parameter.
Step4: when Run Script program, when running to this explosion command, by client by the title of explosion command and parameter, server end is sent to by XML-RPC agreement according to the form defined, XML-RPC server end interface is to resolving explosion command and parameter afterwards, according to the analysis mode of the good command parameter of predefine, call corresponding expansion module to perform, expansion module calculates, after being finished, result of calculation is returned to client by XML-RPC agreement, result is returned to explosion command by client again, after explosion command returns, this explosion command performs end.
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 true CN104239015A (en) 2014-12-24
CN104239015B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107015827A (en) * 2017-03-20 2017-08-04 深圳市共进电子股份有限公司 The method of embedded system and its automatic running third party's extender
CN110347409A (en) * 2019-07-12 2019-10-18 威创集团股份有限公司 Autocontrol 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 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 supporting Python extension

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
姚鹤岭: "XML- RPC技术及其应用分析", 《河海大学常州分校学报》 *
徐辉: "《PHP Web程序设计教程与试验》", 31 January 2008, 清华大学出版社 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107015827A (en) * 2017-03-20 2017-08-04 深圳市共进电子股份有限公司 The method of embedded system and its automatic running third party's extender
CN107015827B (en) * 2017-03-20 2020-06-16 深圳市共进电子股份有限公司 Embedded system and method for automatically operating third-party extension program thereof
CN110347409A (en) * 2019-07-12 2019-10-18 威创集团股份有限公司 Autocontrol method, client and server
CN110347409B (en) * 2019-07-12 2021-07-16 威创集团股份有限公司 Automatic control method, client and server

Also Published As

Publication number Publication date
CN104239015B (en) 2018-09-28

Similar Documents

Publication Publication Date Title
CN103927256A (en) Method for controlling multiple Android devices
CN103544100A (en) Method, system and client side for testing APP of portable data processing equipment
CN103377082B (en) The method and apparatus that discrete events simulation is scheduling
CN103457761B (en) Cross-platform command line configuration interface implementation method
CN105224753A (en) The multi-specialized design verification platform of non-active nuclear power plant
CN106502713A (en) A kind of method for upgrading software and system
KR20160074503A (en) Emulating test distributed application on server
CN105282207A (en) Communication method and system based on communication protocol stack capable of being assembled
CN103605814A (en) Information processing method and information processing system in substation transformation process
CN104035766A (en) Android system trimming method based on coverage rate test
CN104239015A (en) Script language extension method
CN103576667B (en) Method, device and system for testing main control board
CN105141484A (en) Android equipment remote debugging method based on cloud server
CN102629198B (en) On-demand remote execution method of computational logic in software application
CN102681861B (en) Method and device for installing software
CN103455337A (en) Method for using dynamic library under Android development environment
CN104331360A (en) Automatic testing platform
CN109740342A (en) Obtain method, system, computer installation and storage medium that shell executes permission
CN104834594A (en) Method and apparatus for testing web system
CN103415085A (en) Automatic generation method of general MAC protocol processor
CN115794659B (en) Distributed parallel testing method, device, equipment and medium for CFD software
CN103324573A (en) PEACH platform extension method for GUI-based protocol state machine modeling
CN104699881A (en) Design method of IMU digital filter for inertial navigation system
CN112231013B (en) Method for establishing target server after IP address is changed by embedded VxWorks system
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