Description field in TestSuite from CodeModule source

Ranorex Spy, Recorder, and Studio.
pe-jot
Posts: 2
Joined: Fri May 13, 2016 12:24 pm

Description field in TestSuite from CodeModule source

Post by pe-jot » Fri May 13, 2016 12:41 pm

Hello,

What I'm trying to do is to get the description of a CodeModule in the TestSuite directly from the soure code's comment, e.g. like the following:
CodeModuleDescription.png
Screenshot of CodeModuleDescription
CodeModuleDescription.png (73.92 KiB) Viewed 670 times
I've tried the <description> tag as well but it doesn't has any effect either.
Is there any special comment-tag which can produce this?

Thanks in advance,
Philipp

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Description field in TestSuite from CodeModule source

Post by krstcs » Tue May 17, 2016 2:59 pm

Comments are not part of the compiled executable in .NET (or any other compiled language that I know of), so you can't get them during run-time (they aren't there).

The only way to get the value in code would be to create a new string variable and set it to the value of the description. However, this would be time-consuming and prone to issues when you change descriptions.


Can you please describe why you want this information and what you are needing to do with it, in more detail? Maybe there is another way to do what you need.
Shortcuts usually aren't...

pe-jot
Posts: 2
Joined: Fri May 13, 2016 12:24 pm

Re: Description field in TestSuite from CodeModule source

Post by pe-jot » Tue May 17, 2016 4:34 pm

Sorry, I know that this topic is hard to describe (at least for me ;-) ), but I'll try my best...

I know that .NET comments aren't available during runtime, but what I want is to have a description comment of the CodeModule in the TestSuite's Descrption field while working with Ranorex (Engineering-time). I assume that Ranorex Studio is able to parse a CodeModule for several purposes.

When I am drag&dropping a CodeModule into the TestSuite, currently I have to type in the description into the TestSuite manually. However, the functionality of one CodeModule doesn't change from TestSuite to TestSuite. So, from my point of view, I can describe the functionality inside the CodeModule, e.g. as a documentary comment.

Example: I have a CodeModule called "PrepareProject" which cleans up a folder and extracts some files from a zip. So, its description would be e.g. "Cleanup working folder and extract project files".
I'm using this CodeModule in three TestSuites A, B and C, which means they are deployed in the TestSuite view. However, the 'Description' column in the TestSuite is empty. I have to enter my description text in all 3 TestSuites A, B and C.
Let's imagine the functionality of my CodeModule "PrepareProject" changes or is getting extended. Now, I have to change the 'Description' column in all 3 TestSuites A, B and C.

I've added another screenshot from another IDE which should illustrate this. Hope it makes the thing more clear ;-)
SampleCodeModuleDescription.png
SampleCodeModuleDescription.png (67.33 KiB) Viewed 656 times
Thank you!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Description field in TestSuite from CodeModule source

Post by Support Team » Fri May 20, 2016 9:09 am

Hi pe-jot,

Unfortunately, there is no such a feature in Ranorex Studio.
If you want to submit a feature request, I would please you to send an email with a short description to [email protected].

I'm looking forward to your email.

Kind regards,
Matthias
.
Image