开发者社区> 长征2号> 正文

Automation prepare steps

简介:
+关注继续查看

自己开发的一个结合QTP 和Hudson的一个框架》

| Step Name | Description | Expected Result 
| Create host instance from template | Choose a template, instantiate the system from template.If creating a new server from OS iso image, see next step. | 
| | | 
| Call <Automation_VMware_instance_from_ISO_create_auto> | Call <Automation_VMware_instance_from_ISO_create_auto> | 
| | | 
| Activate windows | run command slui.exe to activate windows after setting the hostname and ip address. | 
| | | 
| activate windows | If prompted, you can try to activate windows but it will likely fail because a network connection is not yet created. Instead slect 'ask me later' | 
| | | 
| Set host name and IP address | Log into the host, change the IP address, hostname, domain.reboot | 
| | | 
| Set windows to not update automatically | Configure windows update to check for updates but not download or install them unless you review them. | 
| | | 
| Install ALM Addins | The following add ins are required in order to remotely execute ALM tests.Log into the hostStart IEGo to http://qc2d.atlanta.hp.com/qcbinSelect 'Add Ins Page'HP Quality Center Connectivity Add-inSelect 'HP Quality Center Connectivity'Either run the install from the link or download and then run from hard drive.File is also available at \\pdebld1.fc.hp.com\qatest\software\qtp\qtp11\HP_QC_Connectivity_Addin\tdconnect.exeHP Quality Center System Test Remote Agent Add-inWhen installer finishes, return to the add in page.Select "HP Quality Center System Test Remote Agent Add-in"Either run the install from the link or download and then run from hard drive.File is also available at \\pdebld1.fc.hp.com\qatest\software\qtp\qtp11\QTP11_QC_System_Test_Remote_Agent\SysAgent.exeHP ALM Client Registration Add-inWhen installer finishes, return to the add in page.Select 'HP ALM Client Registration'Select 'Register HP ALM Client'If prompted, install the active X controlIf prompted, accept to install any required files.Note this install can take up to 15 minutes, and the browser may appear unresponsive.Wait at least 15 minutes and if the installer does not indicated complete, then stop the browser and try the install again.If prompted, install "Microsoft .NET Framework 3.5 service pack 1", which is required for the client registration.If IE displays a message that is is not configured to download files, then close all windows, run inetcpl.cpl, select security tab, click internet, click customer level button, scroll to download category, set 'file download' to enable and 'automatic prompting for file downloads" to enable, click ok, yes, close window, try download again.If you receive a message that "You must use the role management tool to install or configure microsoft .Net Framework 3.5 SP1" then In Windows Server 2008 R2, you don’t have to install .Net Framework 3.0, it was include in .Net Framework 3.5. You can navigate to Server Manager > Features > Add Features to add .Net Framework.If prompted, download and install 'Microsoft Visual C++ 2005 Service Pack 1 redistributable Package MFC Security Update", you will need the x86 version even if installing on a 64 bit machine.Close the browser window | 
| | | 
| Enable remote execution communication | For vapi-xp scripts to run the firewall on the test hos must allow communication.Currently, I don this by disabling the firewall.There are probably more specific settings that could be used. | 
| | | 
| Turn off windows Firewall | Start windows Server ManagerThis can be done by clicking the server icon on the windows task barIn task manager navigate to windows firewallTurn off the firewall for all profiles (Domain, Private, Public) | 
| | | 
| Enable psexec connections | Open firewall: start, admin tools, windows firewallSelect inbound rulesEnable the following entries under "File and Printer Sharing" Echo RequestICMpv4-InICMpv6-InNB-Datagram-InNB-Name-InNB-Session-In | 
| | | 
| Turn off UCA | Copy file \\pdebld1.fc.hp.com\qatest\software\EnableUAC2k8Server.regand put into c:\tempNote: login to pdebld1.fc.hp.com is qatest\L0ngh)rnExecute EnableUAC2k8Server.reg by double clicking itThe script should finish with 5 seconds. | 
| | | 
| Turn of UAC | For vapi-xp scripts to run remotely as 'qatest', UAC must be turned off. There may be more specific settings to allow 'qatest' to run remotely, but for now I am turning off 'UAC' | 
| | | 
| Enable remote desktop | Enable remote desktop. | 
| | | 
| Configure quick launch | place the following icons on the quick launch bar:IEcommand windowwindows explorerconfigure command window to allow quick edit modeconfigure windows explorer to not hide known file extensionsStep through IE configuration | 
| | | 
| Create qatest user | LoginCreate administrative user qatest. | 
| | | 
| Set pasword to never expire | Set Administrator and qatest accounts so password never expires | 
| | | 
| To be automated | the following steps may be automated | 
| | | 
| Create c:\temp | create directory c:\temp | 
| | | 
| Install windows updates | If required install windows updates. | 
| | | 
| Copy over baretail | Copy baretail from \\pdebld1\qatest\software\baretail and put into c:\ | 
| | | 
| Install OS language | Install any OS languate required.Set to the default and system language. | 
| | | 
| Install web browser | Install any web browser required for testing.Set browser to the default browserSet browser to a home page of 'blank'Set bowser to use web proxy 'web-proxy.fc.hp.com:8088' and to bypass the web proxy for the following: *.hp.com 15.* 16.*Step through any web browser config requests when the browser is opened so these will not be seen every time the browser opens. | 
| | | 
| Call <Both_Antivirus_install> | Call <Both_Antivirus_install> | 
| | | 
| Configure browser to explicitly bypass proxy for local address | To ensure 5.x and 7.x I-RS interfaces will display when run locally using host name, the browsers need to be set to explicitly bypass the proxy for local addresses.IE: open IE, select Tools, Internet options, connections, lan settings, select bypass proxy server for local address, click advanced for the proxy server, add exception ‘*.hp.com’, ok/apply to save and close settings"FF: Open FF, tools, options, advanced, network, settings, in the 'no proxy for' box, add "*.hp.com", ok/apply to save and close settings. | 
| | | 
| Log in as correct user | In order for automated tests to run, a user must be logged into the system.Also, the user the automated tests are to be run as must be logged in.From the vshpere client, select the host, right click, open console.Hit ctl-alt-insert, then enter the login for the user required for testing.leave the console open until the next step to capture the snapshot is complete. Determine what local user the tests should run as. This is available by looking at past test sets executed on the host and determining what user, administrator or qatest, the test were to be executed as.Start the vmware client associated with the test host you are saving a snapshot for. Example: log into webes-schnapps if the test host is hosted by webes-schnaps; log into webesvcgalway if the test host is hosted by webesvcgalwayFind the test host in the vsphere listing, right click and select 'open console'Wait for the console window to openClick the open consoleIf the local user is not logged in, select keys ctrl-alt-insert to obtain the login prompt. Log in as the user that the tests are to operate as.If the local user is already logged in, verify the correct user is logged in: start, run, cmd.exe, in the command window enter 'whoami' and then return. If the user name is not correct, then logout and log back in (see above step for logging in) | 
| | | 
| Call <Both_Windows_Windows_Installer_4.5> | Call <Both_Windows_Windows_Installer_4.5> | 
| | | 
| Take Baseline_noPrep snapshot | Take system snapshot named 'Baseline_noPrep'.In comments enter the date in format YYYYMMDD and your name and the template used. | 
| | | 
| Update automation spreadsheets | Update testdata.xls and Snapshot_Configuration.xls with host and lun information.The autoamtion tests need to know the host's lun, name, ip address in order to function. |
| | | 
| Call <Both_Postgre_ODBC_Driver_DSN_install> | Call <Both_Postgre_ODBC_Driver_DSN_install> | 
| | | 
| Call <Both_Windows_Screen_saver_timeout> | Call <Both_Windows_Screen_saver_timeout> | 
| | | 
| Update vmware tools | | 
| | | 
| Install certifcate | Install the HP certificate.This is required for the host to communicate with the data center. | 
| | | 
| Turn off Firefox updating | This must be done on all systems where Firefox is installed, even if FireFox is not used for testing.Start Firefox.Tools, Options, UpdateIn "Automatically check for updates to" section, UN-check all boxes.Click OK | 
| | | 
| Prevent Internet Explorer config request | When IE 8 or 9 is installed, IE will request the user to walk through some config windows.Typically user click the 'Ask later" button to prevent walking through the IE config windows, but the user will be asked the next time IE is started.For automation, this constant request for configuration info is problematic.Therefore, the config request screens should be walked through to prevent the request for occuring in the future.Start IEIf asked to walk through configuration screens, then walk through the screens. For each question select the option that will cause the least amount of processing overhead. For example, select to NOT load any special features, select to NOT load a favorite search engine, etc.If not asked to walk through config screens, then the walk through has already been done.Note IE9 presents the pop up request at the BOTTOM of the screen. | 
| | | 
| Make IE9 status bar visible | If the host has IE9 installed, ensure IE9 is displaying its status bar: -Start IE9-Move the cursor over the top area of the window-Right click and select 'status' so that status has a check mark next to the text and the status bar is shown at the bottom of the window. | 
| | | 
| Run prep script | Copy file \\pdebld1.fc.hp.com\auto\Test_Script\0000_Server_prep.vbs to c:\tempNote: login to \\pdebld1.fc.hp.com is qatest\L0ngh)rnExecute c:\temp\0000_Server_prep.vbs by double clicking on the file.The script should run and finish within 15 seconds.You can review the log file on the test host at c:\irsautomation\test_result_log\0000_Server_prep.logThe last entry will indicate the script finished.Move file 0000_Server_prep.vbs from c:\temp to c:\irsautomation\test_scripts | 
| | | 
| Call <Automation_ALM_install_auto> | Call <Automation_ALM_install_auto> | 
| | | 
| Call <Automation_QTP11_install_auto> | Call <Automation_QTP11_install_auto> | 
| | | 
| Start and configure QTP11 Remote Agent | Start the QTP Remote agent -Start, programs, HP Quick Test Professional\tools\Remote Agent -A new icon will appear on the Windows taskbar. The icon looks like a yellow gear. -Right click on the Remote Agent icon, and select Settings -The Remmote Agent settings window is displayed -Select log leve setting of 'Low' -Enter log folder value of c:\irsautomation\test_results_log -Set 'Cleanup, Restart testing tool after " to 1 runs -Uncheck 'Run Quicktest in hidden mode' -Check 'Keep QuickTest open after a test lab run session ends' -Set 'seconds to operation' to a value of 2700 (this is represents 45 minutes) -Set 'seconds for queries' to a value of 2700 (this is represents 45 minutes) -Leave all other defaults and click OK | 
| | | 
| Reboot the server | Reboot the server | 
| | | 
| Verify Remote Agent started up | Log into the serverVerify the Remote Agent icon is listed in the windows task bar.The icon looks like a yellow gear.The icon is displayed in the lower right corner of the windows task bar.Right click on the icon, and select Settings.Verify the settings are set to low logging to directory c:\irsautomation\Test_Result_Log | 
| | | 
| Clean up hard drive | Deleted c:\temp\qtp11Empty the recycle bin | 
| | | 
| Wait for processes to finish | QTP tests will not be able to start if a snapshot is created while the OS is performing resource intensive processes, such as a virus scan. Therefore, the OS processing status must be verified to be in a proper status prior to saving a snapshot.Starte task manager (either ctrl-alt-del or ctrl-alt-end and then select task manager, or move the cursor over the OS taskbar, right click, and select 'start task manager')Review the process tab, sorting descendign on the 'cpu' column to determine if a processes is using a large amount ( > 20%) of the CPU. If a processes is using a lot of CPU, wait for the process to finish and the CPU usage is low before moving to the next step to save a snapshot.Note: process rtvscan is a virus scan process | 
| | | 
| Reboot | Reboot the host before taking a snapshot. | 
| | | 
| Save Snapshot | After making changes to an automated test host, save a snapshot. The saved snapshot will provide the starting point for the automated test. It is important that when saving a snapshot the local host user is logged into the local console (not a remote desktop or terminal services session). The automated tests cannot start execution unless the local user is logged in Once the user is logged in, save the snapshot. Use the correct snapshot name and change the name of any previous snapshots with the same name to be different. If two snapshots have the same name, the automated tests will not run. Example: an existing snapshot named 'Baseline_None_noRelease' has been updated. Rename the existing snapshot to 'Baseline_None_noRelease_old', then save the new snapshot to name 'Baseline_None_noRelease'Delete any unnecessary snapshots. | 
| | |                 


