![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Count "shalls" under each Heading in a Module Topic Summary: Trying to count the number of requirements per Heading Created On: 14-Mar-2007 19:16 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: A couple of things: 1. If you have the string 'shall' in a level-1 heading, you'll get a problem with finding the parent (I think...) 2. You might want to iterate back up to the top level heading, depending on your structure. Or even to a heading marked with a particular attribute... 3. Rather than print the heading, create a skip list and an array. Use the skip list to check whether you've seen a heading, and the array to count the number of times you've seen it. The following is pseudo-code, and thus untried! And I can never remember when to use createString instead of create for skips and arrays, so it needs some playing with. Hope it helps, Paul. | |
![]() |
|
I think as the need for requirements metrics grows and grows, it would be useful to have a script that simply counts "shalls" that occur under each heading in a module. That way, if the requirements document used as the basis of the DOORS module had sections of requirements such as "Safety" or "Reliability", (which most do), the script would count the number of requirements (shalls) under each of these headings. The result would be usable as a quick count of how many requirements are allocated to "Safety", etc. I have started a simple script that I've attached, which first filters the module so that only those objects with "shall" (whether capitalized or not) appear in the view. Then, it prints out the Heading Text of the object's parent (which is typically the Heading of that section of requirements). I can see from the DXL output that I'm halfway there. That is, for my test module, it would output something like the following:
Safety Safety Safety This lets me know I have 3 Safety requirements, but I want something a little more robust and not so clunky. Is there a way to simply count the number of times the "shall" occurs under a given heading, then start the count over for the next heading in DOORS? I'm attaching my code (so far) below. Thanks!! Chris Annal chrisa@sensis.com |
|
![]() |
|
![]() |
|
Put the heading in a buffer. Then use contains to find each iteration of the word shall. As you find it, delete the already passed text of the buffer. So basically for an object assuming the heading you're speaking of is in the Object Text see code attached.
You can also make it more involved and keep track of different kinds of requirements.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 14-Mar-2007 at 20:04 by David Pechacek |
|
![]() |
|
![]() |
|
A couple of things:
1. If you have the string 'shall' in a level-1 heading, you'll get a problem with finding the parent (I think...) 2. You might want to iterate back up to the top level heading, depending on your structure. Or even to a heading marked with a particular attribute... 3. Rather than print the heading, create a skip list and an array. Use the skip list to check whether you've seen a heading, and the array to count the number of times you've seen it. The following is pseudo-code, and thus untried! And I can never remember when to use createString instead of create for skips and arrays, so it needs some playing with. Hope it helps, Paul. ------------------------- Paul dot Tiplady at TRW dot com TRW Automotive |
|
![]() |
|
![]() |
|
From DXL Reference regarding Skips.
quote: ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
Thanks, Paul. I think I can work with this code. I'm reading up in the DXL Help files in DOORS to familiarize myself more with skip lists and keys, which are somewhat mysterious to me, too, but I'm already able to get some of this working, so finishing it off should be do-able.
Thanks a lot!! |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Count "shalls" under each Heading in a Module
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.