It's all about the answers!

Ask a question

Need clarification in test case & test script query


vasanthakumari hariharan (231129) | asked Jul 04 '17, 8:01 a.m.

 Hi,


Actually i want to make a report which should have project name, test case id, test case name, test script id, test script name, description etc.

So what i did is:
query 1: test case name, test case ID, project ID
query 2: test script id, test script name, project ID.
Final query: join of those two by project ID.

when i run this report, data is mismatching.
Like all the scripts are coming with one test case name

2 answers



permanent link
Jackie Albert (1.6k14947) | answered Jul 05 '17, 10:42 a.m.

In your case it sounds like you're grabbing all Test Cases for your project, and all Test Scripts for your project and it wouldn't know how to link the two correctly, as you're seeing with the results.

You didn't say explicitly which parts of the data model you're using, but I recommend you use the [Test Script] and [Test Script Related Test Cases],   or alternately the [Test Case] and [Test Case Related Test Scripts] sections of the data model.   This will internally make sure that it's grabbing only the Test Case and Test Script data that are related to each other. You can add these all into a single query instead of doing 2 separate queries and a join.  



permanent link
Ryan Boyce (3512) | answered Jul 14 '17, 5:12 p.m.

 Mr. Hariharan,


I have some additional input

Your join is working as it should. It just is not the right approach. 

I am guessing a test case and a test script are two work item types. So to join these two together on simply the project id is asking for trouble. This join will look at every test case in a project, and join it with every test script in that same project. So, if you have 20 test scripts, and 10 test cases in a project, you have 200 unique test script - test case pairings.

Like Jackie says, there are better ways of linking these two work items, but I'm not familiar with that kind of configuration. At any rate, joining them off of project id is not correct.

Good day!
Ryan

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.