51Testing软件测试论坛
标题:
qtp中的设置和选项下都有一个生产脚本的按钮,而且生成的脚本不一样,请问有什么用?
[打印本页]
作者:
yhzmw
时间:
2007-3-20 16:32
标题:
qtp中的设置和选项下都有一个生产脚本的按钮,而且生成的脚本不一样,请问有什么用?
在tools --option下的生产脚本,产生的脚本是这样的
Dim App 'As Application
Set App = CreateObject("QuickTest.Application")
App.Launch
App.Visible = True
App.Options.DisableVORecognition = False
App.Options.AutoGenerateWith = False
App.Options.WithGenerationLevel = 2
App.Options.TimeToActivateWinAfterPoint = 500
App.Options.SaveLoadAndMonitorData = True
App.Options.Run.RunMode = "Fast"
App.Options.Run.ViewResults = False
App.Options.Run.CaptureForTestResults = "OnError"
App.Options.Web.AddToPageLoadTime = 10
App.Options.Web.CheckBrokenLinks = True
App.Options.Web.RecordCoordinates = False
App.Options.Web.RecordMouseDownAndUpAsClick = False
App.Options.Web.RecordAllNavigations = False
App.Options.Web.RecordByWinMouseEvents = ""
App.Options.Web.BrowserCleanup = False
App.Options.Web.RunOnlyClick = False
App.Options.Web.RunMouseByEvents = True
App.Options.Web.RunUsingSourceIndex = True
App.Options.Web.EnableBrowserResize = True
App.Options.Web.PageCreationMode = "URL"
App.Options.Web.CreatePageUsingUserData = "Get Post"
App.Options.Web.CreatePageUsingNonUserData = ""
App.Options.Web.CreatePageUsingAdditionalInfo = True
App.Options.Web.FrameCreationMode = "URL"
App.Options.Web.CreateFrameUsingUserData = "Get Post"
App.Options.Web.CreateFrameUsingNonUserData = ""
App.Options.Web.CreateFrameUsingAdditionalInfo = True
App.Options.WindowsApps.AttachedTextRadius = 35
App.Options.WindowsApps.AttachedTextArea = "TopLeft"
App.Options.WindowsApps.ExpandMenuToRetrieveProperties = True
App.Options.WindowsApps.NonUniqueListItemRecordMode = "ByName"
App.Options.WindowsApps.RecordOwnerDrawnButtonAs = "PushButtons"
App.Options.WindowsApps.ForceEnumChildWindows = 0
App.Options.WindowsApps.ClickEditBeforeSetText = 0
App.Options.WindowsApps.VerifyMenuInitEvent = 0
App.Folders.RemoveAll
App.Folders.Add("<当前测试>")
在test --seting下的生产脚本按钮生产的脚本是这样的
Dim App 'As Application
Set App = CreateObject("QuickTest.Application")
App.Launch
App.Visible = True
App.Test.Settings.Launchers("Web").Active = False
App.Test.Settings.Launchers("Web").Browser = 1
App.Test.Settings.Launchers("Web").Address = "http://newtours.mercuryinteractive.com "
App.Test.Settings.Launchers("Web").CloseOnExit = True
App.Test.Settings.Launchers("Windows Applications").Active = False
App.Test.Settings.Launchers("Windows Applications").Applications.RemoveAll
App.Test.Settings.Run.IterationMode = "rngAll"
App.Test.Settings.Run.StartIteration = 1
App.Test.Settings.Run.EndIteration = 1
App.Test.Settings.Run.ObjectSyncTimeOut = 20000
App.Test.Settings.Run.DisableSmartIdentification = False
App.Test.Settings.Run.OnError = "Dialog"
App.Test.Settings.Resources.DataTablePath = "<Default>"
App.Test.Settings.Resources.ObjectRepositoryPath = "<Per-action>"
App.Test.Settings.Resources.Libraries.RemoveAll
App.Test.Settings.Web.BrowserNavigationTimeout = 60000
App.Test.Settings.Web.NextPageIfObjNotFound = False
App.Test.Settings.Web.ActiveScreenAccess.UserName = ""
App.Test.Settings.Web.ActiveScreenAccess.Password = ""
请问这两个脚本有什么用?
如图
作者:
milo.jiang
时间:
2007-3-20 17:35
正如使用 QuickTest 实现应用程序测试自动化一样,也可以使用 QuickTestProfessional 自动化对象模型实现 QuickTest 操作自动化。可以使用由QuickTest 自动化对象模型公开的对象、方法和属性来编写程序,用以配置QuickTest 选项和运行测试或业务组件,而不必使用 QuickTest 界面手动执行这些操作。
自动化程序在以下情形特别有用:多次执行相同任务或就多个测试或组件执行相同任务;根据特定环境或应用程序的需要快速配置 QuickTest
具体可以看使用手册“高级功能”中的“实现QuickTest操作自动化”
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2