update csv with the result of the test

Ask general questions here.
rsudhak
Posts: 118
Joined: Fri Jan 04, 2019 1:38 pm

update csv with the result of the test

Post by rsudhak » Mon Mar 11, 2019 9:58 am

I have csv as a datasource which provides data for the test, all I need to do is update the last column with the test results, how can this be achieved?

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

Re: update csv with the result of the test

Post by odklizec » Mon Mar 11, 2019 10:11 am

Hi,

I personally think that modifying ref. data file with test results is a bad idea. Ref. data should be used as ref. data and should stay unmodified during test run. Ref data should not be modified with test results. Just my opinion ;)

Anyway, a general code, which should help you with writing data to CSV file, can be found here:
viewtopic.php?f=21&t=8574&p=34657&#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

rsudhak
Posts: 118
Joined: Fri Jan 04, 2019 1:38 pm

Re: update csv with the result of the test

Post by rsudhak » Mon Mar 11, 2019 2:22 pm

Thanks for the reply, is there a way wherein I can get the data from a particular row while running the tests?

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

Re: update csv with the result of the test

Post by odklizec » Mon Mar 11, 2019 3:02 pm

Hi,

Generally speaking, yes, it's possible to get rows from data connector using code. I personally would suggest not mess with code, and especially data connectors, unless absolutely necessary. Doing data connector manipulations via code could easily make your test suite unreadable and very hard to maintain. So you should stick with standard data connector workflow as much as possible.

Anyway, you can find some hints how to load and access data connector columns/rows in this post:
compare-multiple-csv-files-t9412.html#p37938
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

rsudhak
Posts: 118
Joined: Fri Jan 04, 2019 1:38 pm

Re: update csv with the result of the test

Post by rsudhak » Tue Mar 26, 2019 12:38 pm

how can I get the row count of effective data set using dataConnector or some other class?