Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes

Comments

Update:

I have found out that for the "bad" test RQMCommandLineAdapter sends this to server ~1 minute before we handle the result in our code:
<qmtask:progress>90</qmtask:progress><qmtask:statusCode>200</qmtask:statusCode><qmtask:properties><qmtask:property propertyName="Status" propertyType="null:null">Execution completed, uploading result.

Can you please explain to me when qmtask progress is sent to the server from the adapter? What is the trigger?


I would suggest you open a case with support: https://jazz.net/help


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,939

Question asked: Dec 09 '24, 6:47 a.m.

Question was seen: 240 times

Last updated: Dec 11 '24, 2:18 a.m.

Confirmation Cancel Confirm