Editing an XML file that is with the Ranorex solution

Ask general questions here.
andy.simpson
Posts: 23
Joined: Fri Jun 22, 2018 8:59 am

Editing an XML file that is with the Ranorex solution

Post by andy.simpson » Thu Jun 06, 2019 11:13 am

Hi,

As part of my automation I have a an XML embedded within the solution which dictates the database source along with username/password. As I start to execute many different configurations over remote agent I was wondering if there was a clever way of incorporating the changing of where this is pointed at as part of the test? Putting something like that in the setup would reduce time and the risk of running tests against the wrong database.

Has anyone done anything like this before?

Thanks
Attachments
databaseconfig.png
databaseconfig.png (41.06 KiB) Viewed 87 times

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

Re: Editing an XML file that is with the Ranorex solution

Post by Stub » Thu Jun 06, 2019 12:46 pm

You could write a code module that runs during a [Setup] block which updates this XML file ahead of any tests that require it. You could parameterise this code module to fine-tune the adjustments it makes to the XML file. And then data-drive the test-case/smart-folder with these parameters so it gets modified multiple times.