Highlighted
Absent Member.
Absent Member.
622 views

TC: programmatically deterimining "Develop Script" mode?

Is there any type of IF(blah)... statement that I can use to determine if my TC script is executing in the Develop Script mode (as opposed to running under vuGen or the Controller)?

-Thanks, Terry

0 Likes
3 Replies
Highlighted
Super Contributor.
Super Contributor.

Re: TC: programmatically deterimining "Develop Script" mode?

Ht,

1) if we are "Develop script mode", we can't see any reply/run button in Vugen

        So, we can not run the script in Vugen 

2) in we are in controller,it doesnot depend on vugen or Develop mode

actually we are adding the script which we have to run the script in cotroller,it will upload the files to the controller

based on those files test will execute in controller (same for all protocols)

if we did any modification in the script in Develop script mode , if doesnot effect the script in controller mode,

if we want apply the changes in controller mode ,we need to refresh the script

Thanks, Ravi

 

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: TC: programmatically deterimining "Develop Script" mode?

I am not making my desires clear: I want to execute some code when I am only executing the script in the Develop Script mode, as in:

If (running under Develop Script Mode) {
    run some statements...
}

- Thanks, Terry

 

0 Likes
Highlighted
Regular Contributor.
Regular Contributor.

Re: TC: programmatically deterimining "Develop Script" mode?

No I don't believe there is anything directly available.  However, this wouldn't be too hard to do.  

1.  Write a DLL function that uses the Windows api function FindWindow to see if the TruClient browser is visible

2.  Write a C function that loads DLL and makes the call

3.  Call the script C function from within TruClient

This would add some overhead, but you could check VuserId to see if you are running a test and not perform and of the logic above if you are.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.