如何将Jenkins结果导出到HP ALM QC

时间:2015-12-09 19:20:12

标签: jenkins jenkins-plugins hp-alm

我正在使用Jenkins插件“HP Application Automation Tools”将作业结果(JUnit)导出到HP Quality Center(11.52.xx)。显然这工作正常,它创建了在测试文件夹测试集文件夹字段中指定的文件夹。

问题是它总是给我同样的错误:

 public override DbExpression Visit(DbScanExpression expression)
    {
        var table = expression.Target.ElementType as EntityType;

        if (table != null && table.Name == "User")
        {
            var rightExpression = expression.Target.EntityContainer.GetEntitySetByName("TennantUser", true).Scan();

            var join = expression.InnerJoin(rightExpression,
                (l, r) =>
                        DbExpressionBuilder.Equal(
                            DbExpressionBuilder.Property(l, "UserId"),
                            DbExpressionBuilder.Property(r, "UserId")
                        ));


            var select = join.Select(exp => DbExpressionBuilder.NewRow(
                expression.Target.ElementType.Members.Select(x => 
                    new KeyValuePair<string, DbExpression>(x.Name, exp.Property(join.Left.VariableName).Property(x.Name)))));


            return select;

        }

        return base.Visit(expression);
    }
  

失败创建实体:test-sets:parent-id = 105name = JenkinsTest   Testsubtype-ID = hp.qc.test-set.external

INFO: 'Upload test result to ALM' Post Build Step is being invoked.
INFO: 1 test result file found.
INFO: Start to upload /jenkinsm/data/jobs/JenkinsTest/builds/22/htmlreports/HTML_Report/TEST-features-JenkinsTest.xml
INFO: Start to parse file: /jenkinsm/data/jobs/JenkinsTest/builds/22/htmlreports/HTML_Report/TEST-features-JenkinsTest.xml
INFO: parse resut file succeed.
INFO: Start to login to ALM Server.
Logged in successfully to ALM Server http://XXXXX/qcbin/ using YYYY
INFO: Checking test folder...
INFO: Checking testset folder...
INFO: Uploading ALM Entities...

我很感激一些建议。感谢。

2 个答案:

答案 0 :(得分:1)

这可能是由很多原因引起的,现在我想到了什么。

您是否自定义了项目?也许您根据需要为TestSet标记了一些字段?如果这样做,自动化工具只发送默认ALM项目设置中的值,ALM不允许创建TestSet,因为缺少某些必填字段。

答案 1 :(得分:1)

根据HP知识库,Jenkins在HP ALM中的集成仅可从Quality Center 12.21获得,您使用的版本不支持集成: http://h20230.www2.hp.com/selfsolve/document/KM01698877