OTA-ALM 11.52-通过OTA构建图 [英] OTA - ALM 11.52 - Building Graphs through OTA

查看:69
本文介绍了OTA-ALM 11.52-通过OTA构建图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用OTA和HP ALM 11.52在分析视图"中创建报告.我搜索了《 OTA参考文档》并在线查找了样本,但发现了一些样本,但似乎没有用.

I am trying to create reports in the 'Analysis View' using OTA and HP ALM 11.52. I've searched the OTA Reference Documentation and looked for samples online and I've found a few samples, but none seem to work.

似乎使用了三种方法:

TDConnection.GraphBuilder.BuildGraph(GraphDefinition)

TDConnection.testFactory.BuildSummaryGraph("TS_STATUS", "TS_STATUS", "", 0, myFilter, False, False)

and a third method involving an AnalysisItemFactory object that I can't find anywhere in the OTA documentation.

我尝试了前两个,它们似乎在运行时不会触发错误,但是ALM中没有图形.

I've tried the first two and they seem to run without triggering an error, however, no graph appears in ALM.

这两种方法之间是否有区别,哪一种是最干净的方法?

Is there a difference between these methods and which is the cleanest method?

到目前为止,这是我的尝试:

Here are my attempts so far:

        '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        'Method 1: GraphBuilder

        'Set GB = QCConnection.GraphBuilder

        'Set G1 = GB.CreateGraphDefinition(2, 0)
        'G1.Property(0) = "TS_NAME"
        'G1.Property(1) = "TC_STATUS"
        'Set tsf = QCConnection.TestSetFactory
        'Set myFilter = tsf.Filter
        'myFilter.Filter ("TC_STATUS") = "Not(N/A)"
        'G1.Filter = "Filter: Status[Not N/A]"
        'Set g = GB.BuildGraph(G1)

        '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        'Method 2: BuildSummaryGraph            

        'Dim testF
        'Dim graph1
        'Dim Filter

        'Set testF = QCConnection.testFactory

        'Set myFilter = testF.Filter
        'myFilter.Filter("TS_STATUS") = "Not(N/A)"

        'Set graph1 = _
        'testF.BuildSummaryGraph("TC_NAME", "TS_STATUS", "", 0, myFilter, False, False)

        '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        'Method 3: AnalysisItemsFactory? I can't find any documentation on this object, yet I've seen it referenced in other code samples.

        'Set aiFolderFact = QCConnection.AnalysisItemFolderFactory
        'Set aiFact = QCConnection.AnalysisItemFactory ~~~ This line actually runs fine so I know it at least exists. But I am definitely not using the proper methods below.

        'Set G1 = aiFact.AddItem("")
        'G1.Field("AI_PARENT_ID") = 1001 'Public
        'G1.Field("AI_TYPE") = "Graph"
        'G1.Field("AI_SUB_TYPE") = "Progress Graph"
        'G1.Field("AI_OWNER") = qcUserName.Value
        'G1.Field("AI_MODULE") = "requirement"
        'G1.Field("AI_NAME") = "test graph"

        'G1.Post

正如我之前提到的,所有这些脚本都运行无错误,但是在分析视图"中看不到任何图形.我还注意到似乎没有名称"或路径"字段.

As I mentioned previously, all of these scripts run error free, but I see no graph in the Analysis View. I've also noticed that there seem to be no "Name" or "Path" fields.

我看过这些表,似乎有"Analysis_Item_Folder"和"Analysis Items"表,因此可以通过OTA客户端进行此操作.是否有AnalysisItemFactory,有人可以提供我想要的示例脚本吗?

I've taken a look at the tables, and there seems to be 'Analysis_Item_Folder' and 'Analysis Items' tables so It's know it's possible to do this through the OTA client. Is there an AnalysisItemFactory and could someone please kindly provide a sample script of what I'm looking for?

推荐答案

我能够在

I was able to generate a report with the help of this HP ALM forum entry. As in the forum mentioned it is not an official documented feature of HP ALM. Therefore it can be that in the future it won't work without replacement. Please keep that in mind.

万一论坛条目可能被删除,我复制了一个名为" delarosa62 (复制日期2015/9/8):

In case the forum entry may get deleted I copied the answer by a user called "delarosa62" here (date of copy 2015/9/8):

您好,MichaelMotes和其他社区成员.

我开发了VBA代码来自动生成仪表板标准报告.我得到了您提到的成功例外".但是我的报告没有在硬盘上生成.

我没有任何错误.我已使用OTA将您的Visial基本代码改编为VBA.我在VBA模块窗口的tools/reference选项中注册了otareport 1.0类型库和otaxml类型库.

我在下面粘贴了我的代码,希望大家能对此有所了解.我没有任何错误.只是其中包含成功完成消息的例外.

I am pasting my code below hoping you guys can give me some insight on this. I am not getting any errors. Just the exception which includes a successful completion message.

Sub externalSTDReports()

    Dim reqFact  
    Dim reqFilter  
    Dim reqList      
    Dim gTDConn As Object  

    Set gTDConn = CreateObject("TDApiOle80.TDConnection")

    'QC Connection data    

    login_id = ActiveWorkbook.Sheets("CONFIG").Cells(9, 3).value  
    login_passwd = ActiveWorkbook.Sheets("CONFIG").Cells(10, 3).value  
    domain_name = ActiveWorkbook.Sheets("CONFIG").Cells(11, 3).value  
    project_name = ActiveWorkbook.Sheets("CONFIG").Cells(12, 3).value  
    server_name = ActiveWorkbook.Sheets("CONFIG").Cells(13, 3).value            

    gTDConn.InitConnectionEx server_name      
    gTDConn.login login_id, login_passwd      
    gTDConn.Connect domain_name, project_name

    Set Rep = New OTAREPORTLib.Reporter            
    Call Rep.SetConnection(gTDConn, 0)     ' This line  doesn´t return errors. But I don´t know if it is correct                      
    Set RepConf = Rep.ReportConfig                        
    Rep.File = "C:\Users\cris\AppData\Local\Temp\TD_80\4c223b57\Reports\std.html"            
    Rep.Template = "C:\Users\cris\AppData\Local\Temp\TD_80\4c223b57\Reports\default.xsl"
    '******************************************************** filter Reports    

    Set aiFact = gTDConn.AnalysisItemFolderFactory  
    Set reportFact = gTDConn.AnalysisItemFactory
    Set aiFilter = aiFact.Filter  
    Set aiList = aiFilter.NewList  
    Set anf = reportFact.Filter  

    Dim FilterStr As String       

    For Each ai In anf.NewList            
        reportName = ai.Name       
        reportID = ai.id           

        If reportName = "tmp" Then                 
            FilterStr = ai.Field("AI_FILTER_DATA")             
            RepConf.Filter = FilterStr                

            On Error Resume Next 
            'i is empty. Don´t know why

            i = Rep.Generate(0, 0)                 MsgBox i & " --- " & Rep.File                         Debug.Print Rep.File      '--------------------         Exit For      
        End If
    Next

    Set gTDConn = Nothing   
    Set aiFact = Nothing   
    Set reportFact = Nothing
    Set aiFilter = Nothing     
    Set aiList = Nothing    Set anf = Nothing
    Set RepConfig = Nothing
    Set Rep = Nothing          

    MsgBox "END "
End Sub    'Pls HELP!!

这篇关于OTA-ALM 11.52-通过OTA构建图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