<#-- /* Copyright 2009-2011 ISP RAS (http://www.ispras.ru), UniTESK Lab (http://www.unitesk.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ --> <#macro getCoverageClass node> <#local covnum = coverage.getCoverageClass(node)/> <#local covclass = "red"/> <#if covnum = 1> <#local covclass = "yellow"/> <#else> <#if covnum = 2> <#local covclass = "green"/> <#assign cclass = covclass/> <#macro errordetect bool><#assign err=bool/> <#macro finderror ferr lvl> <#local node = ferr/> <#local childrenList = node.getSortedChildren()/> <#list childrenList as child> <#if child.getType() = "Requirement"> <#local hasChild = 1/> <#else> <#if child.getType() = "TestPurpose"> <#local hasChild = 1/> <#local testsCount = coverage.getCoverageTestCount(node.getQualifiedId())/> <#if (testsCount>0)> <#local testPathList = coverage.getCoveragePaths(node.getQualifiedId())/> <#list testPathList as path> <#if coverage.hasErrors(node.getQualifiedId(),path)><@errordetect 1/> <#if (hasChild!0) != 0> <#local childrenTestPurposeList = node.getSortedChildren("TestPurpose")/> <#list childrenTestPurposeList as childTestPurpose> <#local testsCount = coverage.getCoverageTestCount(childTestPurpose.getQualifiedId())/> <#local testPathList = coverage.getCoveragePaths(childTestPurpose.getQualifiedId())/> <#if (testsCount>0)> <#list testPathList as path> <#if coverage.hasErrors(childTestPurpose.getQualifiedId(),path)><@errordetect 1/> <#list childrenList as child> <#if child.getType() = "Requirement"><@finderror child lvl+1/> <#macro num bl><#assign block= bl/> <#macro showreq req lvl> <#local node = req/> <#local childrenList = node.getSortedChildren()/> <@getCoverageClass node/> <#local covclass = cclass/> <#list childrenList as child> <#if child.getType() = "Requirement"> <#local hasChild = 1/> <#else> <#if child.getType() = "TestPurpose"> <#local hasChild = 1/> <#local testsCount = coverage.getCoverageTestCount(node.getQualifiedId())/> <#if (testsCount>0)> <#local testPathList = coverage.getCoveragePaths(node.getQualifiedId())/> <#local testCntList = coverage.getCoverageCounts(node.getQualifiedId())/> <@errordetect 0/> <#if (testsCount>0)> <#list testPathList as path> <#if coverage.hasErrors(node.getQualifiedId(),path)><@errordetect 1/> <#if err==0> <#if (hasChild!0) != 0><#list childrenList as child> <@finderror child lvl+1/> <#if err==1> <#if showbuttons>
${utils.htmlEscape(node.getUserFriendlyName(true))} *
<#else> <#if showbuttons>
${utils.htmlEscape(node.getUserFriendlyName(true))}
<@num block+1/> <#if (testsCount>0)> <#local iterate = 0/> <#list testPathList as path> <#if (testCntList[iterate]>-1)> <#if (testCntList[iterate]>-1)>
Test: ${path} <#else> <#if coverage.hasErrors(node.getQualifiedId(),path)> <#local errors_names=coverage.getErrorNamesForNodeAndTest(node.getQualifiedId(),path)/> <#local errors_desc=coverage.getErrorDescriptionsForNodeAndTest(node.getQualifiedId(),path)/> <#local errors_links=coverage.getErrorLinksForNodeAndTest(node.getQualifiedId(),path)/> <#list 0..errors_names?size-1 as i> <#local error_name=(errors_names[i])> <#local error_desc=errors_desc[i]> <#local error_link=errors_links[i]>
Наименование ошибки Описание ошибки
<#if error_link!="">${error_name}<#else>${error_name} ${error_desc}
Hits: ${testCntList[iterate]}

<#local iterate = iterate + 1/> <#if (hasChild!0) != 0>
<#if node.getDescription(reportLocation)?has_content> ${utils.htmlSpaces(node.getDescription(reportLocation))} <#else> <#if node.getType() == "Requirement"> <#list node.getLocations() as location> <#if (li!0) != 0>
... <#if !location.isHidden()> ${utils.htmlSpaces(location.getDescription(reportLocation))} <#local li = 1/>
<#local childrenTestPurposeList = node.getSortedChildren("TestPurpose")/> <#if childrenTestPurposeList?size != 0> <#list childrenTestPurposeList as childTestPurpose> <@getCoverageClass childTestPurpose/>
Номер Описание Ожидаемые результаты Teсты Статус
${utils.htmlEscape(childTestPurpose.getId())} ${utils.htmlSpaces(childTestPurpose.getDescription(reportLocation))!""} ${utils.htmlSpaces(childTestPurpose.getExpectedResults(reportLocation))} <#local testsCount = coverage.getCoverageTestCount(childTestPurpose.getQualifiedId())/> <#local testPathList = coverage.getCoveragePaths(childTestPurpose.getQualifiedId())/> <#local testCntList = coverage.getCoverageCounts(childTestPurpose.getQualifiedId())/> <#if (testsCount>1)> <#if showbuttons>
Развернуть список тестов
<#if (testsCount>0)> <#local iterate = 0/> <#if (testsCount>1)> <@num block+1/>
${childTestPurpose.getAttributeValue("_status", "")}
<#list childrenList as child> <#if child.getType() = "Requirement"> <#else>
<#if node.getDescription(reportLocation)?has_content> ${utils.htmlSpaces(node.getDescription(reportLocation))} <#else> <#if node.getType()=="Requirement"> <#list node.getLocations() as location> <#if (li!0) != 0 >
... <#if !location.isHidden()> ${utils.htmlSpaces(location.getDescription(reportLocation))} <#local li = 1/>
<#macro statistic req> <#assign rev = statman.getArrayData(req, coverage)/> <#if coverage.loadStorage()> <#if coverage.loadStorage()>
MeasureRequirementsTest purposesLeavesCoveredNot covered
Count ${rev["number of requirements"]} ${rev["number of test purposes"]} ${rev["number of leaves"]}${rev["number coverage (green status)"]} ${rev["number coverage (red status)"]}
Percent - - - ${rev["percent coverage (green status)"]}% ${rev["percent coverage (red status)"]}%
<#if coverageFilePath?? || coverageStorageType??> <#if coverage.loadStorage()> <#if noAddTestButtons?? && noAddTestButtons!="false"> <#global showbuttons = false> <#else> <#global showbuttons = true> <@num 0/> <@statistic rootReq/> <@showreq rootReq 1/> <#else> <#if coverageFilePath??> Coverage information cannot be loaded from ${coverageFilePath}. Errors: ${coverage.getLastErrors()} <#else> Coverage information cannot be loaded from chosen source. Errors: ${coverage.getLastErrors()} <#else> There is no source of coverage information.
If using Eclipse plugin please press 'Update Coverage Source' button on report settings' properties.
If using console mode please set 'coverageFilePath' parameter as -coverageFilePath="path to coverage info file".