Custom report, deleted Testcases

Fabian Tietz, modified 10 Years ago.

Custom report, deleted Testcases

Youngling Posts: 9 Join Date: 8/9/13 Recent Posts
Hi,

It seems, that Testcases, which are deleted from the web UI (which is possible, when they have not been executed).
still appear in the query. Is it possible to extend the Query, to suppress deleted TC, when querying all testcases
from the DB?

Regards,

Fabian.
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: Custom report, deleted Testcases

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Fabian,

yes you may use the enabled column/isEnabled() method in the IKlarosNamedEntity interface for this. The documentation is a bit vague about its purpose.

Hope this helps,

Torsten
Fabian Tietz, modified 10 Years ago.

RE: Custom report, deleted Testcases

Youngling Posts: 9 Join Date: 8/9/13 Recent Posts
Hi,

Hmm, unfortunately TestCase is not derived from NamedEntity and therefore has no isEnabled Method.
Going via TestResults is also not a good idea, since it is not possible ti distinguish between new Testcases, that have
no results yet and deleted Testcases.

Maybe we are just taking the wrong approach. Basically we are not working with TestSuits, only plain Testcases, which are executed
against specific SUTs.

Another Question:
Is it possible, to access the testcase Category from the API, if Testcases are organized in Categories from the WebUI?
Is it possible to retrieve the current State "draft", "approved",.... via API?



Regards Fabian,
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: Custom report, deleted Testcases (Answer)

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Fabian,

Hmm, unfortunately TestCase is not derived from NamedEntity and therefore has no isEnabled Method.


Please have a look again at http://www.klaros-testmanagement.com/files/doc/html/User-Manual.Appendix.API.html#class-de.verit.klaros.core.model.KlarosTestCase - there you see the methods inherited from both IKlarosRevision and its sub-classed interface IKlarosNamedEntity (containing the isEnabled() method).

Sure you can also directly use this in a query like:
select t from KlarosTestCase t where t.enabled = true


Going via TestResults is also not a good idea, since it is not possible ti distinguish between new Testcases, that have
no results yet and deleted Testcases. Maybe we are just taking the wrong approach. Basically we are not working with TestSuits, only plain Testcases, which are executed
against specific SUTs.


If this is your setup I see nothing wrong with your approach.

Is it possible, to access the testcase Category from the API, if Testcases are organized in Categories from the WebUI?


Yes, category information is available with version 3.8.3 ([KLAROS-1976]) which is out now. Look for KlarosTestCase.getCategories() and also KlarosConfiguration.getTestCaseCategoryTrees() for the reverse relation.

Is it possible to retrieve the current State "draft", "approved",.... via API?


Look for getState() in KlarosTestCase. Heads up - this is not directly available on the query level, as there are indirections taken to the state model to retrieve this.

Hope this helps,

Torsten