From b90a20f997feed6979b2001ec86abf1209a24518 Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Wed, 29 Oct 2008 20:52:55 +0000
Subject: [PATCH] Issue 851: log archiving, reporting and results collection
---
opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-groups-report.xsl | 6
opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-logs.xsl | 16 +
opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-suites-report.xsl | 12
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/virtualAttributes/virtualAttributes_cos.xml | 10
opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml | 27 +
opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-tests-report.xsl | 581 +++++++++++++++++++++++++++++++++++++++++
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_uniquemember.xml | 40 +-
opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml | 5
opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_member.xml | 44 +-
opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml | 75 ++++
10 files changed, 739 insertions(+), 77 deletions(-)
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-groups-report.xsl b/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-groups-report.xsl
index 065d258..8fe194b 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-groups-report.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-groups-report.xsl
@@ -36,7 +36,7 @@
<!-- Tests log XML document -->
<xsl:variable name="tests-log-doc" select="document($tests-log)"/>
- <!-- Test Report Header Variables -->
+ <!-- Test Groups Report Header Variables -->
<xsl:variable name="ft" select="qa/functional-tests"/>
<xsl:variable name="id" select="$ft/identification"/>
<xsl:variable name="sut" select="$id/sut"/>
@@ -74,7 +74,7 @@
<link rel="stylesheet" href="https://opends.dev.java.net/public/css/opends.css" type="text/css" />
<xsl:element name="title">
- <xsl:value-of select="concat('Test Report for OpenDS ',$version)"/>
+ <xsl:value-of select="concat('Test Groups Report for OpenDS ',$version)"/>
</xsl:element>
</xsl:element>
@@ -82,7 +82,7 @@
<table class="tertmasttable" width="100%" cellspacing="0">
<tbody>
<tr>
- <td><div class="collectionheader"><xsl:value-of select="concat('Test Report for OpenDS ',$version)"/></div></td>
+ <td><div class="collectionheader"><xsl:value-of select="concat('Test Groups Report for OpenDS ',$version)"/></div></td>
<td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
</tr>
</tbody>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-logs.xsl b/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-logs.xsl
index a180fdf..1aedbfc 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-logs.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-logs.xsl
@@ -128,7 +128,7 @@
<xsl:element name="table">
<xsl:attribute name="border">
<xsl:value-of select="'1'"/>
- </xsl:attribute>
+ </xsl:attribute>
<xsl:element name="tr">
<xsl:element name="th">
@@ -151,7 +151,19 @@
<xsl:value-of select="@timestamp"/>
</xsl:element>
<xsl:element name="td">
- <xsl:value-of select="@level"/>
+ <xsl:choose>
+ <xsl:when test="@level = 'Start'">
+ <xsl:element name="a">
+ <xsl:attribute name="name">
+ <xsl:value-of select="@tag"/>
+ </xsl:attribute>
+ <xsl:value-of select="@level"/>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@level"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:element>
<xsl:element name="td">
<xsl:value-of select="@message"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-suites-report.xsl b/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-suites-report.xsl
index 80f32a2..f014251 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-suites-report.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-suites-report.xsl
@@ -39,7 +39,7 @@
<!-- Tests log XML document -->
<xsl:variable name="tests-log-doc" select="document($tests-log)"/>
- <!--- Test Report Header Variables -->
+ <!--- Test Suites Report Header Variables -->
<xsl:variable name="ft" select="qa/functional-tests"/>
<xsl:variable name="id" select="$ft/identification"/>
<xsl:variable name="sut" select="$id/sut"/>
@@ -76,7 +76,7 @@
<link rel="stylesheet" href="https://opends.dev.java.net/public/css/opends.css" type="text/css" />
<xsl:element name="title">
- <xsl:value-of select="concat('Test Report for OpenDS ',$version)"/>
+ <xsl:value-of select="concat('Test Suites Report for OpenDS ',$version)"/>
</xsl:element>
</xsl:element>
@@ -84,7 +84,7 @@
<table class="tertmasttable" width="100%" cellspacing="0">
<tbody>
<tr>
- <td><div class="collectionheader"><xsl:value-of select="concat('Test Report for OpenDS ',$version)"/></div></td>
+ <td><div class="collectionheader"><xsl:value-of select="concat('Test Suites Report for OpenDS ',$version)"/></div></td>
<td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
</tr>
</tbody>
@@ -393,7 +393,7 @@
<xsl:variable name="test-kfail" select="count($tests-log-doc/qa/functional-tests/results/test[suite=$suite and result='known'])"/>
<xsl:variable name="test-percent" select="round((($test-pass div $test-num) * 100) - 0.5)"/>
<xsl:variable name="suitename" select="translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
-
+
<xsl:variable name="end-time">
<xsl:for-each select="$all-tests/@stop">
@@ -409,7 +409,7 @@
<xsl:with-param name="testList" select="$all-tests"/>
</xsl:call-template>
</xsl:variable>
-
+
<xsl:element name="tr">
<xsl:attribute name="bgcolor">
<xsl:choose>
@@ -432,7 +432,7 @@
</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="href">
- <xsl:value-of select="concat($url,$tests-dir,'/testlogs/',$groupdir,'/',$suitename,'.html')"/>
+ <xsl:value-of select="concat($url,$tests-dir,'/testlogs/',$groupdir,'/',@shortname,'-report.html')"/>
</xsl:attribute>
<xsl:value-of select="@name"/>
</xsl:element>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-tests-report.xsl b/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-tests-report.xsl
new file mode 100644
index 0000000..aed8aa1
--- /dev/null
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-tests-report.xsl
@@ -0,0 +1,581 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<!--
+ ! CDDL HEADER START
+ !
+ ! The contents of this file are subject to the terms of the
+ ! Common Development and Distribution License, Version 1.0 only
+ ! (the "License"). You may not use this file except in compliance
+ ! with the License.
+ !
+ ! You can obtain a copy of the license at
+ ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ ! See the License for the specific language governing permissions
+ ! and limitations under the License.
+ !
+ ! When distributing Covered Code, include this CDDL HEADER in each
+ ! file and include the License file at
+ ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ ! add the following below this CDDL HEADER, with the fields enclosed
+ ! by brackets "[]" replaced with your own identifying information:
+ ! Portions Copyright [yyyy] [name of copyright owner]
+ !
+ ! CDDL HEADER END
+ !
+ ! Copyright 2008 Sun Microsystems, Inc.
+ ! -->
+
+<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
+
+<xsl:param name="group">''</xsl:param>
+<xsl:param name="suite">''</xsl:param>
+<xsl:param name="tests-log">''</xsl:param>
+
+<xsl:variable name="groupdir" select="translate($group, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
+
+<xsl:template match="/">
+
+ <!-- Tests log XML document -->
+ <xsl:variable name="tests-log-doc" select="document($tests-log)"/>
+
+ <!--- Test Report Header Variables -->
+ <xsl:variable name="ft" select="qa/functional-tests"/>
+ <xsl:variable name="id" select="$ft/identification"/>
+ <xsl:variable name="sut" select="$id/sut"/>
+ <xsl:variable name="mailto" select="normalize-space($id/mailto)"/>
+ <xsl:variable name="tests-dir" select="normalize-space($id/tests-dir)"/>
+ <xsl:variable name="url" select="normalize-space($id/tests-url)"/>
+ <xsl:variable name="hostname" select="normalize-space($sut/hostname)"/>
+ <xsl:variable name="version" select="normalize-space($sut/version)"/>
+ <xsl:variable name="buildid" select="normalize-space($sut/buildid)"/>
+ <xsl:variable name="revision" select="normalize-space($sut/revision)"/>
+ <xsl:variable name="os" select="normalize-space($sut/os-label)"/>
+ <xsl:variable name="jvm" select="normalize-space($sut/jvm-label)"/>
+ <xsl:variable name="testgroup" select="$ft/results/testgroup[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = $groupdir]"/>
+ <xsl:variable name="testsuite" select="$testgroup/testsuite"/>
+ <xsl:variable name="testcase" select="$testsuite/testcase"/>
+ <xsl:variable name="count-tests" select="count($testcase)"/>
+ <xsl:variable name="total-tests" select="count($testcase[@suite=$suite])"/>
+ <xsl:variable name="pass-tests" select="count($testcase[@result='pass' and @suite=$suite])"/>
+ <xsl:variable name="fail-tests" select="count($testcase[@result='fail' and @suite=$suite])"/>
+ <xsl:variable name="inconc-tests" select="count($testcase[@result='unknown' and @suite=$suite])"/>
+ <xsl:variable name="kfail-tests" select="count($tests-log-doc/qa/functional-tests/results/test[result='known' and suite=$suite])"/>
+
+ <xsl:element name="html">
+
+ <xsl:element name="head">
+
+ <xsl:element name="link">
+ <xsl:attribute name="rel">
+ <xsl:value-of select="'SHORTCUT ICON'"/>
+ </xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:value-of select="'https://opends.dev.java.net/public/images/opends_favicon.gif'"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <style type="text/css">
+/* <![CDATA[ */
+ @import "/branding/css/tigris.css";
+ @import "/branding/css/inst.css";
+ /* ]]> */
+ </style>
+ <xsl:element name="link">
+ <xsl:attribute name="rel">
+ <xsl:value-of select="'stylesheet'"/>
+ </xsl:attribute>
+ <xsl:attribute name="type">
+ <xsl:value-of select="'text/css'"/>
+ </xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:value-of select="'/branding/css/print.css'"/>
+ </xsl:attribute>
+ <xsl:attribute name="media">
+ <xsl:value-of select="'print'"/>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:element name="link">
+ <xsl:attribute name="rel">
+ <xsl:value-of select="'stylesheet'"/>
+ </xsl:attribute>
+ <xsl:attribute name="type">
+ <xsl:value-of select="'text/css'"/>
+ </xsl:attribute>
+ <xsl:attribute name="href">
+ <xsl:value-of select="'https://opends.dev.java.net/public/css/opends.css'"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <xsl:element name="title">
+ <xsl:value-of select="concat('Test Case Report for OpenDS ',$version)"/>
+ </xsl:element>
+
+ </xsl:element>
+
+ <table class="tertmasttable" width="100%" cellspacing="0">
+ <tbody>
+ <tr>
+ <td><div class="collectionheader"><xsl:value-of select="concat('Test Case Report for OpenDS ',$version)"/></div></td>
+ <td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <!-- Overall Test Percentage -->
+ <xsl:variable name="percent-tests">
+ <xsl:choose>
+ <xsl:when test="$total-tests > 0">
+ <xsl:value-of select="round((($pass-tests div $total-tests) * 100) - 0.5)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="0"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- Shaded Line -->
+ <xsl:element name="hr">
+ <xsl:attribute name="noshade">
+ <xsl:value-of select="'noshade'"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">
+ <xsl:value-of select="1"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <!-- Percentage Result -->
+ <xsl:element name="table">
+ <xsl:attribute name="width">
+ <xsl:value-of select="'100%'"/>
+ </xsl:attribute>
+ <xsl:call-template name="setColour">
+ <xsl:with-param name="percent" select="$percent-tests"/>
+ <xsl:with-param name="red" select="'70'"/>
+ <xsl:with-param name="yellow" select="'95'"/>
+ </xsl:call-template>
+ <xsl:element name="tr">
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="font">
+ <xsl:attribute name="size">
+ <xsl:value-of select="'+2'"/>
+ </xsl:attribute>
+ <xsl:value-of select="concat($percent-tests,'%')"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- Shaded Line -->
+ <xsl:element name="hr">
+ <xsl:attribute name="noshade">
+ <xsl:value-of select="'noshade'"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">
+ <xsl:value-of select="1"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <!-- Identification -->
+ <xsl:element name="table">
+ <xsl:attribute name="width">
+ <xsl:value-of select="'100%'"/>
+ </xsl:attribute>
+ <xsl:element name="tr">
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Build'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Revision'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Host'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Platform'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'JVM'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Total'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Pass'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Fail'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Inconc'"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="'Kfail'"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="tr">
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$buildid"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$revision"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$hostname"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$os"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$jvm"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$total-tests"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$pass-tests"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$fail-tests"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$inconc-tests"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:element name="b">
+ <xsl:value-of select="$kfail-tests"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- Shaded Line -->
+ <xsl:element name="hr">
+ <xsl:attribute name="noshade">
+ <xsl:value-of select="'noshade'"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">
+ <xsl:value-of select="1"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <xsl:element name="body">
+
+ <!-- Test Results Table -->
+ <xsl:element name="table">
+ <xsl:attribute name="width">
+ <xsl:value-of select="'100%'"/>
+ </xsl:attribute>
+ <xsl:attribute name="border">
+ <xsl:value-of select="1"/>
+ </xsl:attribute>
+ <xsl:attribute name="cellpadding">
+ <xsl:value-of select="2"/>
+ </xsl:attribute>
+
+ <xsl:element name="tr">
+ <xsl:attribute name="bgcolor">
+ <xsl:value-of select="'lightblue'"/>
+ </xsl:attribute>
+
+ <xsl:element name="th">
+ <xsl:value-of select="'Test Case'"/>
+ </xsl:element>
+ <xsl:element name="th">
+ <xsl:value-of select="'Start Time'"/>
+ </xsl:element>
+ <xsl:element name="th">
+ <xsl:value-of select="'End Time'"/>
+ </xsl:element>
+ <xsl:element name="th">
+ <xsl:value-of select="'Duration'"/>
+ </xsl:element>
+ <xsl:element name="th">
+ <xsl:value-of select="'Result'"/>
+ </xsl:element>
+ <xsl:element name="th">
+ <xsl:value-of select="'Issue'"/>
+ </xsl:element>
+ </xsl:element>
+
+ <xsl:for-each select="$testcase[@suite = $suite]">
+
+ <xsl:variable name="suitename" select="translate(@suite, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
+ <xsl:variable name="tcname" select="normalize-space(@shortname)"/>
+
+ <xsl:element name="tr">
+ <xsl:attribute name="bgcolor">
+ <xsl:choose>
+ <xsl:when test="@result = 'pass'">
+ <xsl:value-of select="'lightgreen'" />
+ </xsl:when>
+ <xsl:when test="$tests-log-doc/qa/functional-tests/results/test[result='known' and translate(normalize-space(name),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')=translate(normalize-space($tcname), 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')]">
+ <xsl:value-of select="'yellow'" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'red'" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+
+ <!-- Test Name -->
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'left'"/>
+ </xsl:attribute>
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat($url,$tests-dir,'/testlogs/',$groupdir,'/',$suitename,'-log.html#',@shortname)"/>
+ </xsl:attribute>
+ <xsl:value-of select="@shortname"/>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- Start Time -->
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:value-of select="@start"/>
+ </xsl:element>
+
+ <!-- End Time -->
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:value-of select="@stop"/>
+ </xsl:element>
+
+ <!-- Duration -->
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:value-of select="concat(@duration,'s')"/>
+ </xsl:element>
+
+ <!-- Result -->
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:value-of select="@result"/>
+ </xsl:element>
+
+ <!-- Issue -->
+ <xsl:variable name="issue" select="$tests-log-doc/qa/functional-tests/results/test/issues/issue"/>
+ <xsl:element name="td">
+ <xsl:attribute name="align">
+ <xsl:value-of select="'center'"/>
+ </xsl:attribute>
+ <xsl:value-of select="''"/>
+ </xsl:element>
+
+ </xsl:element>
+
+ </xsl:for-each>
+
+ </xsl:element>
+
+ <!-- Shaded Line -->
+ <xsl:element name="hr">
+ <xsl:attribute name="noshade">
+ <xsl:value-of select="'noshade'"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">
+ <xsl:value-of select="1"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <!-- Additional Information -->
+ <xsl:element name="h2">
+ <xsl:value-of select="'Additional Information'"/>
+ </xsl:element>
+
+ <xsl:element name="table">
+ <xsl:element name="tr">
+ <xsl:element name="td">
+ <xsl:element name="b">
+ <xsl:value-of select="'Test Archive: '"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat($url,$tests-dir)"/>
+ </xsl:attribute>
+ <xsl:value-of select="concat($url,$tests-dir)"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="tr">
+ <xsl:element name="td">
+ <xsl:element name="b">
+ <xsl:value-of select="'Product Identification: '"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat($url,$tests-dir,'/reports/id.html')"/>
+ </xsl:attribute>
+ <xsl:value-of select="concat($url,$tests-dir,'/reports/id.html')"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="tr">
+ <xsl:element name="td">
+ <xsl:element name="b">
+ <xsl:value-of select="'Mail Sent to: '"/>
+ </xsl:element>
+ </xsl:element>
+ <xsl:element name="td">
+ <xsl:element name="a">
+ <xsl:attribute name="href">
+ <xsl:value-of select="concat('mailto:',normalize-space($mailto))"/>
+ </xsl:attribute>
+ <xsl:value-of select="normalize-space($mailto)"/>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+ </xsl:element>
+
+ <!-- Shaded Line -->
+ <xsl:element name="hr">
+ <xsl:attribute name="noshade">
+ <xsl:value-of select="'noshade'"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">
+ <xsl:value-of select="1"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ </xsl:element>
+
+ </xsl:element>
+
+</xsl:template>
+
+<xsl:template name="setColour">
+ <xsl:param name="percent"/>
+ <xsl:param name="red"/>
+ <xsl:param name="yellow"/>
+ <xsl:attribute name="bgcolor">
+ <xsl:choose>
+ <xsl:when test="$percent < $red">
+ <xsl:value-of select="'red'" />
+ </xsl:when>
+ <xsl:when test="$percent < $yellow">
+ <xsl:value-of select="'yellow'" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'lightgreen'" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_member.xml b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_member.xml
index 68ed503..9b5cb67 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_member.xml
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_member.xml
@@ -86,7 +86,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: member: add a static group entry
+ #@TestName Group: Static: member add a static group entry
#@TestID
#@TestPurpose
#@TestPreamble
@@ -94,7 +94,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: add a static group entry')">
+ <testcase name="getTestCaseName('member add a static group entry')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -153,7 +153,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: member: delete a static group entry
+ #@TestName Group: Static: member delete a static group entry
#@TestID
#@TestPurpose
#@TestPreamble
@@ -161,7 +161,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: delete a static group entry')">
+ <testcase name="getTestCaseName('member delete a static group entry')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -202,7 +202,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: member: ldapsearch out of the group
+ #@TestName Group: Static: member ldapsearch out of the group
#@TestID search in group
#@TestPurpose user of group search members of its group
#@TestPreamble
@@ -210,7 +210,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: ldapsearch out of the group')">
+ <testcase name="getTestCaseName('member ldapsearch out of the group')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -240,7 +240,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: member: ldapsearch through group
+ #@TestName Group: Static: member ldapsearch through group
#@TestID search in group
#@TestPurpose user of group search members of its group
#@TestPreamble
@@ -248,7 +248,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: ldapsearch through group')">
+ <testcase name="getTestCaseName('member ldapsearch through group')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -288,7 +288,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: member: application search in group
+ #@TestName Group: Static: member application search in group
#@TestID
#@TestPurpose
#@TestPreamble
@@ -296,7 +296,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: application search in group')">
+ <testcase name="getTestCaseName('member application search in group')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -333,7 +333,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: member: application add user in group
+ #@TestName Group: Static: member application add user in group
#@TestID
#@TestPurpose
#@TestPreamble
@@ -341,7 +341,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: application add user in group')">
+ <testcase name="getTestCaseName('member application add user in group')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -424,7 +424,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: member: delete user entry belonging to the group
+ #@TestName Group: Static: member delete user entry belonging to the group
#@TestID
#@TestPurpose
#@TestPreamble previous testcase must be run before this one
@@ -432,7 +432,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: delete user entry belonging to the group')">
+ <testcase name="getTestCaseName('member delete user entry belonging to the group')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -525,7 +525,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: member: application delete user from group
+ #@TestName Group: Static: member application delete user from group
#@TestID
#@TestPurpose
#@TestPreamble
@@ -533,7 +533,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: application delete user from group')">
+ <testcase name="getTestCaseName('member application delete user from group')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -616,7 +616,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: member: delete all attributes in a static group entry
+ #@TestName Group: Static: member delete all attributes in a static group entry
#@TestID
#@TestPurpose
#@TestPreamble
@@ -624,7 +624,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('member: delete all attributes in a static group entry')">
+ <testcase name="getTestCaseName('member delete all attributes in a static group entry')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -730,7 +730,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: member: enable referential integrity plugin
+ #@TestName Group: Static: member enable referential integrity plugin
#@TestID
#@TestPurpose
#@TestPreamble
@@ -739,7 +739,7 @@
#@TestResult
-->
<!--
- <testcase name="getTestCaseName('member: enable referential integrity plugin')">
+ <testcase name="getTestCaseName('member enable referential integrity plugin')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -754,7 +754,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: member: nesting group
+ #@TestName Group: Static: member nesting group
#@TestID
#@TestPurpose
#@TestPreamble
@@ -763,7 +763,7 @@
#@TestResult
-->
<testcase name="getTestCaseName
- ('member: application search in nesting group')">
+ ('member application search in nesting group')">
<sequence>
<call function="'testCase_Preamble'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_uniquemember.xml b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_uniquemember.xml
index fb3f2e5..a02b921 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_uniquemember.xml
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/groups/group_static_uniquemember.xml
@@ -78,7 +78,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: uniquemember: add a static group entry
+ #@TestName Group: Static: uniquemember add a static group entry
#@TestID
#@TestPurpose
#@TestPreamble
@@ -86,7 +86,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: add a static group entry')">
+ <testcase name="getTestCaseName('uniquemember add a static group entry')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -144,7 +144,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: uniquemember: delete a static group entry
+ #@TestName Group: Static: uniquemember delete a static group entry
#@TestID
#@TestPurpose
#@TestPreamble
@@ -152,7 +152,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: delete a static group entry')">
+ <testcase name="getTestCaseName('uniquemember delete a static group entry')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -192,7 +192,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: uniquemember: ldapsearch out of the group
+ #@TestName Group: Static: uniquemember ldapsearch out of the group
#@TestID search in group
#@TestPurpose user of group search members of its group
#@TestPreamble
@@ -200,7 +200,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: ldapsearch out of the group')">
+ <testcase name="getTestCaseName('uniquemember ldapsearch out of the group')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -229,7 +229,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: uniquemember: ldapsearch through group
+ #@TestName Group: Static: uniquemember ldapsearch through group
#@TestID search in group
#@TestPurpose user of group search members of its group
#@TestPreamble
@@ -237,7 +237,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: ldapsearch through group')">
+ <testcase name="getTestCaseName('uniquemember ldapsearch through group')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -275,7 +275,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: uniquemember: application search in group
+ #@TestName Group: Static: uniquemember application search in group
#@TestID
#@TestPurpose
#@TestPreamble
@@ -283,7 +283,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: application search in group')">
+ <testcase name="getTestCaseName('uniquemember application search in group')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -319,7 +319,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: uniquemember: application add user in group
+ #@TestName Group: Static: uniquemember application add user in group
#@TestID
#@TestPurpose
#@TestPreamble
@@ -327,7 +327,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: application add user in group')">
+ <testcase name="getTestCaseName('uniquemember application add user in group')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -409,7 +409,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: uniquemember: delete user entry belonging to the group
+ #@TestName Group: Static: uniquemember delete user entry belonging to the group
#@TestID
#@TestPurpose
#@TestPreamble previous testcase must be run before this one
@@ -417,7 +417,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: delete user entry belonging to the group')">
+ <testcase name="getTestCaseName('uniquemember delete user entry belonging to the group')">
<sequence>
<call function="'testCase_Preamble'"/>
<!-- ******************** -->
@@ -508,7 +508,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: uniquemember: application delete user from group
+ #@TestName Group: Static: uniquemember application delete user from group
#@TestID
#@TestPurpose
#@TestPreamble
@@ -516,7 +516,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: application delete user from group')">
+ <testcase name="getTestCaseName('uniquemember application delete user from group')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
@@ -597,7 +597,7 @@
<!--- Test Case information
#@TestMarker Static Group Tests
- #@TestName Group: Static: uniquemember: delete all attributes in a static group entry
+ #@TestName Group: Static: uniquemember delete all attributes in a static group entry
#@TestID
#@TestPurpose
#@TestPreamble
@@ -605,7 +605,7 @@
#@TestPostamble
#@TestResult
-->
- <testcase name="getTestCaseName('uniquemember: delete all attributes in a static group entry')">
+ <testcase name="getTestCaseName('uniquemember delete all attributes in a static group entry')">
<sequence>
<call function="'testCase_Preamble'"/>
<!-- ******************** -->
@@ -708,7 +708,7 @@
<!--- Test Case information
#@TestMarker Group StaticGroup Tests
- #@TestName Group: Static: uniquemember: enable referential integrity plugin
+ #@TestName Group: Static: uniquemember enable referential integrity plugin
#@TestID
#@TestPurpose
#@TestPreamble
@@ -717,7 +717,7 @@
#@TestResult
-->
<!--
- <testcase name="getTestCaseName('uniquemember: enable referential integrity plugin')">
+ <testcase name="getTestCaseName('uniquemember enable referential integrity plugin')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/virtualAttributes/virtualAttributes_cos.xml b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/virtualAttributes/virtualAttributes_cos.xml
index ae6ea25..bd59166 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/virtualAttributes/virtualAttributes_cos.xml
+++ b/opendj-sdk/opends/tests/staf-tests/functional-tests/testcases/virtualAttributes/virtualAttributes_cos.xml
@@ -479,7 +479,7 @@
#@TestPostamble delete the cos
#@TestResult
-->
- <testcase name="getTestCaseName('cos: enable/disable')">
+ <testcase name="getTestCaseName('cos enable/disable')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -603,7 +603,7 @@
#@TestPostamble delete the cos
#@TestResult
-->
- <testcase name="getTestCaseName('cos: virtual-overrides-real')">
+ <testcase name="getTestCaseName('cos virtual-overrides-real')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -703,7 +703,7 @@
#@TestPostamble delete the cos
#@TestResult
-->
- <testcase name="getTestCaseName('cos: real-overrides-virtual')">
+ <testcase name="getTestCaseName('cos real-overrides-virtual')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -802,7 +802,7 @@
#@TestPostamble delete the cos
#@TestResult
-->
- <testcase name="getTestCaseName('cos: merge-real-and-virtual')">
+ <testcase name="getTestCaseName('cos merge-real-and-virtual')">
<sequence>
<call function="'testCase_Preamble'"/>
@@ -903,7 +903,7 @@
#@TestPostamble delete the cos
#@TestResult
-->
- <testcase name="getTestCaseName('cos: filter')">
+ <testcase name="getTestCaseName('cos filter')">
<sequence>
<call function="'testCase_Preamble'"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml b/opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml
index db57ea9..7d284ff 100755
--- a/opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml
@@ -96,6 +96,11 @@
import sys
</script>
+ <!-- Load in any additional Java classes -->
+ <script>
+ import java.io.FileNotFoundException
+ </script>
+
<!-- Load in any standard python functions -->
<script>
from time import localtime,strftime
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
index fb50711..6331980 100755
--- a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
@@ -1081,8 +1081,8 @@
<sequence>
<script>
- xmlFile = '%s.xml' % logFile
- htmlFile = '%s.html' % logFile
+ xmlFile = '%s-log.xml' % logFile
+ htmlFile = '%s-log.html' % logFile
xslFile = '%s/xsl/gen-logs.xsl' % TESTS_SHARED_DIR
</script>
@@ -1158,12 +1158,12 @@
qa.appendChild(logs)
# Pass only the pretty print of the test suite name
- __main,__group,__suite=CurrentTestPath['suite'].split('.')
+ suite=CurrentTestPath['suite'].split('.')[2].strip()
# Create the log element
log = doc.createElement("log")
log.setAttribute("group", "%s" % CurrentTestPath['group'])
- log.setAttribute("suite", "%s" % __suite)
+ log.setAttribute("suite", "%s" % suite)
log.setAttribute("jobid", "%s" % STAXJobID)
log.setAttribute("parent", "%s" % STAXParentID)
logs.appendChild(log)
@@ -1194,6 +1194,9 @@
line.setAttribute("timestamp", "%s" % timestamp)
line.setAttribute("level", "%s" % level)
line.setAttribute("message", "%s" % message)
+ if level == 'Start':
+ tag=message.split(":")[3].strip()
+ line.setAttribute("tag", "%s" % tag.lower())
log.appendChild(line)
</script>
</iterate>
@@ -1221,7 +1224,7 @@
<function name="WriteHtmlLogs" scope="local">
<function-prolog>
- Process XML file and transform that to an HTML file
+ Process XML file and transform that to an HTML log file
</function-prolog>
<function-map-args>
<function-arg-def name="input" type="required">
@@ -1257,25 +1260,25 @@
<message>'Creating HTML file %s' % htmlFile</message>
<script>
- _message='Generated test case report.'
- testCaseReport=report_generation()
+ _message='Generated test case logs.'
+ testCaseLogs=report_generation()
stringParamsDict={}
try:
- testCaseReport.transformReport(xslFile,xmlFile,htmlFile,stringParamsDict)
+ testCaseLogs.transformReport(xslFile,xmlFile,htmlFile,stringParamsDict)
except java.io.FileNotFoundException,details:
- _message='Unable to generate test case report %s.' % details
+ _message='Unable to generate test case logs %s.' % details
except IOError,details:
- _message='Unable to generate test case report %s.' % details
+ _message='Unable to generate test case logs %s.' % details
except:
- _message='Unable to generate test case report !!!'
+ _message='Unable to generate test case logs !!!'
</script>
<message>'%s' % _message</message>
</sequence>
- </function>
+ </function>
<function name="CheckMatches">
<function-prolog>
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml b/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
index 3c992d7..614eb5f 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
@@ -46,6 +46,7 @@
<!-- Load in the local shared python objects -->
<script>
import sys,os
+ import java.io.FileNotFoundException
sys.path.append("%s/shared/python" % TESTS_ROOT )
from common import *
</script>
@@ -330,6 +331,7 @@
<script>
testDict={}
testCaseList=[]
+ tcshortname=''
try:
txtfh=open(textfile,'r')
@@ -581,11 +583,16 @@
tcgroup=tcnamesplit[0].strip()
if tcnamesplit[1]:
tcsuite=tcnamesplit[1].strip()
+ tcsuiteshort=tcsuite.split(".")[2].strip()
else:
tcsuite=tcgroup
+ if tcnamesplit[2]:
+ tcshortname=tcnamesplit[2].strip()
else:
tcgroup=tcname
tcsuite=tcname
+ tcshortname=tcname
+ tcsuiteshort=tcname
if testDict[tcname].has_key('pass'):
tcpass=testDict[tcname]['pass']
@@ -626,19 +633,21 @@
# Create the testgroup element
group = doc.createElement("testgroup")
- group.setAttribute("name", tcgroup)
+ group.setAttribute("name", tcgroup.lower())
results.appendChild(group)
# Create the testsuite element
suite = doc.createElement("testsuite")
- suite.setAttribute("name", tcsuite)
+ suite.setAttribute("name", tcsuite.lower())
+ suite.setAttribute("shortname", tcsuiteshort.lower())
group.appendChild(suite)
# Create the testcase element
case = doc.createElement("testcase")
- case.setAttribute("group", "%s" % tcgroup)
- case.setAttribute("suite", "%s" % tcsuite)
- case.setAttribute("name", "%s" % tcname)
+ case.setAttribute("group", "%s" % tcgroup.lower())
+ case.setAttribute("suite", "%s" % tcsuite.lower())
+ case.setAttribute("name", "%s" % tcname.lower())
+ case.setAttribute("shortname", "%s" % tcshortname.lower())
case.setAttribute("result", "%s" % tcresult)
case.setAttribute("start", "%s" % tcstart)
case.setAttribute("stop", "%s" % tcstop)
@@ -669,6 +678,8 @@
try:
standardReport.transformReport(xslfile,xmlfile,htmlfile,stringParamsDict)
+ except java.io.FileNotFoundException,details:
+ _message='Unable to generate standard test report %s.' % details
except IOError,details:
_message='Unable to generate standard test report %s.' % details
except:
@@ -687,6 +698,8 @@
try:
groupsReport.transformReport(xslfile,xmlfile,htmlfile,stringParamsDict)
+ except java.io.FileNotFoundException,details:
+ _message='Unable to generate groups test report %s.' % details
except IOError,details:
_message='Unable to generate groups test report %s.' % details
except:
@@ -714,6 +727,8 @@
try:
suitesReport.transformReport(xslfile,xmlfile,htmlfile,stringParamsDict)
+ except java.io.FileNotFoundException,details:
+ _message='Unable to generate suites test report %s.' % details
except IOError,details:
_message='Unable to generate suites test report %s.' % details
except:
@@ -721,6 +736,50 @@
</script>
<message>_message</message>
+ <!-- Generate the test case report by test suites -->
+ <script>
+ _message='Generated cases test reports.'
+
+ testGroupDirsList=os.listdir(logsTestsDir)
+ for testGroupName in testGroupDirsList:
+
+ print 'group= %s' % testGroupName
+
+ groupDir='%s/%s' % (logsTestsDir,testGroupName)
+
+ if os.path.isdir(groupDir):
+
+ import glob
+ testSuiteFilesList=glob.glob('%s/*.xml' % groupDir)
+
+ xmlfile='%s/results.xml' % logsReportDir
+ xslfile= '%s/xsl/gen-tests-report.xsl' % TESTS_SHARED_DIR
+
+ for testSuiteFile in testSuiteFilesList:
+
+ if os.path.isfile(testSuiteFile):
+ testSuiteName=os.path.basename(testSuiteFile.replace('-log.xml',''))
+ testSuiteShortName=testSuiteName.split('.')[2]
+
+ print 'suite= %s' % testSuiteName
+
+ htmlfile='%s/%s-report.html' % (groupDir,testSuiteShortName)
+
+ stringParamsDict={ 'group' : testGroupName, 'suite' : testSuiteName, 'tests-log' : testslog }
+
+ casesReport=report_generation()
+
+ try:
+ casesReport.transformReport(xslfile,xmlfile,htmlfile,stringParamsDict)
+ except java.io.FileNotFoundException,details:
+ _message='Unable to generate test case report %s.' % details
+ except IOError,details:
+ _message='Unable to generate test case report %s.' % details
+ except:
+ _message='Unable to generate test case report %s !!!' % groupDir
+ </script>
+ <message>_message</message>
+
<!-- Generate the product identification report -->
<script>
_message='Generated product identification test report.'
@@ -733,10 +792,12 @@
try:
idReport.transformReport(xslfile,xmlfile,htmlfile,stringParamsDict)
+ except java.io.FileNotFoundException,details:
+ _message='Unable to generate product id test report %s.' % details
except IOError,details:
- _message='Unable to generate product identification test report %s.' % details
+ _message='Unable to generate product id test report %s.' % details
except:
- _message='Unable to generate product identification test report !!!'
+ _message='Unable to generate product id test report !!!'
</script>
<message>_message</message>
--
Gitblit v1.10.0