Sharon, your suggestion is indeed the most straightforward one but unfortunately it is not available to us.
Please allow me to elaborate on our situation: Our team is developing an outer-level automation framework which runs testcases that use a variety of specific automation tools (Rational Functional Tester for GUI tests, JUnit and various in-house-developed tools for lower-level tests, etc). The specific target of our test is the Lotus Domino server. Our tests are initiated via the Lotus Automator UI, which causes LA on the LA server to initiate our STAX job (our automation framework) via STAX on the LA server. Then, the real target-of-test is a specified collection of test machines (typically one Windows client machine with Lotus Notes installed, and several server machines which may be Windows, AIX, Solaris, or Linux, with Lotus Domino Server software installed). The situation that my colleague is asking about is the following: There are some testcases which execute on the client system-under-test, and stop and start the Domino server by forming a command and then issuing it via STAF. The command is issued on the local machine (i.e. the client system-under-test) targeting execution on one of the server systems-under-test. In the context of this operation (stop/start the Domino server), for reasons too arcane to delve into here, we need the PATH environment variable on the Domino server to be set to a specific value. ...but... here's the kicker: we don't have control over the STAF command that's being issued to do this operation... the testcase itself (which we cannot modify) builds and issues this command. Therefore we don't have the flexibility to simply add the "ENV" argument to that command. Our challenge is to set the environment somehow into a state so that when the command (built and issued by the testcase) fires, the PATH will already be set in the manner that we require. So, we have tried a couple of approaches, including the one my colleague referred to below: using the STAF VAR service to set the PATH in a particular way, so that later, several layers down, when the testcase builds and fires its command, the PATH would be set the way we want it. This attempt failed, for reasons that you explained in your message. Can you suggest some other way we might approach this problem, so as to achieve our goal of having the PATH already set the way we need it, *without* modifying the testcase that actually issues the STAF command? Thanks in advance! --------------------------------------------------------------------------------------- Joe Veilleux IBM/Lotus Domino Server Quality Engineering 550 King Street Littleton MA 01460 Email: joeveill...@us.ibm.com Sharon Lucas/Austin/IBM@ IBMUS To Siu Tam/Westford/i...@lotus 06/01/2010 11:00 cc AM staf-users@lists.sourceforge.net Subject Re: [staf-users] Question on Setting values to an Environmental Variable When STAFProc is started, it runs with the environment variables that were set at that time. You can't change the environment variables for STAFProc (or really for any application) after it has started. STAF/Env/xxx variables like STAF/Env/Path are basically "read-only" variables that show you the environment variables settings for STAFProc. You should not be changing the values of STAF/Env/xxx variables. When you use the STAF PROCESS service to run a command, it runs in the same environment as STAFProc. To change or set a new environment variable when running a command via a PROCESS START request, you can use the ENV option (s) to set environment variables. For example: C:\>STAF local PROCESS START SHELL COMMAND "set" ENV PATH=C:\value;{STAF/Env/Path} RETURNSTDOUT STDERRTOSTDOUT WAIT Response -------- { Return Code: 0 Key : <None> Files : [ { Return Code: 0> Data : <Removed environment variables prior to PATH> Path=C:\value;C:\jdk1.5.0_07\bin;C:\STAF\bin;C:\WINNT \system32;C:\WINNT;<Removed rest of PATH output> <Removed environment variables after PATH> } ] } See the STAF User's Guide for more information on the ENV option at http://staf.sourceforge.net/current/STAFUG.htm#HDRPROCSRV. -------------------------------------------------------------- Sharon Lucas IBM Austin, luc...@us.ibm.com (512) 286-7313 or Tieline 363-7313 Siu Tam/Westford/i...@lotus To 06/01/2010 08:34 AM staf-users@lists.sourceforge.net cc Subject [staf-users] Question on Setting values to an Environmental Variable I am trying to set a value to an environment variable so that the processes proceeding directly after will be able to use the values. I am using the VAR service command staf <IP Address> var set var STAF/Env/Path="c:\value". The variable appears to be set properly since when the command staf <IP Address> var list is used the newly set values do show up. However, a command that is passed in directly after does not recognize the new path variable. Is this the proper command to use, or is there another way to do this? Thanks -Larry ------------------------------------------------------------------------------ _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users ------------------------------------------------------------------------------ _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users
<<inline: graycol.gif>>
<<inline: pic24607.gif>>
<<inline: ecblank.gif>>
------------------------------------------------------------------------------
_______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users