Column Name in CSV file while writing from XML Databank
Hi Team,
I am trying to write the extracted element to a CSV file using python code.Is there any way I could achieve a scenario where the Column name is only written once.
eg:
I have extracted BillingAccountNumber using xml databank and I need to store in a CSV file.So I have given the Column name as BAN and written the value say 1234.But as I am using excel datasource having multiple rows I am getting the BAN column name again and again till the total iteration count that i have given in datasource.
Can anyone help me with this?
Thanks in adv.
Comments
-
Your python script is what is writing to the CSV file, right? Maybe your script needs to be updated to keep track of whether it already wrote the column headers, so it doesn't keep writing them out redundantly.
You may also consider why you are using the disk to pass data between test cases. SOAtest has a Data Bank tool and a Writable Data source as some of the ways for passing data. Using file system is also not necessarily thread safe, if you ever wish to leverage your tst in a load/performance test later.
0 -
Thanks @benken_parasoft . I need for log purpose so I have saved it in file.
0