Author Topic: Trace requirements to implementation code?  (Read 3510 times)

gtsoftware

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Trace requirements to implementation code?
« on: November 10, 2015, 12:21:22 am »
With EA 12.0 is it possible to link requirements to the source code (C#) implementation?

After that, I'd like to link through to unit tests.

As you might guess, I eventually want to prove that all requirements have an implementation and associated tests.

I did find http://www.sparxsystems.com/downloads/whitepapers/test_management_enterprise_architect.pdf but I'm none the wiser after reading it.


1841lodger

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Trace requirements to implementation code?
« Reply #1 on: November 14, 2015, 08:16:29 am »
Hi,
I am actually looking to do a similar linking - hoping to connect my Use Cases and Test Cases to Requirements to ensure that we are checking off all of the requirements by the end of our UAT efforts. I will let you know if I can figure something out as it might help you as well.

Gary

  • EA User
  • **
  • Posts: 84
  • Karma: +1/-0
    • View Profile
Re: Trace requirements to implementation code?
« Reply #2 on: November 16, 2015, 07:46:01 pm »
SysML uses requirements and testcase linkage mechanisms as well as a way to link elements to requirements to show implementation.
Link usecases to requirement they <<Refine>>.
Link testcases to requirements they <<Verify>>.
Link blocks/classes to requirements they <<Satisfy>>.
You can <<trace>> a testcase to the usecase scenario it covers to enable tracking that all usecases have a testcase.
Useful to you would be to link testcases to blocks/Classes they <<Test>>.
 For all of the above the testcases are external not internal. i.e. actual elements not tests on elements.
The relationship matrix is then your friend as you can show linkages by stereotype to check all requirements are covered.

If you do not use/have the SysML toolbox then create the above stereotypes and use.

Gary

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Trace requirements to implementation code?
« Reply #3 on: November 16, 2015, 08:52:22 pm »
Hello,


Yes, you can link code to requirements in EA.

What you need is to get both the code and the requirements into your model. The code can be reverse-engineered, and you can trace requirements to individual attributes and operations, although this is an EA-specific function which is in violation of the UML standard and thus unlikely to be supported in any other tool.

Pulling the requirements in from another source is also possible, but unless you're using DOORS there's no ready-made solution. If you've got them in a simple format which you can Excel-ify, you can turn that into CSV and import the requirements using EA's CSV import.

You will need to draw the relationships yourself. EA does not have a function to import code + requirements.

As to the testing side, EA has two different tracks. You can either represent your tests with model elements (there's a Test Case element, or you can use sub-typed requirements), or you can use EA's Testing facility.

The latter is geared towards actually running your tests from within EA, while the former is better if you just want to see a visual representation of your tests, trace them to your requirements and/or code, and pull some reports out of the model.

Again, there isn't much support for pulling test cases into the model from another source, but if you can get them into a CSV format you can import them that way.

You can do all the above without using SysML if you wish.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.