天天看點

TestDirector常見FAQ

1. RPC錯誤

一般來說,如果你安裝TD後,修改administrator後,就會報RPC錯誤。解決辦法:執行dcomcnfg.exe,找到TD程序,修改密碼的地方,修改到新的密碼就可以了。

2.不能自動發郵件

  設定郵件自動分發要做如下操作:

(1)在customize的configure mail中設定EAMIL的發送條件。 

(2)在Sit Administrator的projects lab中選中E-mail defects automaticlly複選框。

(3)在Site Config lab中設定MAIL-FORMAT為html或是Text;在MAIL-INTERVAL中設定間隔時間,

(4)在Site Administrator 的User頁面給使用者設定Email位址。

3. TD的備份

1、備份DomsInfo目錄。預設在C:/Program Files/Common Files/Mercury Interactive下。這個目錄包含了Doms.mdb檔案(使用者資訊和工程清單)、connection strings(連接配接字元串)、parameters(參數)、global style sheets(全局風格表)、the database template(Empty_DB.mdb)(一些臨時資料)2。備份安裝目錄。如:TD_Dir。包含每個工程的自動測試、附件、設定、風格清單。3。備份資料庫。Access不用備份,它包括在第二部分中。

4.TD還原

 1) 在另一台伺服器上安裝好Test Directory(資料庫不能和原來的TD資料庫在同一台機子上)

 2) 進入site administrator 在 default domain 下建立和原project 相同名稱的project

        例如原來的伺服器上project 名字叫xxx ,在新的伺服器上建立一個名字為xxxx的project

  3) 建立好Project後 ,将原來伺服器上TD_dir(就是那個安裝TD時需要設定成共享檔案夾的目錄,可能和

       你自己機子上的名稱不同)目錄下Default目錄下需要轉移的project檔案複制到你在新伺服器上建立的

       project檔案夾下,複制時請不要複制project 檔案夾下的Dbid.ini檔案。例如,你需要轉移default domain 下面   的project ehr, 在原來的伺服器上TD_dir檔案夾下将ehr檔案夾複制到新的伺服器 TD_dir檔案夾下default 檔案夾下覆寫掉建立project 時建立的檔案夾ehr,複制時去掉Dbid.ini檔案。

  4) 還原TD資料庫。 首先須需要備份原來TD的資料庫。 當你在建立project 時,會選擇一台資料庫伺服器,備份好原來的資料庫,通過SQL企業管理器打開建立project 的資料庫,假設project 名字叫xxx,在資料庫伺服器上會建立一個名字叫default_xxx_db,在此資料庫上還原剛才備份的資料庫

  5) 更改目前資料庫中 SQL Server 使用者與 Microsoft? SQL Server? 登入之間的關系

       資料庫還原後使用者TD并沒有操作default_ehr_db 資料庫的權限,是以TD還不能正常使用,需要使用下面語句

       exec sp_change_users_login 'update_one' , 'td' , 'td

6)如何送出缺陷到CQ伺服器

在WorkFlow中增加函數Public Sub CreateCQDefect()

Dim gettdid, strCQID

' '連接配接到TD控件

Set tdc = CreateObject("TDAPIOLE.TDConnection")

 Call tdc.InitConnectionEx("http://xxxxxxx/tdbin")

 If (tdc.Connected = False) Then

   Exit Sub

 End If

'連接配接到TD,用使用者名和密碼

Call tdc.ConnectProjectEx("default", "xxxx", "admin", "qatest")

  If (tdc.ProjectConnected = False) Then

    tdc.ReleaseConnection

    Exit Sub

  End If

'連接配接到TD指令,查詢出TD的defetid.

 Set com = tdc.Command

     com.CommandText = "select SQ_SEQ_VALUE from SEQUENCES where SQ_SEQ_NAME='BUG'"

 Set recSet = com.Execute

    gettdid = CInt(recSet.FieldValue(0))

'得到defect的模式

 Set bf = tdc.BugFactory

 Set bg = bf.Item(gettdid)

 strCQID = bg.Field("BG_USER_01")

 If Len(strCQID) = 0 Then

    entityDef.SetFieldValue "State", "Booked"

    entityDef.SetFieldValue "CaseID", "Booked"

    entityDef.SetFieldValue "FromDefectID", "Booked"

    entityDef.SetFieldValue "Headline", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Project", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Module", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Function", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Serverity", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Priority", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Owner", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Symptoms", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Origin", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "SubType", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "TestTimes", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Test_Tag", bg.Field("BG_SUMMARY")

    '--------------------------------------------------------

    entityDef.SetFieldValue "Description", strDescription

    entityDef.SetFieldValue "Submitter", tdc.User.UserName

    entityDef.SetFieldValue "Submit_Date", Date

    entityDef.SetFieldValue "TD_ID", strDefectID

    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''

    entityDef.SetFieldValue "Company", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Customzation", bg.Field("BG_SUMMARY")

    entityDef.SetFieldValue "Edition", bg.Field("BG_SUMMARY")

    '--------------------------------------------------------------

    '-------------------------------------------------------------

   Dim strCheck

   strCheck = entityDef.Validate

   If (strCheck = "") Then

     entityDef.Commit

     'Get ID of new ClearQuest defect and save to field in TestDirector.

     strCQID = entityDef.GetFieldValue("id").GetValue

     bg.Field("BG_USER_30") = strCQID

     bg.Post

     bg.Refresh

     Call MsgBox("Defect has been created in ClearQuest with an ID of '" & strCQID & "'.", 64, "ClearQuest Defect Created")

   Else

     MsgBox ("ClearQuest Error")

   End If

 End If

End Sub