Solved

How to debug "TestData - Find & provide item"

  • 30 November 2023
  • 5 replies
  • 50 views

Userlevel 2
Badge

How can effectively analyse problems when using the “TestData - Find & provide item" Module? All I get is a non deskriptiv “No lockable object in type '...' was found.” error message (plus an even more useless stack trace) which doesn’t even tell you if the object was not found because it was locked or because no matching object exist. Is there anyway I can get more informations to analyse the problem?

icon

Best answer by krischik 1 December 2023, 13:34

View original

5 replies

Userlevel 2
Badge

Is it returning the same in both cases, the one when no item is found, and for the next when the item is there but it is locked?

I am looking at TDS API I think behind that module Tosca does this request 

which in NOT-FOUND case returns this 

it is possible that UI suspends some part of the error message, I don’t know, or maybe and most likely show a wrong message or confusing one.
 

I just did a quick experiment by requesting an item when it is not found and when it is locked.

1) in this case there is no element with that 0s id. And we see that the response was anyway 200 OK, the “items” list is just empty.

 

2. In this case the requested item exists but it is locked in TDS repository. We see that the response just contains one item in “items” list.

 

So it is unclear to me how Tosca is deciding locked/unlocked state of the element and why the “TestData - Find & provide item" should depend on lock state of the element, it is usually for preventing editing of the element but not reading it. Maybe it is locked for further mutation.

Userlevel 2
Badge

But I see there is another endpoint which looks more related to your problem.

I am not quite sure what it expects in the body but I think there is a bug in API, this should be interesting to TDS API developers.

when I do the request without providing the “index” field which in the schema is nullable: true, it gives 500. Actually any value given to index like null, 0, 15; returns 500. I am not sure how that endpoint was tested at all and how to use it, maybe someone from Tricentis can jump in to help with this.


Anyway, most probably that is the request behind the module you mentioned. But honestly I don’t know what exactly to provide in the body so I could test it on locked and not existing TDS items.

Userlevel 2
Badge

So it is unclear to me how Tosca is deciding locked/unlocked state of the element and why the “TestData - Find & provide item" should depend on lock state of the element, it is usually for preventing editing of the element but not reading it. Maybe it is locked for further mutation.

I think the error message is misleading. TOSCA will show the “No lockable object in type '...' was found.” Error even when no object at all is found.

By now I found the problem for the particular case. One of the query parameter had a typo. There was no object at all that could match the typo.

However this can happen all the time so I’m still interested on better debugging option for the next time I setup a faulty query.

Userlevel 2
Badge

Anyway, most probably that is the request behind the module you mentioned. But honestly I don’t know what exactly to provide in the body so I could test it on locked and not existing TDS items.

What could be done on the Tosca side could be repeating the query string. An error of the type “No lockable object in type '...' for query '...' was found.” would have been helpful. I would have immediately seen that sex “M<” or “W<” doesn’t exist.

Just to clarify: the typo was several indirection away from the query.

Userlevel 2
Badge

In the end I stored all the parameter in a list of buffer

But his is suboptimal. I wish there where better debugging options.

Reply