java.rmi.RemoteException: Invalid test record index: 0 (0 test records exist)
The _test_caserecord variable (has _index set to 0, so I understand the first part of the exception) is valid and the corresponding work item retrieved with getWorkitem method has test steps, so my guess is that the wrong test run is accessed, as it does not find any test record objects.
Please, let me know if you have a clue. Thanks!
P.S. I set the corresponding test step result before trying to do attachments, as the note from documentation suggests
Attachments to the test steps can only be uploaded if the test step result has been set.
EDIT:
If for instance, a test run has more than one record, trying to add attachments to the steps of each record updates the exception in a way that somehow only previous test records are noticed.
To be more concrete, if my test run has 3 records, each one having 3 steps, I get the following exceptions when trying to add attachments:
java.rmi.RemoteException: Invalid test record index: 0 (0 test records exist)
java.rmi.RemoteException: Invalid test record index: 0 (0 test records exist)
java.rmi.RemoteException: Invalid test record index: 0 (0 test records exist)
java.rmi.RemoteException: Invalid test record index: 1 (1 test records exist)
java.rmi.RemoteException: Invalid test record index: 1 (1 test records exist)
java.rmi.RemoteException: Invalid test record index: 1 (1 test records exist)
java.rmi.RemoteException: Invalid test record index: 2 (2 test records exist)
java.rmi.RemoteException: Invalid test record index: 2 (2 test records exist)
java.rmi.RemoteException: Invalid test record index: 2 (2 test records exist)
Hello,
First I want to give my appreciations for making this module! Now, to my issue, when a call the method in the bellow manner:
test_case_record.addAttachmentToTestStep(step_index=step_index, file_path=file_path, title='Dummy attachment')
the execution fails with
The _test_caserecord variable (has _index set to 0, so I understand the first part of the exception) is valid and the corresponding work item retrieved with getWorkitem method has test steps, so my guess is that the wrong test run is accessed, as it does not find any test record objects.
Please, let me know if you have a clue. Thanks!
P.S. I set the corresponding test step result before trying to do attachments, as the note from documentation suggests
EDIT: If for instance, a test run has more than one record, trying to add attachments to the steps of each record updates the exception in a way that somehow only previous test records are noticed. To be more concrete, if my test run has 3 records, each one having 3 steps, I get the following exceptions when trying to add attachments: