Hello, I have a solution that has a large amount of SQL datasources across multiple test suites. Currently it points at one database but in future there will be a need to have it point to another database with the same table structures etc but just a different database name.
Is there a way to mass update all the SQL data sources to have a different database IE: in the "Connection Properties" window under the "Connect to a database name" drop down?
Perhaps a way to mass update all the connection strings for all SQL datasources would be better as that will cover for the possibility of changes to servers as well.
Thanks in advance.
Bulk changing SQL database for all SQL datasources
Re: Bulk changing SQL database for all SQL datasources
Hi,
I think the easiest way would be to edit the rxtst file in a good text editor and simply find&replace all necessary strings. At least this is how I'm doing similar bulk changes Of course, you should do this only after properly backuping solution to version control system of your choice!
I think the easiest way would be to edit the rxtst file in a good text editor and simply find&replace all necessary strings. At least this is how I'm doing similar bulk changes Of course, you should do this only after properly backuping solution to version control system of your choice!
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Bulk changing SQL database for all SQL datasources
That is a good idea but it might not be a suitable option as there are 188 test suites so far
Although your suggestion has given me an idea to maybe get some C# together to perform a find and replace in the RXTST files maybe based on a simple data connector. I wonder if that would work?
Although your suggestion has given me an idea to maybe get some C# together to perform a find and replace in the RXTST files maybe based on a simple data connector. I wonder if that would work?
Re: Bulk changing SQL database for all SQL datasources
Hi,
Good text editors, like Notepad++ or PSPad, allows search&replace operations in files. So I think doing this kind of bulk operation via custom code is possible, but not quite necessary
Good text editors, like Notepad++ or PSPad, allows search&replace operations in files. So I think doing this kind of bulk operation via custom code is possible, but not quite necessary
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Bulk changing SQL database for all SQL datasources
I was thinking there would be a reasonably easy way to update these in bulk via code.
None of the SQL would change, just the connection string itself and it would need changed for all the datasources at once.
None of the SQL would change, just the connection string itself and it would need changed for all the datasources at once.
Re: Bulk changing SQL database for all SQL datasources
Well, I think that such simple change would be really simple with search&replace in files, as I mentioned before. I would really not complicate such a thing with potentially failing custom code, while good programing editors are debugged for many years
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Bulk changing SQL database for all SQL datasources
The main issue is that there are 188 test suites each with a variety of data sources, some SQL, some not. Possibly about 80 different SQL data connectors.
It does look like another users have had issues with this here with some form of reply:
https://www.ranorex.com/forum/multiple- ... t7676.html
https://www.ranorex.com/forum/dynamical ... t5867.html
It does look like another users have had issues with this here with some form of reply:
https://www.ranorex.com/forum/multiple- ... t7676.html
https://www.ranorex.com/forum/dynamical ... t5867.html
Re: Bulk changing SQL database for all SQL datasources
I think a combination the information on those two threads has solved it. The issue I had is that I didn't realise it would only set the connection string for that particular run (rather than changing it persistently).