Discussion:
Copy Environment Variables to differnt scripts
s***@gmail.com
2018-06-27 18:20:46 UTC
Permalink
Hi,

Is there an easy way to copy the environment variable names from one script
to another? I don't want to load them because then they are external and I
cannot update them, My scripts are executed by different people on
different machines. However most of these scripts use the same environment
variables. It's a lot of work to add those variables to each script one
by one. Is there a way I can copy the env variables?

Thanks
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mercuryqtp+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nikhil Gangwar
2018-06-28 00:15:39 UTC
Permalink
Hi,

If I understand your problem correctly, The problem you are facing is to update Environment Values every time if you are executing script of different machine.

So You can try one solution, Keep a copy Environment Variable file and update it once and save it at seperate place. Whenever you need to execute the latest script you can replace existing Environment variable file with your own Environment variable file. Everyone who is expecting to execute the script will have their own Environment variables. Whenever anyone needs they can replace it and use it without changing it again and again.

I think you will have Environment variables in Xml or .vbs file so use the same name while replacing Environment file. Additionally you need to add any new Environment Variables if you add anything new.


Nikhil
Sent from my iPhone
Hi,
Is there an easy way to copy the environment variable names from one script to another? I don't want to load them because then they are external and I cannot update them, My scripts are executed by different people on different machines. However most of these scripts use the same environment variables. It's a lot of work to add those variables to each script one by one. Is there a way I can copy the env variables?
Thanks
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mercuryqtp+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
s***@gmail.com
2018-06-28 16:34:49 UTC
Permalink
Thanks Nikhil for a quick response. However that's not what I'm looking
for. Let me see if I can explain my problem in a different way.

Script 1 has the following Env variables
StartTime (Captures the start time of the script)
EndTime (Capture the End time of the script)

I want to copy those two env to Script 2, Script 3, Script 4 and Script 5.

What's the easiest way to do that?

Thanks
Post by Nikhil Gangwar
Hi,
If I understand your problem correctly, The problem you are facing is to
update Environment Values every time if you are executing script of
different machine.
So You can try one solution, Keep a copy Environment Variable file and
update it once and save it at seperate place. Whenever you need to execute
the latest script you can replace existing Environment variable file with
your own Environment variable file. Everyone who is expecting to execute
the script will have their own Environment variables. Whenever anyone needs
they can replace it and use it without changing it again and again.
I think you will have Environment variables in Xml or .vbs file so use the
same name while replacing Environment file. Additionally you need to add
any new Environment Variables if you add anything new.
Nikhil
Sent from my iPhone
Hi,
Is there an easy way to copy the environment variable names from one
script to another? I don't want to load them because then they are
external and I cannot update them, My scripts are executed by different
people on different machines. However most of these scripts use the same
environment variables. It's a lot of work to add those variables to each
script one by one. Is there a way I can copy the env variables?
Thanks
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
<javascript:>
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups
"QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mercuryqtp+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Satheesh Kumar
2018-06-28 17:17:57 UTC
Permalink
In script one declare the values for env variables like

Environment.Value(" STime ") = StartTransaction
--
--
--
Environment.Value(" ETime ") = EndTransaction


Start and end transaction will have the time duration in milli seconds.

In second script you can call the environment variable as

SSTime = Environment.Value(" STime ")
SETime = Environment.Value(" ETime ")

For third script you can call as

TSTime = Environment.Value(" STime ")
TEtime = Environment.Value(" ETime ")

You can do for any number of scripts



*Thanks and RegardsSatheesh Kumar .D*
Post by s***@gmail.com
Thanks Nikhil for a quick response. However that's not what I'm looking
for. Let me see if I can explain my problem in a different way.
Script 1 has the following Env variables
StartTime (Captures the start time of the script)
EndTime (Capture the End time of the script)
I want to copy those two env to Script 2, Script 3, Script 4 and Script 5.
What's the easiest way to do that?
Thanks
Post by Nikhil Gangwar
Hi,
If I understand your problem correctly, The problem you are facing is to
update Environment Values every time if you are executing script of
different machine.
So You can try one solution, Keep a copy Environment Variable file and
update it once and save it at seperate place. Whenever you need to execute
the latest script you can replace existing Environment variable file with
your own Environment variable file. Everyone who is expecting to execute
the script will have their own Environment variables. Whenever anyone needs
they can replace it and use it without changing it again and again.
I think you will have Environment variables in Xml or .vbs file so use
the same name while replacing Environment file. Additionally you need to
add any new Environment Variables if you add anything new.
Nikhil
Sent from my iPhone
Hi,
Is there an easy way to copy the environment variable names from one
script to another? I don't want to load them because then they are
external and I cannot update them, My scripts are executed by different
people on different machines. However most of these scripts use the same
environment variables. It's a lot of work to add those variables to each
script one by one. Is there a way I can copy the env variables?
Thanks
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups
"QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups
"QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mercuryqtp+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...