Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running QTP Scripts on multiple SAP Test Environments
#1
Solved: 10 Years, 9 Months, 1 Week ago
We recently started to use QTP to automate our SAP test cases. Our company has a variety of custom SAP screens and transactions that need to be tested on a bi-monthly basis. We also use Quality Center to track testing. We have three different test environments:
1.) Training
2.) Development
3.) QA

Now for my question. Is there any way to have my QTP scripts run on a certain environment (server...Training, Dev & QA) so that I do not have to manually update my test script record & run settings prior to execution.

Currently before I run my test I need to log into QTP and change the Record & Run settings server to the environment being tested. This is cumbersome since we have nearly 150 separate test scripts.

Any help would be appreciated.
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
The above mentioned query can be resolved.

Two important notes,

1. Set the record and run settings to "Run on any open browser"
2. Research about QTP AOM.

Let me know if it helps !
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 10 Years, 9 Months, 1 Week ago
We had security problems with running on any open browser. Someone accidentally ran a test on a production system that created and posted invoices. We would not like to run on open browser if at all possible.
I will try AOM script.
Reply
#4
Solved: 10 Years, 9 Months, 1 Week ago
Best Practice -
Close all the active Browsers. Open the browser you need and then pass the required Url.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#5
Solved: 10 Years, 9 Months, 1 Week ago
A good way to not have problems with opened browsers, you can use Browser().Close method at the end of each test (or within the last action, last step), or you can write a function as next and use it where you'll need it:

Code:
[b]Public Function[/b] CloseBrowser
    Reporter.[b]Filter[/b] = rfDisableAll
[color=#808000]'closing the browser[/color]
        [b]If[/b] Browser([color=#FF6347]"URL:=http://environment1/.*"[/color]).Exist [b]Then[/b]
            Browser([color=#FF6347]"URL:=http://environment1/.*"[/color]).[b]Close[/b]
        [b]End IF[/b]

        [b]If[/b] Browser([color=#FF6347]"URL:=environment2/.*"[/color]).Exist [b]Then[/b]
            Browser([color=#FF6347]"URL:=environment2/.*"[/color]).[b]Close[/b]
        [b]End IF[/b]
    Reporter.[b]Filter[/b] = rfEnableAll
End Function

to call this function from the *.qfl file, use in you test next:
CloseBrowser 'that's it

it's working very good in all my tests..
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple rows of test data Bhuvana 0 1,164 01-03-2020, 09:30 PM
Last Post: Bhuvana
  issue with IE when running test eiko 2 1,442 02-01-2018, 04:46 PM
Last Post: eiko
  Issue in running Scripts on Edge browser Deepa_m 0 1,541 12-01-2017, 04:36 PM
Last Post: Deepa_m
  "How to automate SAP Applications using QTP" suresz449 9 22,627 09-01-2017, 12:42 PM
Last Post: Shiva Kumar
  Search All Test scripts For a Function? AndyBSG 1 2,580 02-19-2015, 04:15 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 1 Guest(s)