Define STDOUT of Reports

Best practices, code snippets for common functionality, examples, and guidelines.
mw-tw
Posts: 17
Joined: Tue Jan 03, 2017 11:29 am

Define STDOUT of Reports

Post by mw-tw » Wed May 31, 2017 1:45 pm

Hi,

can anyone help me solving this:

I want to define, that special variables shoult not be logged in my Report / JUNIT Report (like a password)

Is this possible?

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

Re: Define STDOUT of Reports

Post by krstcs » Wed May 31, 2017 2:01 pm

At this point, no, it isn't, not without creating a custom report.

However, with the current Ranorex implementation, you can set one data field in your data connector to be masked so that it prints "*********" to the report instead of the actual value.
Shortcuts usually aren't...

mw-tw
Posts: 17
Joined: Tue Jan 03, 2017 11:29 am

Re: Define STDOUT of Reports

Post by mw-tw » Wed May 31, 2017 2:22 pm

thanks. is this only possible in data connector?

No chance to do this in the properties of a key-sequence, that types in the value of a variable?

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

Re: Define STDOUT of Reports

Post by krstcs » Wed May 31, 2017 7:05 pm

No, if you don't data-drive your tests (which I highly recommend, even if it's just a simple data connector) then there isn't a way to do it.

All you have to do is move the password to a simple data connector and bind it. You don't have to move anything else, if you don't want to.

However, I, again, highly encourage you to manage your data separately from your test script and use data connectors to merge them at runtime. It's much better in the long run and will make your tests easier to manage and understand. Make sure you name your variables well.
Shortcuts usually aren't...

Vaughan.Douglas
Posts: 250
Joined: Tue Mar 24, 2015 5:05 pm
Location: Des Moines, Iowa, USA

Re: Define STDOUT of Reports

Post by Vaughan.Douglas » Thu Jun 01, 2017 12:33 pm

mw-tw wrote:thanks. is this only possible in data connector?

No chance to do this in the properties of a key-sequence, that types in the value of a variable?
First of all, if you're storing your password in you project in plain text it isn't terrifically secure as is. I understand wanting to eliminate it from the report in general, but food for thought.

Second, where there is a will there is a way. You could write an override or custom method for passwords that just doesn't print out the password into the report. For example, you could use AES encryption to encrypt and store your password. Then the encrypted password is what is stored. You'd need to write a method to decrypt the password but not print it out when it gets set into your input field.

As far as I know, the only out of the box method to deal with this situation is as krstcs outlines.
Doug Vaughan