API trouble in QATrack

66 views
Skip to first unread message

jose.macias.jaen

unread,
Sep 6, 2024, 7:33:38 AM9/6/24
to QATrack+
Hello,

my name is Jose Macias, medical physicist from Virgen Macarena Hospital in Seville, Spain.
I write to you because I have a problem using API in QATrack.
Our version is V3.1.0 QATrack.
From an external python application we are trying to send a new instance of a testlist to QATrack. This testlist has severals tests but one ot them is "upload" type but, in this case, we want to make it skipped true.
The sentence is :
'rt_imagen_cuadrados': {
'filename': "",
'value': null,
'encoding': 'base64',
'skipped': True
}

where rt_imagen_cuadrados is our "upload" test name.

Has anyone had this problem and knows how to manage it?

Thanks in advance!

Ben Shaw

unread,
Sep 9, 2024, 10:41:55 AM9/9/24
to QATrack+
Hi,
I'm afraid I don't have a solution, but just wanted to add that I have found the same problem and am also very interested in any solutions.
I am trying to perform a PATCH request on an existing in-progress test list, and only update some of the tests (i.e. not necessarily the upload test). This works fine when there isn't an upload test in the test list.
  • I tried omitting the upload test (when I'm updating other tests) and got a 500 error, with "AttributeError: 'NoneType' object has no attribute 'attachment'" in debug.log
  • I tried requesting and reusing the existing values, which resulted in a 400 error ("[test] is missing the filename field")
  • I tried skipping the test, which resulted in a 400 error ("[test] is missing the filename field")
  • I tried setting value:None and filename:None, which resulted in a 400 error ("non_field_errors":["base64 encoding requested but content does not appear to be base64"])
  • I also tried as above with "encoding": "text" and got a 500 error, with "TypeError: object of type 'NoneType' has no len()" in debug.log
Thanks,
Ben
Reply all
Reply to author
Forward
0 new messages