Book a Demo

Author Topic: Automation Help (Querying Requirements Model)  (Read 2872 times)

pakimon82

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Automation Help (Querying Requirements Model)
« on: February 23, 2008, 06:10:28 am »
Hello,
I am new to EA so bear with me if my terminology is wrong.
We maintain all of our requirements in the requirements Model in EA and QA will typically go into EA export requirements to some CSV file and then make sure that all the requirements are linked to some testcases.

We use a testing utility called soapui which allows us to import requirements via CSV file. This way we have all our scripts, requirements, testcases in one place.

I would like to find a way to automate querying of requirements from EA. Basically I need some program that will connect to the remote EA Project, download 'functionaly' and 'non-functional' requirements and write to some text file or some database. Ideally this should be done via JAVA but C#and VB are also acceptable. I didnt the find the API too helpful and detailed enough. I have done this kind of thing through Quality Center API since they have very detailed examples.

Can you help me get started.

Ali
« Last Edit: February 23, 2008, 06:18:08 am by ali.raza »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Automation Help (Querying Requirements Model)
« Reply #1 on: February 23, 2008, 07:45:08 am »
You've asked a pretty broad question - how to get started on the API. See the white papers and examples on the Sparx site.

But first, open the documentation and look at the Requirements collection of the Element class.

Also take a look at the Project interface (right near the end of the API section). See the GetElementRequirements method. This will give you an XML string as output, which you can parse in code or through XSLT. You can get the input parameter (an Element GUID in EA's "XML format") by iterating through the output from the GetElements method of the project interface, after passing in the package GUID.

If you use 'real' GUIDs in your code, the project interface has two methods to convert to and from: XMLtoGUID and GUIDtoXML. These work with strings, so convert the GUID to a string first.

Hopefully that will get you going.

David

PS: EA has a way you have to do thing to use the API. Read the (few) examples to get the gist of it. Pay attention to the GetAt method (it takes a short integer as input) and the Update method. Read the sources I mentioned above, and search this forum for other answers. Whatever problem you run into, you're likely not the first to have done so.
No, you can't have it!