Page 1 of 1

Relation between requirement/related test cases and testplan

Posted: Wed Mar 30, 2011 9:48 am
by flanlg
I'm trying to get the next database query:
- Number of requirements, associated tests and associated test plan taking into account that the test plan should follow a pattern (detemine by name: nodes_hierarchy.name).

- Query:

SELECT requirements.req_doc_id, count( DISTINCT req_coverage.testcase_id ) , testplans.id, nodes_hierarchy.name
FROM req_coverage, requirements, req_specs, testprojects, testplans, users, nodes_hierarchy
WHERE requirements.id = req_coverage.req_id
AND requirements.srs_id = req_specs.id
AND req_specs.testproject_id = testprojects.id
AND testplans.testproject_id = testprojects.id
AND testplans.id = nodes_hierarchy.id
AND nodes_hierarchy.name LIKE "%pattern%"
GROUP BY requirements.id, testplans.id


When extracting the information, I can not establish the relationship between the requirements / test cases and associated test plan. I mean, that the result of the query shows requirements and test cases that are not associated with the Test plan showed.

Can you tell me what is the problem and if necessary to include some additional relationship in this query?

Thanks.