QTP Test ,VAPI-XP Test,LR Test 和ALM 集成遠程分佈式執行遇到的「access is denied 」 「unspecified error」問題

你們都知道QTP與ALM (QC的升級版)集成是最好的一個分佈式執行的結合。由於畢竟QTP是一個商業軟件,HP固然不會讓你去跟其餘的open source的工具去集成,要不他到哪裏去掙錢。html

有時候服務器端的ALM 也安裝好了,QTP也配置好了,可能運行的時候就是老是報一些可有可無的操做。api

問題:跨域

本地直接運行QTP test 或者是LR test在ALM中沒有問題。但是從遠程的機器上運行QTP test就報「Access is denied 」 ,」unspecified error」 或者是「host is not available」.這個若是你肯定了你ALM的的客戶端與遠程的運行腳本的機器通訊正常,那麼極可能這裏的緣由就是DCOM 的配置致使的問題。服務器

參考HP的官網有一段說明是如何配置執行腳本的機器上的DCOM 以便ALM 能夠遠程運行QTP類型或者是VAPI-XP ,System-test類型或者是LoadRunner 類型的測試.jsp

The DCOM we need to follow is  just the HP document as described  as blow:分佈式

http://support.openview.hp.com/selfsolve/document/KM187086ide

準備工做                                                                                                        工具

你須要下載一個DCOM的 配置工具:測試

dcomperm.exe(http://serverfault.com/questions/333766/how-to-get-dcomperm-exe-from-microsoft from this url you can get the the dcom file location ).ui

 

參考地址                                                                                                             

下面的這個是我對這個問題的一個調查結果,直接email給了個人manager(這個配置能夠跨域運行你的機器,也就是說運行機器和你的ALM 客戶端不必定是在一個域上也是能夠運行的,只要DCOM 權限配置好了就沒問題。不像有的人說的那樣,須要在運行腳本的機器上配置當前的用戶加入到當前的域中,而且給這個用戶一個DCOM remote run的權限。告訴你,這個徹底不必):

For the investigation about remote QTP test or VAPI-XP test performed from PCs ,some info as blow(We call the ALM browser execution host with’ host 1’,and called the planning run the test with ‘host 2’):

For VAPI-XP type test , as blow:

1,’Host 1 ‘ logged with administrator password L0ngh)rn, ‘Host 2’ logged from console with qatest password L0ngh)rn, VAPI-test running status will show from vsphere console;

2,’Host 1’ logged with administrator password L0ngh)rn,’Host 2’ logged from console with qatest password L0ngh)rn, and ‘Host 2’ had not logged with user Administrator, the VAPI-TEST will run from console with user qatest;

3, ’Host 1’ logged with administrator password 123,’Host 2’ logged from console with qatest password L0ngh)rn, and ‘Host 2’ had not logged with user Administrator, the VAPI-TEST will show error message 「The server process could not be started because the configured identity is incorrect. Check the username and password」.

4,’Host 1’ logged with alter password L0ngh)rn,’Host 2’ logged from console with qatest password L0ngh)rn, and ‘Host 2 ’ had not logged with user administrator, the VAPI-TEST will show 「access is denied」;

For QTP type test ,as blow:

1,’Host 1’ logged with qatest password L0ngh)rn ,’Host 2’ logged from console with Administrator password L0ngh)rn,and ‘Host 2’ had not configured these DCOM objects(as default):

   AQTRmtAgent

  QuickTest Professional Automation

TlpRmtServer

The QTP test can run from the ALM ;

2,Some other validation as the VAPI-XP script .

So all in all ,if we want to run any QTP Test or VAPI-XP test ,it’s better to make sure that the ALM execution host and running host had logged with the same user ID and user password .

If not ,maybe we need to create a new account in the host and for the QTP test we also need to configure these DCOM :   AQTRmtAgent,QuickTest Professional Automation,TlpRmtServer .

Find something as blow:

· For QTP type test ,we can execute the test from our PCs, before we can run the QTP test we need to configure the remote execute host with the correct DCOM and turning off the firewall. But all these we had done in our every hosts. So we no need to configure anything in the planning run host .what we need to do is using FQDN when we execute the ALM test from ALM browser:

clip_image002

      As we had run the QTP DCOM setting before ( from start menu->HP Quick test Professional ->Tools->Additional Installation requirements) ,so all the DCOM for QTP (AQTRmtAgent, QuickTest Professional Automation,TlpRmtServer ) had been modified as we need so the ALM can run the remote QTP test from local PC;

· For VAPI-XP type test, we can execute the test from our PCs, but we need to make sure that our PCs had logged the same credential   with the remote execute host(like here: pdeauto75.irl.hp.com).That’s mean your PCs need to create two same accounts(‘qatest’ and ‘Administrator’ with the same password ‘L0ngh0rn’) and logged the system with this account ,and then log to ALM project ,run the VAPI-XP test, it will perform correctly. Whether we had configured the VAPI DCOM showed here:

