📄 config.script
字号:
.***************************************************************************.* Software Testing Automation Framework (STAF).* (C) Copyright IBM Corp. 2001, 2004.*.* This software is licensed under the Common Public License (CPL) V1.0. .****************************************************************************.*************************-START-OF-PROLOG-****************************.*.* File Name : Configuration SCRIPT.* Descriptive Name : Software Test Automation Framework Configuration.* Detail:.*.* This file contains the STAF configuration options..*.**************************-END-OF-PROLOG-*****************************:ih1.configuration:i2.instructions:h1 id=config.Configuration:p.STAF is configured through a text file called the STAF Configuration File.This file may have any name you desire, but the default is STAF.cfg. TheSTAF Configuration File is read and processed line by line. Whitespace atthe front of the line is removed before processing. Blank lines, orlines containing only whitespace are ignored. You may continue a configurationstatement onto the next line by placing a "\" as the last character of theline. The maximum length for a line in the STAF Configuration File is 2048characters. The various configuration statements are described in the followingsections.:p.You may use variables for all the values of configuration statement options,with the exception of the :xph.SET VAR:exph. configuration statement itself.However, these variables must be either predefined STAF variables (see:hdref refid=varcon.) or be previously defined in the STAF Configuration Filevia the :xph.SET VAR:exph. configuration statement (see below)..*.*---------------------------------------------------------------------.*:h2 id=commentscfg.Comments:h3.Description:p.You specify a comment by placing a pound sign, #, as the first characteron the line. Comment lines are ignored.:h4.Examples:xmp.# This is a comment line:exmp..*.*---------------------------------------------------------------------.*:i1.machine name:ih1.configuration:i2.machine name:h2 id=machinecfg.Machine Nickname:h3.Description:p.You may specify a nickname for your machine using theMACHINENICKNAME configuration statement.:p.This allows you to override the machine nickname which is set to thevalue of the STAF/Config/Machine system variable by default.This primarily effects the data stored by services such as the Log andMonitor services, which store data based on the machine from which it cameby using the STAF/Config/MachineNickname system variable as part of thedirectory path when creating logs and monitor data.By allowing the STAF/Config/MachineNickname system variable to be overridden,it allows you to better manage your data.:p.The machine nickname is not used to communicate with other systems and doesnot have any effect on trust.:p.This option is used in both connected and disconnected modes(e.g. disconnected mode is when you are not using a network interface).:h4.Syntax:xmp.MACHINENICKNAME <Nickname>:exmp.:p.:xph.<Nickname>:exph. is the nickname you wish to use for your machine. It iscase sensitive.:h4.Examples:xmp.MACHINENICKNAME testmachine1MACHINENICKNAME JohnDoe:exmp..*.*---------------------------------------------------------------------.*:ih1.configuration:i2.network interfaces:i2.connection providers:i1.network interfaces:i1.connection providers:h2 id=networkcfg.Network Interfaces:h3.Description:p.You indicate that you wish to send and accept requests on a networkinterface using the INTERFACE configuration statement.The INTERFACE configuration statement registersconnection providers (also called network interfaces, or interfacesfor short).:h4.Notes::ol.:li.Currently, the only network interface which comes with STAFis TCP/IP. However, STAF allows you to plug in network interfaces(aka connection providers) so that you can create your ownconnection provider which can communicate via any mechanism youchoose (e.g. SSL, a Serial Line, NetBIOS, or SNA).Connection provider interfaces are C/C++ based so they are platformspecific.:li.An interface named local is also provided with STAF. Requestscoming from the local system will appear as though they came from aninterface named "local" and a system identifier of "local".:eol.:h4.Syntax:xmp.INTERFACE <Name> LIBRARY <Implementation Library> [OPTION <Name[=value]>]...:exmp.:p.:xph.<Name>:exph. is the name by which this network interface(aka Connection Provider) will be known on this machine.:p.:xph.LIBRARY:exph. is the name of the shared library / DLLwhich implements the network interface (aka Connection Provider).STAF V3 provides one connection provider that supportsunencrypted TCP/IP communication. This is the same type of supportthat STAF V2 supported. The implementation library for this connectionprovider is called STAFTCP.:p.:xph.OPTION:exph. specifes a configuration option that will be passed onto the shared library / DLL which implements the connection provider.You may specify multiple :xph.OPTION:exph.s for a given connection provider.See :hdref refid=staftcp. for acceptable options for the STAFTCP sharedlibrary / DLL.:h4.Examples:xmp.INTERFACE tcp LIBRARY STAFTCPINTERFACE tcp2 LIBRARY STAFTCP OPTION PORT=6600INTERFACE serial LIBRARY STAFSER:exmp..*.*---------------------------------------------------------------------:ih1.configuration:i2.STAFTCP network interface:i2.STAFTCP connection provider:i1.network interfaces:i1.connection providers:i1.STAFTCP:i1.TCP/IP:i1.port:i2.STAFTCP Connection Provider:h3 id=staftcp.STAFTCP Connection Provider:p.The STAFTCP connection provider shared library / DLL supportsunencrypted TCP/IP communication. STAF supports both IPv4 and IPv6. IPv6 is supported in the IPv6 enabled version of STAF.:p.The STAFTCP connection provider supports the following :xph.OPTIONs:exph.&colon.:p.:xph.PORT=<Name>:exph. specifies the TCP/IP port on which thisconnection provider listens for connections. The default is 6500.All machines in the same STAF Environment must use the same port.:p.:xph.PROTOCOL=<Name>:exph. specifies the communication protocol that thisconnection provider uses. The possible values are :xph.IPv6:exph., :xph.IPv4:exph.,or :xph.IPv4_IPv6:exph.. When this option is absent, the default is :xph.IPv4_IPv6:exph.which indicates to use both IPv6 and IPv4 protocols.This option is only valid for IPv6 enabled versions of STAF.:p.:xph.CONNECTTIMEOUT=<Number>:exph. specifies the maximum time in milliseconds to waitfor a connection attempt to a remote system to succeed. The default is 5000(5 seconds). You may need to increase this value if you are consistentlyreceiving return code 16 when trying to communicate with distant STAF systems.Note that the total time to wait for a connection to a remote system to succeedis :xph.(CONNECTTIMEOUT * CONNECTATTEMPTS) + (CONNECTRETRYDELAY * (CONNECTATTEMPTS - 1)):exph..If using the defaults, the maximum total time to wait for a connection to a remotesystem to succeed is (5000 * 2) + (1000 * 1), which equals 11 seconds.The :xph.CONNECTATTEMPTS:exph. and :xph.CONNECTRETRYDELAY:exph. values are operationalparameters that can be set in the STAF configuration file.:p.:h4.Examples:xmp.INTERFACE tcp LIBRARY STAFTCPINTERFACE tcp2 LIBRARY STAFTCP OPTION PORT=6600INTERFACE tcp3 LIBRARY STAFTCP OPTION PORT=6700 OPTION PROTOCOL=IPv6INTERFACE tcp4 LIBRARY STAFTCP OPTION CONNECTTIMEOUT=15000:exmp..*.*---------------------------------------------------------------------.*:i1.Service registration:ih1.configuration:i2.Service registration:ih1.registration:i2.Service registration:h2 id=serviceregcfg.Service Registration:h3.Description:p.External services are registered with the SERVICE configuration statement.:h4.Syntax:xmp.SERVICE <Name> LIBRARY <Implementation library> &lbrk.EXECUTE <Executable>&rbrk. &lbrk.OPTION <Name[=Value]>&rbrk.... &lbrk.PARMS <Parameters>&rbrk.:exmp.:p.or:xmp.SERVICE <Name> DELEGATE <Machine> &lbrk.TONAME <Remote Service Name>&rbrk.:exmp.:p.:xph.<Name>:exph. is the name by which this service will be known on thismachine.:p.:xph.LIBRARY:exph. is the name of the shared library / DLLwhich implements the service or acts as a proxy for the service. See theinformation for each external service to determine the appropriate valuefor this option.:p.:xph.EXECUTE:exph. is used by service proxy libraries / DLLs to specify whatthe proxy library should execute. For example, for a Java service, this mightbe the name of the Java jar file which actually implements the service. Thisoption has no significance for non-proxy service libraries. See below forinformation regarding the JSTAF service proxy library.Otherwise, see the documentation provided by the service proxy library.:p.:xph.OPTION:exph. specifes a configuration option that will be passed onto the service library / DLL. This is typically used by service proxylibraries to further control the interface to the actual serviceimplementation. You may specify multiple :xph.OPTION:exph.s for a givenservice. See below for acceptable options for the JSTAFservice proxy library. Otherwise, see the documation provided with theservice (proxy) library.:p.:xph.PARMS:exph. specifies optional parameters that will be passed to theservice during initialization.:p.:xph.DELEGATE:exph. specifies the machine to which to delegate this service.This machine must be running STAF V3.0.0 or later.:note.From a trust perspective, the tcp interface names on the "delegated to"service machine and on the machine delegating service requests to it must matchor the trust statement for the machine that is delegating service requestsmust use a wildcard to match any interface.:p.:xph.TONAME:exph. is the name of the service on :xph.<Machine>:exph. towhich the delegated requests will be sent. The default is the same name asspecified with :xph.<Name>:exph..:h4.Examples:xmp.SERVICE MONITOR LIBRARY STAFMon PARMS "RESOLVEMESSAGE MAXRECORDSIZE 4096"SERVICE LOG LIBRARY STAFLog.*SERVICE SAMPLER LIBRARY RXSTAF EXECUTE C:\STAF\bin\Sample.cmd PARMS "Sample Data"SERVICE STAX LIBRARY JSTAF EXECUTE C:\STAF\service\STAX.jar \ OPTION J2=-Xmx128mSERVICE SAMPLEJ LIBRARY JSTAF EXECUTE C:\STAF\services\Sample.jar \ PARMS {STAF/Config/STAFRoot}\bin\sample.dftSERVICE MYLOG DELEGATE TestSrv1SERVICE PAGER DELEGATE pagesrv.austin.ibm.comSERVICE EVENT DELEGATE EventSrv TONAME DB2EVENTSERVICE NOTIFY LIBRARY Notify PARMS "24 Hours 7 Days"SERVICE ZIP LIBRARY STAFZip:exmp..*---------------------------------------------------------------------.* XXX: Commented out since don't support REXX services in STAF V3.*:h3 id=rxstaf.RXSTAF service proxy library.*:p.The library RXSTAF acts as a proxy for STAF services implemented in the.*REXX language..*:p.The :xph.EXECUTE:exph. option for a Rexx service should specify the full.*path to the Rexx script that implements the service..*:p.RXSTAF supports the following :xph.OPTION:exph.s&colon..*:p.:xph.DEBUG:exph. specifies that Rexx service code should be re-read.*for every service request, thus, allowing debugging without stopping STAFProc..*If this option is not specified, the Rexx service code is read in once at.*initialization time and a tokenized image is created. This tokenized image.*is used for all service requests, and any changes to the Rexx service code.*will not be reflected until STAFProc is stopped and started again..*:note text=Warning.Using the :xph.DEBUG:exph. option will degrade the.*service's performance..*:h4.Examples.*:xmp..*OPTION Debug.*:exmp..*---------------------------------------------------------------------:i2.Java Service Registration:i2.JSTAF:ih1.configuration:i2.Java Virtual Machine:h3 id=jvmcfg.JSTAF service proxy library:p.The library JSTAF acts as a proxy for STAF services implemented in theJava language. JSTAF works with Java 1.3 and above.:p.The :xph.EXECUTE:exph. option for a Java service should specify thefully-qualified name of the jar file that implements the service. Thejar file will be automatically added to the class path by JSTAF.:note.In versions of STAF prior to 2.4.0, the name of the Java class thatimplements the service was specified for the :xph.EXECUTE:exph. option andyou had to make sure that the service's class files were in the class path.This is still supported, but this method is deprecated and will be removedin a future version of STAF.:p.JSTAF supports the following :xph.OPTION:exph.s&colon.:p.:xph.JVMName=<Name>:exph. specifies the name for the JVM you want the Javaservice to run in. If the JVM does not already exist, it will be created.If no JVMName is specified, then the Java service will run in the default JVM,named STAFJVM1, which is created the first time a Java service is registeredwith no JVMName specified.This option allows JSTAF to run Java services in different JVMs.:p.:xph.JVM=<Executable>:exph. specifies the name of the desired Javaexecutable. The default is "java". Note, this option is only valid for thefirst service created with a given :xph.JVMName:exph..:note.The HP-UX IA64 64-bit version of STAF requires Java 1.4.1 or later.:p.:xph.J2=<Java option>:exph. specifies an arbitrary Java option that should bepassed to the JVM. You can find more information on these options by usingthe command "java" (for standard options) and "java -X" (for non-standardoptions), or by consulting your Java documentation. Note that -X options canvary depending on which Java implementation (e.g. Sun Java 1.4.0 vs IBM Java1.3.1) you installed. Note, this option is only valid for the firstservice created with a given :xph.JVMName:exph..:note.If you are using the HP-UX IA64 64-bit version of STAF, you must specifythe -d64 option to the JVM. This can be done by specifying :xph.J2=-d64:exph.:p.:xph.MAXLOGS=<Number>:exph. specifies the maximum number of log filesfor the JVM that should be saved. The default is 5.The JVM log files are stored in the :xph.{STAF/DataDir}/lang/java/jvm/<JVMName>:exph.directory and contain JVM start information such as the date/time when the JVMwas started, the JVM executable, and the J2 options used to start the JVM.In addition, it contains any other information logged by the JVM, including anyerrors that may have occurred while the JVM was running.The current JVM log file is named :xph.JVMLog.1:exph. and saved JVM log files, if any,are named :xph.JVMLog.2:exph. to :xph.JVMLog.<MAXLOGS>:exph..Note, this option is only valid for the first service created with agiven :xph.JVMName:exph..:p.:xph.MAXLOGSIZE=<Number>:exph. specifies the maximum size, in bytes, forthe JVM log file(s). The default is 1048576 (1M).This option determines when to create a new JVM log file. When the JVM isstarted, if the size of a JVM log file exceeds the maximum size specifiedby this option, a new JVM log file will be created.Note, this option is only valid for the first service created with agiven :xph.JVMName:exph..:p.:note.You can view the JVM log for a Java service that is currentlyregistered using the STAFJVMLogViewer utility.Section :hdref refid=STAFJVMLogViewer. provides more information on this utility.:p.:h4.Examples:xmp.OPTION J2=-verbose&colon.gcOPTION "J2=-cp {STAF/Config/BootDrive}/MyJava/Extra.jar{STAF/Config/Sep/Path}{STAF/Env/Classpath}"OPTION J2=-Xms64mOPTION J2=-Xmx128m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -