Hi all,
In the user code, how do you write validation results to an excel file? For example, I have multiple radio buttons, I want to make an excel file (to record if each button is selected) like this:
button1 button2 button3
true true true
And later on I want to pull from this file and validate new automations/recordings against this file. How would I do that?
Thank you!
How to write validation results to an excel file?
Re: How to write validation results to an excel file?
Hi Shuai,
I have done something similar to this in my test case. You should be able to use the .NET functions for excel by referencing Microsoft.Office.Interop.Excel in your project, then you can write out to the excel file. There is some useful details in this post:
http://www.ranorex.com/forum/my-excel-f ... t3265.html
For your validation you should be able to use the same excel file as a data source. Ranorex is able to handle Excel connections via the studio data source functionality or via code using the excel connector class. The blog article on “Data driven test automation with Excel” gives a great description on how this is implemented.
http://www.ranorex.com/blog/data-driven ... with-excel
Just so you know Microsoft.Office.Interop.Excel is available under the GAC if Microsoft Excel is installed in the local machine.
Hope this helps with what you are trying to do.
Cheers!!
I have done something similar to this in my test case. You should be able to use the .NET functions for excel by referencing Microsoft.Office.Interop.Excel in your project, then you can write out to the excel file. There is some useful details in this post:
http://www.ranorex.com/forum/my-excel-f ... t3265.html
For your validation you should be able to use the same excel file as a data source. Ranorex is able to handle Excel connections via the studio data source functionality or via code using the excel connector class. The blog article on “Data driven test automation with Excel” gives a great description on how this is implemented.
http://www.ranorex.com/blog/data-driven ... with-excel
Just so you know Microsoft.Office.Interop.Excel is available under the GAC if Microsoft Excel is installed in the local machine.
Hope this helps with what you are trying to do.
Cheers!!
Re: App get crashed while tap on element in iOS Instrumented app
Hi,
I'm using Ranorex CSV connector to write/read CSV reference files, which I'm then using for setting and validating GUI. The advantage of using CSV is that it does not require Excel to be installed on target machine and the CSV files are easy to edit with any text editor.
There are many posts discussing the usage of CSV data connectors. Check for example these two posts...
http://www.ranorex.com/forum/test-data- ... html#p9510
http://www.ranorex.com/forum/csv-file-r ... tml#p16892
You can find some more via "Search".
I'm using Ranorex CSV connector to write/read CSV reference files, which I'm then using for setting and validating GUI. The advantage of using CSV is that it does not require Excel to be installed on target machine and the CSV files are easy to edit with any text editor.
There are many posts discussing the usage of CSV data connectors. Check for example these two posts...
http://www.ranorex.com/forum/test-data- ... html#p9510
http://www.ranorex.com/forum/csv-file-r ... tml#p16892
You can find some more via "Search".
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: How to write validation results to an excel file?
I would agree with Pavel, if you need to write data to a flat file, you should check out the CSV file as it can be read/written by Excel and doesn't require you to install Excel/Office on your test systems. It also is much easier to manipulate because you don't need to use the Office.Interop assemblies and is just a plain text file.
Take it for what it's costing you, but, in my opinion, Excel is the worst thing to happen to testing, ever. Excel is for accountants and should be left there. Testers should learn to use databases, and barring that, use flat text files. And, reporting should be done in a real report format or on a web page, not Excel. But, as I said, it's my opinion...
Take it for what it's costing you, but, in my opinion, Excel is the worst thing to happen to testing, ever. Excel is for accountants and should be left there. Testers should learn to use databases, and barring that, use flat text files. And, reporting should be done in a real report format or on a web page, not Excel. But, as I said, it's my opinion...

Shortcuts usually aren't...
Re: How to write validation results to an excel file?
Thank you everyone! I have found a way around to solve this! 
