Renaming recordings in Rx Studio doesn't always update the .rxrec file correctly

Bug reports.
User avatar
Stub
Posts: 378
Joined: Fri Jul 15, 2016 1:35 pm

Renaming recordings in Rx Studio doesn't always update the .rxrec file correctly

Post by Stub » Thu Sep 17, 2020 10:25 am

We're having a problem here that consistently affects one person in particular, but I haven't been able to reproduce myself on a different machine so that I can provide repro steps. Hence I'm wondering if any of the below sounds familiar to anyone?

I've sat and watched while the user renames their recording modules in the Projects tree within Ranorex Studio and seen for myself that Ranorex fails to update the .rxrec file with the new name in the following block:

Code: Select all

<codegen classname="NameOfTheRecording" ...>
This causes the class name in the generated .cs file to not match the code in _UserCode.cs, resulting in compilation errors. Sometimes the name of the <usercodefile> element at the bottom of the .rxrec file doesn't get updated, sometimes it does. Oddly, Ranorex would update the comment <summary> block in the generated source code .cs file but crucially not any of the actual C# code. The 3 files related to the recording do all get renamed.

This is a real pain for him as it deters him from renaming his recordings, knowing that Ranorex Studio is probably going to mess it up. At least we now have the work-around of hacking the .rxrec file directly using a text editor, but every time he wants to rename a recording?!?

It was utterly repeatable this AM, so we tried various things like saving and building the solution and making sure there were no open files, all before attempting to rename a recording via the Project tree. We'd then open the Ranorex generated .cs file to verify it had the wrong class name shown. Next we'd hack the .rxrec and then finish it off with a Rebuild.

Ranorex Studio is v9.3.2 running on Windows10. Yes, I realise there is a v9.3.3 and yes I will update to that version at some point when I have the time to do so, but that is not right now.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6263
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Renaming recordings in Rx Studio doesn't always update the .rxrec file correctly

Post by odklizec » Thu Sep 17, 2020 10:33 am

Hi Stub,

I can confirm this problem and it happens in 9.3.3 too! It does not happen always, but it's bad enough to ruin my day. I was too forced to manually edit rxrec and cs files to make the solution compilable again. I had no time to investigate the problem yet, so "I'm glad" I'm not alone in this ;) I will take a closer look on this problem.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Stub
Posts: 378
Joined: Fri Jul 15, 2016 1:35 pm

Re: Renaming recordings in Rx Studio doesn't always update the .rxrec file correctly

Post by Stub » Thu Sep 17, 2020 12:26 pm

Awesome, Pavel, it is nice to know that this isn't isolated to his machine.

One further bit of intel. We were just renaming and reorganising some of his recordings and discovered that the renaming worked this time. I was a bit surprised by this. Then he remembered that I'd suggested restarting Ranorex Studio. He'd done that inbetween our sessions. After restarting Ranorex Studio he is able to rename his recordings. This has happened many times now so there is something internal to Ranorex Studio that is going wrong at some point, but we have no idea what causes it yet.

So when it recurs we'll just hack the .rxrec file to get it to build, and then he'll restart Ranorex Studio.

MichalSk
Posts: 36
Joined: Fri Jul 10, 2020 9:23 am
Location: Pforzheim, Germany

Re: Renaming recordings in Rx Studio doesn't always update the .rxrec file correctly

Post by MichalSk » Thu Sep 17, 2020 5:31 pm

Stub wrote:
Thu Sep 17, 2020 12:26 pm
Awesome, Pavel, it is nice to know that this isn't isolated to his machine.

One further bit of intel. We were just renaming and reorganising some of his recordings and discovered that the renaming worked this time. I was a bit surprised by this. Then he remembered that I'd suggested restarting Ranorex Studio. He'd done that inbetween our sessions. After restarting Ranorex Studio he is able to rename his recordings. This has happened many times now so there is something internal to Ranorex Studio that is going wrong at some point, but we have no idea what causes it yet.

So when it recurs we'll just hack the .rxrec file to get it to build, and then he'll restart Ranorex Studio.
Hello Stub, Hello everybody,

I can tell you guys, you are not the only persons who needs to deal with this kind of problem/bug :roll:

In my case, I didn't looked deep enough in to the code, but basically when Renaming recording modules in Ranorex Studio, sometimes they didn't updated instantly, and therefore caused problems while executing test cases.

For me the only thing that worked out, is, like you mentioned, restarting Ranorex Studio.
I really hope the Dev Team will fix this issue, with the next version..