Issue with attaching file to Test Execution Record result
Hi
We're using ELM and RQMCommandLineAdapter for running automatic tests, and recently we've started to experience some issues with attaching file results to Test Execution Recod results - for the same test and for the same adapter files are sometimes attached and sometimes not attached, and we can't figure out what exactly affects it.
Out system looks like this:
1. There is a TestExecutionRecord with CommandLine test script created in RQM
2. TestScript executes .bat file which is placed on shared drive, which afterwards installs and executes our internal application (written in .NET)
3. In the application we do the preprocessing and postprocessing of the results, then write attachments following the guideline (https://jazz.net/library/article/809#AttachFiles)) and return exit code.
Here is the code snippet where attachments are added:
// Attach all files as zip file.
string attachmentsFileName = this.rqmInputData["qm_AttachmentsFile"];
using (var fileStream = File.CreateText(attachmentsFileName))
{
string resultFilePath = Path.Combine(Path.GetTempPath(), "AsitResult.zip");
// RQM only understands paths with \\ (we actually also tried with \ )
fileStream.WriteLine($"{Path.GetFileNameWithoutExtension(resultFilePath)}={resultFilePath.Replace(@"\", @"\\")}");
}
So, everything is supposed to work fine, but in most cases there are no attachments created.
We can see the following trend:
string attachmentsFileName = this.rqmInputData["qm_AttachmentsFile"];
For TERs without attachments, attachmentsFileName doesn't exist (it's created afterwards, but if we check the existance right after this line, it will return false
For TERs with attachments, attachmentsFileName exists
And as mentioned above, we have seen both scenarios for the same tests and adapters, so it's not adapter/test-specific.
We've checked RQMCommandLineAdapter logs, in case attachment is in the result, we see POST request:
2024-11-28T14:20:06,388+0100 [Thread-2] DEBUG com.ibm.rqm.integration.client.clientlib - ++++ JFSHttpsClient : POST the file
And nothing for TERs without attachment.
We're using
ELM version: ETM7.0.3-I20231009_1358
RQMCommandLineAdapter version: 6.0.802
Any help will be much appreciated!
UPDATE!
I can see that when the test is started, this.rqmInputData["qm_AttachmentsFile"] exists, but when the test is finished, the file is not there anylonger and can't be used. Maybe it can also somehow explain why we normally see attachments for short tests, but for long tests (> 30 minutes) the issue with attachments is almost always there. Can it be so, that RQMCommandLineAdapter deletes the .attach file automatically after some time?
Best regards
Eugenia Melamud
Comments
evgeniia melamud
Dec 10 '24, 2:22 p.m.Update:
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Dec 11 '24, 2:18 a.m.I would suggest you open a case with support: https://jazz.net/help