6.0 Stacktrace for exceptions in .rxtst file

Bug reports.
Posts: 4
Joined: Tue Jun 21, 2016 1:53 pm
Location: Germany

6.0 Stacktrace for exceptions in .rxtst file

Post by Langrisser » Fri Sep 23, 2016 1:51 pm


the following topics bugs me for quite a time. so today I decided to open a topic.
It is more a suggestion to do better than a bug :)

I am currently the person to merge ranorex commits and deal with merge conflicts. I am always able to solve the issues, the thing that bugs me:

Imagine, I did some mistakes while merging 2 different rxtst files .When I open ranorex studio and want to load the project, I get an exception due to erros in the rxtst file, like in the example below:
stacktrace_rxtst_exception.png (61.81 KiB) Viewed 648 times
This stacktrace is not useful to solve the issues. I would at least expect a line to look at or even better:
The first line and line number of the file that caused the trouble. With the current information I am forced to look through every change, because even simple changes could cause a problem.

Can you enhance the output of your stacktrace, so it can be easier to find the corrupted line in the file?



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

Re: 6.0 Stacktrace for exceptions in .rxtst file

Post by krstcs » Fri Sep 23, 2016 2:03 pm

Ranorex does not accept feature requests through the forums, please email them directly at [email protected].

How would Ranorex know exactly where the problem is since one is editing the file outside of Ranorex (specifically by the merge or conflict resolution mechanisms)? Ranorex can only do so much, and the XML format can be corrupted very easily if one isn't very careful about merging and fixing conflicts. How is it supposed to know what was meant to happen instead of what did happen?

My suggestion would be to compare your problematic version with the previous version in your code repository. Try to make merges as small as possible, and be very careful about what gets saved back into the file before Ranorex tries to read it.
Shortcuts usually aren't...

Posts: 1
Joined: Fri Sep 23, 2016 2:09 pm

Re: 6.0 Stacktrace for exceptions in .rxtst file

Post by UweL » Fri Sep 23, 2016 2:22 pm

Invalid .xml format can be automatically validated with .xsd schema files very easily
(provided there is a schema file already in use and not a hand crafted parser).
Apaches xerces parser provides very useful error messaged with line and character number of the first invalid token encountered.

Content errors caused by the merge (referencing to an item with a invalid ref or id) won't be detectable by a pure parser.