XPath over several entities

0
Hi guys, I have a problem with the XPath functionality in my App. First of all: My domain model has the following three tables:  Starting point for this use case is a grid of testcycles. When one entry (testcycle) is selected (execute button), another page opens. On this page, i’d like to show the testcases, which are assigned to the testcycle over the testspecification with this xpath command: My Problem: When I implement this, i get ALL testcases, not just the one which i had assigned. What am I doing wrong?   BR   Tobias
asked
3 answers
1

Problem in your XPATH: You are not filtering with current object → selected test cycle

Your XPATH must look like something below. 

[HybridTM.testspecs_testcases/HybridTM.testspecs/HybridTM.testcycles_testspecs/HybridTM.testcycles

[id='[%CurrentObject%]']

[isDeleted=false()]

]

When you use association as Anna suggested, you will loose the possibility of search. 

Regarding optimizing the domain model or association, it is purely as per business need, so I will leave this up to you

answered
0

Hi Tobias,

try to select the xpath database for your testcases via association.

In the picture below, the entity Lauf (e.g. your testcases) is retrieved over the association Athlet (e.g. your testcycles).

I would also recommend to associate the testcases and testcycles directly and connect the testspecifications to either of the two and thereby define what ‘specs’ your tests have, if that is possible.

Also, you have twice a many-to-many association. A one-to-many association is always easier to maintain. If that is sufficient, I would recommend changing it.

answered
0

Hi 

Can you try with this x path

[HybridTM.testspecs_testcases/HybridTM.testspecs/HybridTM.testcycles_testspecs/HybridTM.testcycles/id='[%CurrentObject%]']

[HybridTM.testspecs_testcases/HybridTM.testspecs/HybridTM.testcycles_testspecs/HybridTM.testcycles/isDeleted=false()]

 

 

answered