Massenaenderung

Moderatoren: moestereich, rscholz660

Massenaenderung

Beitragvon quicktest am Fr Sep 03, 2010 3:16 pm

Hi,

das ist so eine Frage, bei der ich nicht weiss, ob ich sie eher bei QC oder doch unter QTP stellen sollte.

Wie wuerdet ihr vorgehen, wenn ihr eine Veraenderung an allen vorhandenen QTP Scripten die Ihr in einem QC Projekt habt machen wollt.

Bestes Beispiel wohl das Aendern von Add-Ins oder neue QTP version und dann einmal alle unter dem neuen QTP oeffnen und speichern (z.B. mit dem neuen QTP10 Format)...

Ich hab mal quick and dirty versucht,
direkter Zugriff auf das Filesystem des QC Servers,
Alle Pfade ins Excel ausgegeben und dann per VBA peu a peu eins nach dem anderen in QTP (als Objekt)
oeffnen und schliessen (mit Aenderungen Speichern)...

Leider stuerzt das ganze nach 3 bis max 5 QTP scripten ab...

Hat jemand schon mal was aehnliches versucht?

Die Luxusvariante waere natuerlich eine Kopie in ein anderes (leeres) QC Projekt aber mal schaun,
ob jemand sich auch schon mal mit dem Problem(chen) beschaeftigen "durfte" ;-)

Viele Gruesse

Nikolai
quicktest
 
Beiträge: 6
Registriert: Di Aug 31, 2010 2:02 pm

Re: Massenaenderung

Beitragvon dscholz am Mo Sep 06, 2010 1:33 pm

Hallo,

in der Hilfe zur "Quicktest Professional Automation" gibt es ein Beispiel "Convert a Set of Tests from an Older QuickTest Version to the Current Version", das im Prinzip genau so vorgeht. Ich zitiere daraus den Code:
Code: Alles auswählen
'************************************************************************************************************************
'Description:
'
'This example specifies a folder in which tests from an older QuickTest version are
'stored and then loops through each test in the folder (and its subfolders) to open
'each one and save it in the current version format.
'
'************************************************************************************************************************

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim filesys
Dim maindir
Dim testCol
Dim checkfolder

' Create the QuickTest Professional object
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True

' Get the collection of test scripts
Set filesys = CreateObject("Scripting.FileSystemObject")

' TO DO: Sepecify the test script directory....
Set maindir = filesys.GetFolder("C:\temp")
Set testCol = maindir.SubFolders

' Loop through each test in the collection
For Each fl In testCol

    ' Verify the folder is a QTP test
    checkfolder = fl.Path & "\Action0"
    If (filesys.FolderExists(checkfolder)) Then ' The folder is a QTP test folder

       ' Convert test
       qtApp.Open fl.Path, False, False

       ' wscript.sleep 1000

       ' Save converted test
       qtApp.Test.Save

    End If
Next

qtApp.Quit

' Release the File System Objects
Set testCol = Nothing
Set maindir = Nothing
Set filesys = Nothing

' Release the QuickTest Professional application object
Set qtApp = Nothing


Im Prinzip wird hier nix anderes gemacht. Vielleicht hilft es, ein paar Waits einzubauen (wscript.Sleep).

GruĂź,
Daniel
dscholz
 
Beiträge: 143
Registriert: Mi Aug 06, 2008 11:59 am
Wohnort: Hamburg

Re: Massenaenderung

Beitragvon dscholz am Mo Sep 06, 2010 1:44 pm

Noch eine Ergänzung: Ein Kollege (danke an ThomasJ) hat mich darauf aufmerksam gemacht, dass es von HP ein Tool gibt, mit dem man die QTP Tests auf Version 10 heben kann. Es handelt sich dabei um das QTP Asset Upgrade Tool, zu finden ist es hier: http://support.openview.hp.com/selfsolv ... t/KM896902 oder auf dem QTP Installationsmedium unter "\Asset Upgrade Tool for QC". Hinweis: Damit werden aber nur QTP Tests konvertiert, die im QC liegen.

Danke nochmal an ThomasJ fĂĽr den Hinweis.

GruĂź,
Daniel
you know we aren't meant to exist in the outside world
dscholz
 
Beiträge: 143
Registriert: Mi Aug 06, 2008 11:59 am
Wohnort: Hamburg


ZurĂĽck zu QuickTest Pro 9.x

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast

cron