Ask a Question

Does SaveResultsAs Junit work?

SOLVED
OliverWu
Occasional Contributor

Does SaveResultsAs Junit work?

There is a very simple routine like below. It alwasy fails. All other types of LogFormat works and I can see the file(s) generated. Do I miss something?

 

function test() {  
  Log.SaveResultsAs("C:\\Work\\junit.xml", lsJUnit, false);
}

 

The TestComplete version is 14.70.237.7 x64

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Does SaveResultsAs Junit work?

Hi,

 

Weird, but I can confirm the problem.

This code:

 

function test() {
  Log.Message("Pass");
  Log.Message(Log.SaveResultsAs("D:\\Work\\junit\\", BuiltIn.lsJUnit, false));
}

 

posts False as a result of the SaveResultAs() call (which means export failure) and the reason for this is not clear to me at the moment.

I would suggest to create Support ticket via the https://support.smartbear.com/message/?prod=TestComplete form.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

4 REPLIES 4
AlexKaras
Community Hero

Re: Does SaveResultsAs Junit work?

Hi,

 

It alwasy fails.

Any more details as for what "fails" means?

 

Try this:

Log.SaveResultsAs("C:\\Work\\junit\\", lsJUnit, false);

Does this work?

If it does, than this is documented in the description of the SaveResultAs method: "The file path (when exporting to XML or MHT) or folder path (when exporting to XML or HTML) to save the log to."

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
OliverWu
Occasional Contributor

Re: Does SaveResultsAs Junit work?

Thanks Alex. It means there is nothing generated. No matter the path is folder or file.

OliverWu_1-1605053688046.png

 

OliverWu_0-1605053653085.png

 

AlexKaras
Community Hero

Re: Does SaveResultsAs Junit work?

Hi,

 

Weird, but I can confirm the problem.

This code:

 

function test() {
  Log.Message("Pass");
  Log.Message(Log.SaveResultsAs("D:\\Work\\junit\\", BuiltIn.lsJUnit, false));
}

 

posts False as a result of the SaveResultAs() call (which means export failure) and the reason for this is not clear to me at the moment.

I would suggest to create Support ticket via the https://support.smartbear.com/message/?prod=TestComplete form.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

OliverWu
Occasional Contributor

Re: Does SaveResultsAs Junit work?

Thanks Alex. I've created a case #00458079.

cancel
Showing results for 
Search instead for 
Did you mean: