Page 1 of 1

How to update Test Case Description via code

Posted: Mon Sep 17, 2018 7:12 pm
by syartsev
Hello,
I'm trying to update a description of a test case.

Was able to get it, but have difficulties to set to something different.

Code: Select all

var TC = Ranorex.Core.Testing.TestSuite.CurrentTestContainer as TestSuiteEntryContainer;
TC.Comment = "hi";
After test run, description in *.rxtst UI has previous value.

Re: How to update Test Case Description via code

Posted: Mon Sep 17, 2018 7:42 pm
by odklizec
Hi,

I don’t think there is a public API to change the comments in rxtst file? What you have done is changing the comment during runtime, but it does not modify the rxtst file. The easiest way to edit comments in test suite is to edit the rxtst file in an external text editor (notepad++ or similar). But don’t forget to make a backup copy before editing it ;)

Re: How to update Test Case Description via code

Posted: Mon Sep 17, 2018 7:59 pm
by syartsev
Thanks.
Is there any other approach to assign PASS/FAILED to a test case, that could be visible from Ranorex UI, especially in *.rxtst file?

Re: How to update Test Case Description via code

Posted: Mon Sep 17, 2018 8:18 pm
by odklizec
As far as I know, no. The only way, to achieve what you want, is most probably manual editing of test case description.

Re: How to update Test Case Description via code

Posted: Mon Sep 17, 2018 8:18 pm
by Support Team
Hi syartsev,

Unfortunately, there is no built-in way to report a test case status in the test suite file at this time. The results of a test are all contained within the generated Ranorex Report file. I recommend creating a new feature request on our User Voice platform as I can see this being a useful feature. It means more when the request comes from you directly than from me.

Kind Regards,
Ned