La liste de diffusion est fermée depuis juillet 2022, mais sert toujours d'archive d'informations sur QF-Test.
Cependant, si vous souhaitez rester informé des nouveautés concernant QF-Test, vous pouvez simplement vous abonner à la newsletter :
abonner à la newsletter
[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?
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
|
1. Cookies fonctionnels
Nous utilisons des cookies fonctionnels pour garantir la fonctionnalité de base du site web.
2. Cookies de performance et de statistique
Nous utilisons Matomo pour analyser et améliorer notre site web. Des cookies permettent une collection anonyme des informations qui nous aident à vous offrir un visite clair et facile à utiliser de nos pages web.
This cookie contains a unique, pseudonymized visitor ID internal to Matomo for recognizing repeat visitors.
This cookie is used to track from which website the anonymized user proceeded to any page or sub-page.
The Matomo session cookie is used to track the visitor's page requests during the session. The cookie is automatically deleted at the end of each session (website visit), at the latest after one day.
is created and should be then directly deleted (used to check whether the visitor’s browser supports cookies).
short lived cookies used to temporarily store data for the visit.
short lived cookies used to temporarily store data for the visit.