08-26-2008 01:28 AM
It is not working for me. I have a loop on the attributes for the requirements with a condition
(attr3.typeName = "Result" AND attr3.ident = "FAIL")
if i have a count STR($CNT(attr3.ident = "FAIL"))
The result in the report is something like this
--------------------------------------------------------------------------------------------------------------------------------------------------------------
FAIL'ed Testcases
TC_AHUSTATE_019
1
TC_AHUSTATE_020
1
TC_AHUSTATE_084
1
TC_RDS_0179
1
-----------------------------------------------------------------------------------------------------------------------------------
I just need consolidated total count of value at the end. I have tried other possibiliities, It does not help.
How to do that? Please help since it is very urgent.
08-26-2008 08:36 AM - edited 08-26-2008 08:37 AM
Kals,
I found that there are two things you need to modify about the code you have. First, if you want to get the total count, you cannot write the code referring to attr1. That identifier is for the individual attribute and cannot give you information about multiple attributes. However, ent1 has a property called .attributes that contains the entire set of attribues, so you can use that instead.
Now, you don't want to count every attribute, only the ones that have identifiers that equal "FAIL". To do this in a $CNT statement, you can use a conditional inclosed in square brackets [ ]. See the attached screenshot for an example that will list every document, section, and requirement in a project, the number of total attributes that element has, and the number of attributes that have an identifier of "blah".
08-26-2008 10:10 AM
Thanks for the quick response. I have tried the same way but it counts the number of attributes for the particular requirement and list the total attributes for the particular requirement. My expectation is consolidated total count , something like this,
Example:
There are totally 10 requirements in my project.
My requirements are REQ1, REQ2....REQ10.
Each requirements has same attribute called "RESULT" but the values of the "RESULT" attribute could be one of the following
"PASS" / "FAIL" / "INVALID"
I would like to count the "RESULT" attribute which has values "PASS"
So that in my report looks like
----------------------------------------------------------------------------
Total-requirements - Total Pass - Total Fail - Total Invalid
----------------------------------------------------------------------------
10 - 7 - 2 - 1
----------------------------------------------------------------------------
08-27-2008 11:32 AM
Hi,
I am able to count the attributes. Thanks for the details.
Now i would like to count the requirements which does not have attributes at all.
Example:
There are totally 10 requirements in my project.
My requirements are REQ1, REQ2....REQ10.
Each requirements has same attribute called "RESULT" but the values of the "RESULT" attribute could be
one of the following or no attribute will be attached there.
"PASS" / "FAIL" / "INVALID"
I am able to count the requirment which has attribute using the following code
STR($CNT(doc15.requirements.attributes[ident != "PASS"]))
But I would like to count the requirement ID which does not have the attribute at all.
what is the code for this?
what is the modification required in the above code?
So that in my report looks like
-------------------------------------------------------------------------------------------------------
Total-requirements - Total Pass - Total Fail - Total Invalid - Total no attribute
------------------------------------------------------------------------------------------------------
10 - 5 - 2 - 1 - 2
-----------------------------------------------------------------------------------------------------------
Please help immediatly since it is very urgent.
Thanks
Kalyan
08-27-2008 02:16 PM
Kals,
I think the following code will work:
STR($CNT(doc1.requirements[$CNT(attributes[typeName = "test"]) = 0]))
What this does in words is: Count the number of requirements in doc1 where the number of attributes in that requirement whose typeName is "test" equals zero.
Or in more plain english: Count the number of requirements who do not have any attributes named "test".
Hope this helps!
08-28-2008 01:57 AM
To display the list of "NotAppl" requirements, currently i am using loop on attributes with the condition as follows
(attr4.typeName = "Result" AND attr4.ident = "NotAppl")
How to display the list of requirements which does not have the "Result" attribute at all?
What is the modification required in the above condition?. What is use of "loop when absent" test box in the attached image?
Thanks in advance for the quick reply.
Thanks
Kalyan
08-28-2008 04:48 AM
I am able to display the covering document requirement using display identification information of that variable. Please find the details in the attached JPEG image.
Instead of I would like to display the covered document requirement.
Ex:
My covered document requirements are REQ1, REQ2....REQ10
My covering document requirements are TC1, TC2....TC10
Let us assume TC1 is covered by REQ1 and REQ2.
Now I am able to display TC1 for the particular attribute "RESULT". Please see more details in the previous mail.
Instead I would like to display REQ1 and REQ2.
How to display covered document requirement instead of covering document requirement in the attached JPEG image?
Thanks in advance for the immediate reply.
Thanks
Kalyan
08-28-2008 09:54 AM
Kals,
I'm a little confused as to your use of covering and covered. But I'll do my best to answer your question.
A requirement has properties you can use to loop over its referencers or references by going into Project Links and then all referencers or all references, you could also use covering requirements or cover links depending on exactly what you want. Unfortunately I don't quite understand the exact information that you want, but one of these elements should contain it.