Cases to be tested while exporting a report to CSV file

By | 25th Feb 2015 | 2 min read

CSV the Comma-Separated Value or the Character-Separated Value is a highly useful format frequently used to save data from websites. Any spreadsheet program like MS Excel or even an ASCII text-editing application can be used to import the data. In one of my recent projects, there was a requirement to provide an Export link, which should export the report to a CSV file. The report had three fields ( product, quantity and amount). It also had a 'from date' and 'to date' field for sorting the report between a period. Following are the test cases I executed for this case.

  • Ensure that Export link has been provided on the report page.
  • Ensure that on clicking the link, the report is getting exported to a CSV file. See the below screenshots to know how a csv file looks like when it is opened in notepad and on LibreOffice Writer. csv_file_notepad .jpg libre.jpg
  • Ensure that the details on the report ( product, quantity and amount) and on the csv file are the same.
  • Ensure whether on setting the date (start and end date of the product report), the result is exported accordingly.

Storing data in the form of .csv is one of the most easy methods, as .csv is compatible with many applications. It also stores data in the form of plain-text where commas ( mainly ) or other characters are used as line-breakers. You may also come across this requirement at some point of your testing. Hope this helps. You may add further relevant points via the below comment-box. Happy Testing!