2018 bis heute | 2017 2016 2015 2014 | 2013 | 2012 | 2011 2010 2009 | 2008 | 2007

(ältere Archiveinträge vor 2007 nicht dargestellt, aber in der Suche enthalten)

Mailingliste - Einträge 2018 bis heute


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[QF-Test] How do I update and existing value in a CSV file?


  • Subject: [QF-Test] How do I update and existing value in a CSV file?
  • From: Mike Harper <mharpsnz@?.com>
  • Date: Thu, 20 Sep 2018 14:23:22 +1200
  • Delivered-to: qftest-list@?.net
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=nZSTJoiFVpM79Rw8YICUQC1IOayEteUXZ7caVltnRsU=; b=tZPm3PaFPdsGnzgj9YTtLAttHcx14z1gzLPW5FvtcvQbFuoyc+W4tiCM3wYczrv+it iynaujXER7yy8nMywkkfLoAPpDQ9Q6ysi25e8ueWfmuUPHtcmfsS/SS/fJGX8H9Cjfgb 2jAT3gmfao5AP5svfkkSI0wc0zHqC8FmIN6G4mspcUKbQiiccccsnJyeuwLpx3JF9vrv E8CmID5x4S4EIopA6cfsMTZdy+agsri61BpcW7FdAzwy8ByrPlGFDCl1PC4Yhz54Reec vLb7YjG5NO+srQy2Vg2zZZ+8a6zq7h0LgX9Zxf6L61O5vb8ZfqAbEjpEP59ZblBwo8Ed 8jyA==

Hi,

I am very new to QF-Test, Groovy, _javascript_ etc. and am finding it incredibly difficult finding out how I can update an existing value in a CSV file.

I have searched the archives but can't find anything that shows me how to do this.

My test uses a CSV Data File to pull in the CSV file values.
The CSV data contains two rows:
CIVPart1;CIVPart2
CIV-2018-025-;000001

These values are strung together then a SQL statement is used to see if the full CIV Number can be found in the Database.

If found to exist, I add 1 to the CIVPart2 value and check again - doing this until a record is not found in the database.

I then need to add 1 to the calculated CIVPart2 value and write it back to the CIV file so that when the test runs again, the SQL statement won't reuse values that have already been proven to exist.

I am thinking I need to use aServer Script to achieve the required result. Have been using Groovy to date.

So, can someone step me through the coderequired to update the existing CSV file so that it contains the new value please? (Am almost bald from pulling my hair out)

Thanks in advance for your help.

Mike