I know Ranorex can be set to read from CSV for global parameters. But there is a third party application I do not have a control of, that generates the text file. This text file has different format as shown below:
username=juan luna
password=password123
profile=my_profile
With this approach, I was thinking I had to create a separate script that translates this to CSV where Ranorex is capable of reading.
Would it be possible that I call my Test Suite (.exe) via command line with parameter that will read this format like it was reading from /pa:username=juan luna /pa:.... ?
How to make Ranorex read global parameters from a text file
Re: How to make Ranorex read global parameters from a text file
Hi mcquibin,
Currently, what I know, it is not possible with Ranorex to bind global parameters to data sources.
Alternatively, your problem could be solved as follows:
- Create a script that translates the generated txt file to the CSV format. Afterwards use module variables and connect them to data sources (e.g. your CSV file).
- Integrate a new Code Module (C# or VB.NET) in which you open the generated txt file and extract the required information.
- Write a batch script in which you first read the required information of the txt file and afterwards start your Test Suite with parameters from the extracted third party application txt file. A Batch file which runs your Test Suite with, for example, one single parameter can be realized as follows:
Regards,
m10
Currently, what I know, it is not possible with Ranorex to bind global parameters to data sources.
Alternatively, your problem could be solved as follows:
- Create a script that translates the generated txt file to the CSV format. Afterwards use module variables and connect them to data sources (e.g. your CSV file).
- Integrate a new Code Module (C# or VB.NET) in which you open the generated txt file and extract the required information.
- Write a batch script in which you first read the required information of the txt file and afterwards start your Test Suite with parameters from the extracted third party application txt file. A Batch file which runs your Test Suite with, for example, one single parameter can be realized as follows:
Code: Select all
FOR /F %%a in (YourParameter.txt) do (
set param=%%a
)
set final=YourTestSuite.exe /pa:%param%
start %final%.exe
m10