clip_image004

       This configure seems did not make any sense for running the remote VAPI test .if your PC had not logged with qatest or Administrator ,it will show the error 「Access is denied」 And the password need to log with  ‘L0ngh)rn’ after you had configured the   above DCOM for VAPI-XP .

So for QTP type test we can performed from PCs with your network credential ,but for VAPI-XP test you need to make sure that the PC had logged with ‘qatest’ or ‘administrator’ account.

配置腳本文件                                                                  

完整的配置腳本以下,須要將該下面的腳本保存爲BAT文件,而後copy到你須要運行QTP腳本或者是LR腳本的機器上。運行在你須要運行QTP或者是LR腳本的機器上:

SET logfile="C:\Temp\RunDCOM.log"

@echo off
echo Working on default DCOM permissions  >%logfile%
echo>>%logfile%
echo>>%logfile%
echo    DCOM Access Limit Permissions   >>%logfile%
echo  >>%logfile%
dcomperm -ma set Administrators permit level:r,l  >>%logfile%
dcomperm -ma set Administrator permit level:r,l  >>%logfile%
dcomperm -ma set "Authenticated Users" permit level:r,l  >>%logfile%
dcomperm -ma set "Anonymous Logon" permit level:r,l  >>%logfile%
dcomperm -ma set Everyone permit level:r,l   >>%logfile%
dcomperm -ma set Interactive permit level:r,l  >>%logfile%
dcomperm -ma set Network permit level:r,l    >>%logfile%
dcomperm -ma set System permit level:r,l    >>%logfile%
echo
echo    DCOM Access Permissions  >>%logfile%
echo
dcomperm -da set Administrators permit level:r,l  >>%logfile%
dcomperm -da set Administrator permit level:r,l   >>%logfile%
dcomperm -da set "Authenticated Users" permit level:r,l  >>%logfile%
dcomperm -da set "Anonymous Logon" permit level:r,l   >>%logfile%
dcomperm -da set Everyone permit level:r,l   >>%logfile%
dcomperm -da set Interactive permit level:r,l   >>%logfile%
dcomperm -da set Network permit level:r,l  >>%logfile%
dcomperm -da set System permit level:r,l   >>%logfile%
echo  >>%logfile%
echo     DCOM Launch Permissions   >>%logfile%
echo   >>%logfile%
dcomperm -ml set Administrators permit level:rl,ll,la,ra   >>%logfile%
dcomperm -ml set Administrator permit level:rl,ll,la,ra  >>%logfile%
dcomperm -ml set "Authenticated Users" permit level:rl,ll,la,ra   >>%logfile%
dcomperm -ml set "Anonymous Logon" permit level:rl,ll,la,ra   >>%logfile%
dcomperm -ml set Everyone permit level:rl,ll,la,ra    >>%logfile%
dcomperm -ml set Interactive permit level:rl,ll,la,ra   >>%logfile%
dcomperm -ml set Network permit level:rl,ll,la,ra    >>%logfile%
dcomperm -ml set System permit level:rl,ll,la,ra   >>%logfile%
echo   >>%logfile%
echo     DCOM Launch Permissions   >>%logfile%
echo    >>%logfile%
dcomperm -dl set Administrators permit level:rl,ll,la,ra   >>%logfile%
dcomperm -dl set Administrator permit level:rl,ll,la,ra   >>%logfile%
dcomperm -dl set "Authenticated Users" permit level:rl,ll,la,ra   >>%logfile%
dcomperm -dl set "Anonymous Logon" permit level:rl,ll,la,ra  >>%logfile%
dcomperm -dl set Everyone permit level:rl,ll,la,ra   >>%logfile%
dcomperm -dl set Interactive permit level:rl,ll,la,ra   >>%logfile%
dcomperm -dl set Network permit level:rl,ll,la,ra   >>%logfile%
dcomperm -dl set System permit level:rl,ll,la,ra   >>%logfile%
echo   >>%logfile%
echo  >>%logfile%
echo Working on AQT Remote Agent permissions  >>%logfile%
echo  >>%logfile%
dcomperm  -runas {25E8BB22-5C86-11D4-90DA-00104B3E51B1} "Interactive User"   >>%logfile%
dcomperm  -al {25E8BB22-5C86-11D4-90DA-00104B3E51B1} Default  >>%logfile%
dcomperm  -aa {25E8BB22-5C86-11D4-90DA-00104B3E51B1} Default   >>%logfile%
echo  >>%logfile%
echo >>%logfile%
echo Working on QTP Automation Server   >>%logfile%
echo >>%logfile%
dcomperm  -runas {A67EB23A-1B8F-487D-8E38-A6A3DD150F0B} "Interactive User"  >>%logfile%
dcomperm  -al {A67EB23A-1B8F-487D-8E38-A6A3DD150F0B} Default  >>%logfile%
dcomperm  -aa {A67EB23A-1B8F-487D-8E38-A6A3DD150F0B} Default  >>%logfile%
echo  >>%logfile%
echo  >>%logfile%
echo Working on Tulip Remote Server >>%logfile%
echo  >>%logfile%
dcomperm  -runas {70396405-BE62-11D2-8F0B-00104B3E51B1} "Interactive User"  >>%logfile%
dcomperm  -al {70396405-BE62-11D2-8F0B-00104B3E51B1} Default  >>%logfile%
dcomperm  -aa {70396405-BE62-11D2-8F0B-00104B3E51B1} Default  >>%logfile%
echo  >>%logfile%
echo  >>%logfile%
echo Working on WinRunner Remote Agent  >>%logfile%
echo  >>%logfile%
dcomperm  -runas {0B171F02-F204-11D0-9398-0080C837F11F} "Interactive User"  >>%logfile%
dcomperm  -al {0B171F02-F204-11D0-9398-0080C837F11F} Default   >>%logfile%
dcomperm  -aa {0B171F02-F204-11D0-9398-0080C837F11F} Default   >>%logfile%
echo  >>%logfile%
echo >>%logfile%
echo Working on WinRunner Document object  >>%logfile%
echo  >>%logfile%
dcomperm  -runas {CD70EDCE-7777-11D2-9509-0080C82DD192} "Interactive User"  >>%logfile%
dcomperm  -al {CD70EDCE-7777-11D2-9509-0080C82DD192} Default  >>%logfile%
dcomperm  -aa {CD70EDCE-7777-11D2-9509-0080C82DD192} Default  >>%logfile%
echo  >>%logfile%
echo  >>%logfile%
echo Working on Vapi-XP object  >>%logfile%
echo  >>%logfile%
dcomperm  -runas {FCB69899-EC52-4A7A-86DB-3655E9FDBA58} "Interactive User"  >>%logfile%
dcomperm  -al {FCB69899-EC52-4A7A-86DB-3655E9FDBA58} Default   >>%logfile%
dcomperm  -aa {FCB69899-EC52-4A7A-86DB-3655E9FDBA58} Default  >>%logfile%
echo   >>%logfile%
echo   >>%logfile%
echo Working on Business Process Testing object   >>%logfile%
echo   >>%logfile%
dcomperm  -runas {6108A56C-6239-41F6-8C0F-94D9CE0D4B61} "Interactive User"   >>%logfile%
dcomperm  -al {6108A56C-6239-41F6-8C0F-94D9CE0D4B61} Default   >>%logfile%
dcomperm  -aa {6108A56C-6239-41F6-8C0F-94D9CE0D4B61} Default   >>%logfile%
echo  >>%logfile%
echo   >>%logfile%
echo Working on System Test Remote Agent  >>%logfile%
echo  >>%logfile%
dcomperm  -runas {1B78CAE4-A6A8-11D5-9D7A-000102E1A2A2} "Interactive User"  >>%logfile%
dcomperm  -al {1B78CAE4-A6A8-11D5-9D7A-000102E1A2A2} Default  >>%logfile%
dcomperm  -aa {1B78CAE4-A6A8-11D5-9D7A-000102E1A2A2} Default  >>%logfile%
echo  >>%logfile%
echo   >>%logfile%
echo Working on LoadRunner Specific Settings   >>%logfile%
echo   >>%logfile%
dcomperm  -runas {E933439A-81A1-11D4-8EEE-0050DA6171E8} "Interactive User"  >>%logfile%
dcomperm  -al {E933439A-81A1-11D4-8EEE-0050DA6171E8} Default   >>%logfile%
dcomperm  -aa {E933439A-81A1-11D4-8EEE-0050DA6171E8} Default  >>%logfile%


運行配置文件的操做步驟 

1, go to the new add in page: http://qc1d.atlanta.hp.com/qcbin/addins.html ,and click the link : HP ALM Client Registration;

2,in the new page ,click the new link  : Register HP ALM Client;

3,after you register the HP ALM client again ,refresh the DCOM to make sure that the VAPI-XP DCOM had reconfigured correctly , you can run the command 「dcomcnfg」 from start Menu , While still in the Component Services window, navigate to Console Root -> Component Services -> Computers -> My Computer -> DCOM Config ,navigate to the 「{FCB69899-EC52-4A7A-86DB-3655E9FDBA58}」 to make sure that the local path had updated to the latest VAPI remote  executable  as blow:

clip_image002[4]

4,run the attach file to reconfigure the VAPI DCOM object in the remote target host

5,rerun the VAPI test from your ALM client. I think it will ok.

 

好了,以上就就是全部的配置信息用於解決遠程運行QTP或者是LR腳本報 Access is denied 」 ,」unspecified error」。但願對你們有所幫助。若是又不太清楚的,能夠聯繫我:alterhu2020@gmail.com .Smile

相關文章
相關標籤/搜索