Save test data to an external data connector

Ask general questions here.
npanag
Posts: 33
Joined: Thu Jun 02, 2016 5:42 pm

Save test data to an external data connector

Post by npanag » Mon Jun 06, 2016 2:24 pm

Hi,

I recorded a Web application in Ranorex where you give the Monthly Gross amount and it calculates the Monthly Net and the Annual Net amounts.

I was able to give data from an Excel file to the Monthly Gross box (with data connector and variables). The opposite is feasible? For example, for every iteration the Monthly Net and the Annual Net amounts to be saved in an Excel file, or a text file, or a SQL Server database.

Thank you

Nick

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Save test data to an external data connector

Post by odklizec » Tue Jun 07, 2016 11:53 am

Hi,

There is definitely no (out of the box) way to save data to Excel file, using Ranorex Data Connector methods. I'm not sure about SQL? But it's possible to save data to CSV file. I'm personally using it, as described here:
http://www.ranorex.com/forum/writing-in ... tml#p34657
Pavel Kudrys
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

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

Re: Save test data to an external data connector

Post by krstcs » Tue Jun 07, 2016 1:33 pm

I write data to SQL Server all the time in my tests, but I have to do it through code modules. As Pavel said, there is no built-in way to do it in Ranorex.

If you just need to validate the value, then you don't really need to write it back, just make sure your calculations are correct and validate your calculations are equal to your SUT's calculations in Ranorex.
Shortcuts usually aren't...

npanag
Posts: 33
Joined: Thu Jun 02, 2016 5:42 pm

Re: Save test data to an external data connector

Post by npanag » Wed Jun 08, 2016 7:59 am

Thank you guys for your help. You guided me looking at the code, where, finally, i managed to find some help in the forum, in the item "How to Query data from sql server 2008".
I was also able to write data to a text file. My problem is that I don't know C#, which i must now explore.