Cases to be ensured while importing and exporting files
Importing and exporting files are common features we come across in software development. In one of my projects, I had to import large sized files which needed to be exported as well. Since normal process of importing and exporting files may cause problems when there is a network connectivity issue, we opted for Drupal's Batch API process to do this functionalities. Following are the client requirements:
Requirements :
- Import page should allow staff to import data into the MYSQL database.
- Export page should allow staff to export data from the MYSQL database for download.
Test cases executed while importing and exporting files:
- Ensure that the user can import small and larger files (We had to test whether 5 million email addresses can be imported or not. For testing this 5 million email address, I was provided with an url for generating email addresses.)
- Ensure that the time taken for importing is reasonable.
- Ensure that if blank lines exist within the imported text file, it should not be imported but skip to the next line.
- Ensure that the user can download the exported zip file.
- Ensure that every email imported is getting displayed while exporting the same.
- Ensure that on importing and exporting files, users are notified with proper messages.
- Also ensure that on successful import and export, proper messages are getting displayed.
- If there is a cancel button on import and export pages, make sure that its working. That is on clicking the cancel button, import/export process should no more take place.
- Ensure the redirection of pages after import and export process as per your requirement.
- Ensure the alignment of import and export pages on all latest browsers and OS. That is browser compatibility should be ensured.
The batch process manages repeated jobs without any interruption. Also if your system gets stuck in between importing/exporting, you can copy paste the same URL and the process restarts from where it was aborted last time, which is a time saver. These are some of the basic test cases for your reference. Feel free to come up with other test cases. Happy testing :)