⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 concepts.script

📁 Software Testing Automation Framework (STAF)的开发代码
💻 SCRIPT
📖 第 1 页 / 共 2 页
字号:
.***************************************************************************.* Software Testing Automation Framework (STAF).* (C) Copyright IBM Corp. 2001.*.* This software is licensed under the Common Public License (CPL) V1.0. .****************************************************************************.*************************-START-OF-PROLOG-****************************.*.*  File Name          : Overview SCRIPT.*  Descriptive Name   : Software Test Automation Framework Overview.*  Detail:.*.*     This file contains an overview of STAF..*.**************************-END-OF-PROLOG-*****************************:ih1.handles:i2.concepts:h1 id=concepts.Concepts:h2 id=hndlcon.Handles:p.A handle is a unique identifier, representing a given process.  Thishandle is used when submitting requests to STAF.  This handle, combined withthe machine name, uniquely identifies a particular process in the STAFEnvironment.  It is this combination of machine/handle that allowsservices to track requests from multiple processes on different machines.:p.In order to submit service requests to STAF, a process must have a handle.Thus, the first thing a process should do is register with STAF to obtain ahandle.  Other data tied to this handle is the following::ul compact.:li.Name - a descriptive name associated with the handle, which is specifiedwhen a process registers with STAF.:li.Last used date/time - a timestamp of the last time the handle was used tosubmit a request.:li.User authentication information - user authentication informationassociated with the handle if the handle has been authenticated:li.Variable pool - a means by which to store and retrieve information that theprocess may use, such as configuration data.:li.Queue - a priority queue used for interprocess communication between otherprocesses/machines using STAF.:eul.:p.Before a process exits it should unregister with STAF to free up anyresources used by that handle.:note.Handle 1 is always allocated to the STAF Process itself.  The nameassociated with this handle is STAF_Process.:p.If STAFProc is shutdown on a machine (or the machine is rebooted), STAF handlesfor that machine are deleted.:p.  The SEM and RESPOOL services perform garbage collection for handles that havebeen deleted.  If a handle is deleted and it owns a mutex semaphore or a resource pool entry (or has a pending request for a resource pool entry),the handle will be garbage collected.  This means any mutex semaphores orresource pool entries owned by the handle will be released and any pendingrequests submitted by the handle will be removed. .*.*---------------------------------------------------------------------.*:ih1.services:ih2.general:i3.concepts:h2 id=srvcon.Services:p.Services are what provide all the capability in STAF.  Services may beinternal services, in which case, the executable code for the service resideswithin STAFProc.  Services may also be external services, in which case, theexecutable code for the service resides outside of STAFProc, for example, ina Java routine.:p.Services are known by their name, such as PROCESS or LOG.  Internalservices are always available and have a fixed name.  External services mustbe registered, and the name by which they are known is specified when they areregistered.  If an external service is not registered with STAF, then theservice is not available on that STAF Client.:p.Services may also be delegated to another STAF Client.  In this case, whena request is made for the service on the local STAF Client, it is automaticallyforwarded to the machine to which this service has been delegated.  For example,a testcase may request the local machine to log some information via the LOGservice.  If the LOG service has been delegated to another machine, theLOG request will actually be handled by the machine to which logging hasbeen delegated.  In this way, all logs could be conviently stored on onesystem, without the testcases needing to explicitly send their LOG requeststo the common system.  In a similar manner, if a service were only availableon a specific operating system, then all testcases could assume that theservice was available locally, when, in fact, the service was being delegatedto the machine running the required operating system.:note.Internal services may not be delegated.:p.External services and delegated services are both registered in the STAFConfiguration File.  External services also may be dynamically added (registered)or removed (unregistered and terminated) .*replaced, or renamedvia the SERVICE service (see :hdref refid=srvService.).:ih2.service loader:p.Service loaders are external services whose purpose is to load services on-demand.They allow services to be loaded only when they have been requested,so they don't take up memory until needed.They also allow dynamic service registration when a request is made so thatyou don't have to change the STAF configuration file to register aservice.:p.When a request is encountered for a service that doesn't exist,STAF will call each service loader, in the order they wereconfigured, until the service exists or we run out of service loaders.If we run out of service loaders, then the standardRC:2 will be returned.  Otherwise, the request will be sent to thenewly added service.  :p.A default serviceloader service (STAFDSLS) is shipped with STAF, andit can dynamically load the Log, Zip, Monitor, and ResPool services.  This servicewill automatically be configured in your STAF.cfg file.:ih2.authenticator:p.Authenticators are special external services whose purpose is toauthenticate users in order to provide user level trust, which can be usedin addition (or instead of) machine level trust.  An Authenticator is aspecial service that accepts an authenticate request.  As a user, youcannot directly submit a request to an authenticator service.Authenticators are accessed indirectly via the Handle service.:p.Authenticators can only be registered in the STAF configuration file --they cannot be dynamically registered.  One or more Authenticators can beregistered.  The first Authenticator registered is the default, unlessoverridden by using the DEFAULTAUTHENTICATOR operational parameter.If you want to authenticate across systems, you must register theAuthenticator on each system using the same name (case-insensitive)..*.*---------------------------------------------------------------------.*:ih1.workload:i2.concepts:h2 id=wkldcon.Workloads:p.A workload is a set of processes running on a set of machines.  A workloadmay be as simple as a single process running on a single machine, or it may beas complex as multiple processes on multiple machines coordinating together toperform a larger complex task.  STAF was designed to help the creation andautomation of workloads of all sizes..*.*---------------------------------------------------------------------.*:ih1.variables:i2.concepts:h2 id=varcon.Variables:p.STAF provides a means to store and retrieve variables.  These variablesmay be used for any purpose the tester desires, such as storing testcaseconfiguration parameters.  These variables provide two main capabilitiesto testcase writers.  One, they provide a standard means by which to storeconfiguration data, i.e., each tester doesn't have to figure out how to storeand retrieve said configuration data.  Two, these variables may be changeddynamically.  For example, if a testcase queries the WebServer variablebefore sending a request off to the web server, and that web server goes down,the WebServer variable can be dynamically changed by the tester to refer to adifferent web server, and the testcase can continue execution.  Note how STAFallows the variable's value to be changed outside of the scope of the runningtestcase, thus allowing the testcase to continue execution without needing tobe stopped and restarted.:p.STAF maintains a "system" variable pool that is common to allthe processes on a given STAF Client.STAF also maintains a "shared" variable pool which is also system-wide,but which will be sent across the network and used in variable resolutionon remote systems.In addition, each process/handle has its own variable pool.By default, the values of variables in a process' variable pool override thevalues of variables in the system and shared variable pools.  However, theprocess may override this behavior when asking for the value of a variable.Basically, as part of every remote request, the originating handle and system shared variable pools are sent across the wire. These pools are stored only for the duration of the request for use in variable resolution.:i2.predefined:p.The following system variables are predefined::ul compact.:li.STAF/Config/BootDrive - Indicates the drive from which the machine wasbooted:li.STAF/Config/CodePage - The codepage used by STAF:li.STAF/Config/ConfigFile - The configuration file used to start STAF:li.STAF/Config/DefaultAuthenticator - The default authenticator.  If noauthenticators are registered, it's value is "none".:li.STAF/Config/DefaultInterface - The default interface.  If nonetwork interfaces are registered, it's value is "local" to show thatthe local interface is the only interface available.:li.STAF/Config/InstanceName - The name of this STAF instance.  The default

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -