Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Assign Requirements #120

Closed
Tahrky opened this issue Jun 21, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@Tahrky
Copy link

commented Jun 21, 2019

Hi everyone (and @lczub)

I'm currently using the API to recopy a test case in a new test suite.
When I use copyTCnewTestCase, I have the copy, but there is no requirements assign to it.

I think that i have to use the function assignRequirements, but I don't know how to get requirementsId and requirementsSpecId.

getRequirements give me all the requirementsId, but is that enough ? If yes, what id goes where ?

Thanks in anticipation of an answer,
Greetings.

@lczub lczub added the question label Jun 21, 2019

@lczub

This comment has been minimized.

Copy link
Owner

commented Jun 21, 2019

Hello Tahrky,

thanks for your interesssting request.
Unfortenatly, I have no much experiences with the requirement api functions, cause they look for me not fully implemented on the server side. You find your question also formulated by me in TestLinkExampleGenericApi_Req.py

Cause of missing knowledge, how ids of kind
- requirement and requirement specifications
- testplan - testcase link
could be requested via api, these example does not work currently.

I will do some tries over the weekend and if I find a way, I will inform you, ok?
Regards Luiko

@Tahrky

This comment has been minimized.

Copy link
Author

commented Jun 23, 2019

Hello @lczub,

Thanks for your fast answer ! Yeah, i didn't found anything that could help me too to find how get it with the API.
If I correctly understood, requirement specification is the category of the requirements, there is only one able at a time, and it could be as many requirements as we need.
I'm currently using your solution at work, it is a great tool but I'm constantly thinking that TestLink lack so much features (and I'm sure that's not because of you) that you have to build some strange things to do what you want.

Thanks you a lot for your help !
Have a nice day,
Greetings !

@lczub

This comment has been minimized.

Copy link
Owner

commented Jun 23, 2019

Hello Tahrky,

to fullfill your requirement, the TestLink server itself must be extended (or corrected).

Main pitfall is, that the api function assignRequirements requires the id of an requirements and the srs_id of the related req_spec. Problem is, the api function getRequirements only returns the requirement ids.

Change request against TestLink Server would be, that getRequirements should also return the srs_id or assignRequirements should work without srs_id.

Without this extension, you will have to combine the python api client with direct database interactions.

So if you create a change request for the TestLink server ( Mantis TestLink ) , that the srs_id can be requested via the api, I could extend afterwards the python client .

The workflow on the client side might be

  • get list with all requirements of a project - myTestLink.getRequirements(aTProjectID)
  • loop over all requirements and cache for each of them the related test cases - myTestLink.getReqCoverage(aTProjectID, reqA['req_doc_id'])
  • loop over your test cases, which you have used as base of the copys and check, if they are referenced by one or more of the above requirements
  • assign these requirements to your new test case copys, using assignRequirements (only possible, when the srs_id is known)

Another new helpful TestLink server function would be the inverse of getReqCoverage, returning all requirements (or id and srs_id) assigned to a test case. That would reduce the client side workflow, specially the caching of req - tc references.

Regards Luiko

@Tahrky

This comment has been minimized.

Copy link
Author

commented Jun 24, 2019

Hello @lczub,

Thanks again for your fast answer.

Well, you explain very well all the steps to have a result, but the problem is that I have only few days on this project, because it was a temporary project while I was waiting for one more important to begin.

I don't think that I will obtain a solution to my answer before one or two days (because I think after this, this project will be over), but if you think that it will be helpful for you in the future, I still can try to make a request so they will add it in the features.

Thanks you for all your help.
Greetings !

@lczub

This comment has been minimized.

Copy link
Owner

commented Jun 24, 2019

Hello Tahrky,
I undertand your time problem. It would be great, when you find time to open the request agains the TL server.
It's always good, when request are open from different people to show, that the xmlrpc api is used by several user groups.

Regards Luiko

@Tahrky

This comment has been minimized.

Copy link
Author

commented Jun 25, 2019

Hi @lczub,

I made an issue : http://mantis.testlink.org/view.php?id=8709
Hoping that will help you in your work ;).

Have a nice day !
Greetings.

@Tahrky Tahrky closed this Jul 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.