本文转自hcy's workbench博客园博客,原文链接:http://www.cnblogs.com/alterhu/archive/2012/11/01/2749859.html,如需转载请自行联系原作者。

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,大概有三种登录方式:
9646 0
如何设置阿里云服务器安全组?阿里云安全组规则详细解说
阿里云安全组设置详细图文教程(收藏起来) 阿里云服务器安全组设置规则分享,阿里云服务器安全组如何放行端口设置教程。阿里云会要求客户设置安全组,如果不设置,阿里云会指定默认的安全组。那么,这个安全组是什么呢?顾名思义,就是为了服务器安全设置的。安全组其实就是一个虚拟的防火墙,可以让用户从端口、IP的维度来筛选对应服务器的访问者,从而形成一个云上的安全域。
17118 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,阿里云优惠总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系.
25036 0
使用SSH远程登录阿里云ECS服务器
远程连接服务器以及配置环境
13399 0
阿里云服务器ECS登录用户名是什么?系统不同默认账号也不同
阿里云服务器Windows系统默认用户名administrator,Linux镜像服务器用户名root
13882 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,云吞铺子总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系统盘、创建快照、配置安全组等操作如何登录ECS云服务器控制台? 1、先登录到阿里云ECS服务器控制台 2、点击顶部的“控制台” 3、通过左侧栏,切换到“云服务器ECS”即可,如下图所示 通过ECS控制台的远程连接来登录到云服务器 阿里云ECS云服务器自带远程连接功能,使用该功能可以登录到云服务器,简单且方便,如下图:点击“远程连接”,第一次连接会自动生成6位数字密码,输入密码即可登录到云服务器上。
33284 0
阿里云ECS云服务器初始化设置教程方法
阿里云ECS云服务器初始化是指将云服务器系统恢复到最初状态的过程,阿里云的服务器初始化是通过更换系统盘来实现的,是免费的,阿里云百科网分享服务器初始化教程: 服务器初始化教程方法 本文的服务器初始化是指将ECS云服务器系统恢复到最初状态,服务器中的数据也会被清空,所以初始化之前一定要先备份好。
14710 0
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
18606 0
+关注
1703
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
JS零基础入门教程(上册)
立即下载
性能优化方法论
立即下载
手把手学习日志服务SLS,云启实验室实战指南
立即下载