0

I have to test an excel file which generated by the system. This file has around 40 columns in it. Do I have to create test cases for each column separately in order to test?

File contains payment records. Bank details,account numbers,amount etc.

Can't i check them in a single test case or multiple without having test cases for each column? Please explain

  • 1
    Do you required to verify actual and expected data in excel file ? or just data how it displaying in excel ? – NarendraR Nov 13 '18 at 5:06
  • I have to verify the data – Joe Nov 13 '18 at 5:20
  • You mean you have to verify export functionality and have to verify whether has been exported correctly right ? – NarendraR Nov 13 '18 at 5:22
  • Exporting function is done. Now my concern is about data in the file – Joe Nov 13 '18 at 5:32
1

It would be better if you write scenarios for each column at least one. The reason beyond is the export file contains the banking pieces of information so there must be some condition and rules to display the data format in the excel.

Ex: Amount columns may contain the decimal values so it needs to be represented in such format.

Cover some multiple test cases for most highlighted fields like account no, amount etc..

Sometimes the special characters will display in the format of junk

0

If you deal with any point of error (exceptions) that the checking of each column can raise, you can use Soft Asserts to avoid failures to stop the test.

softAssert = new SoftAssert();
systemFile = openSystemFile();
expectedFile = openExpectedFile();
columns = listOfColumns();

for (column in columns) {
    softAssert.assertEquals(systemFile[column], expectedFile[column]);
}

softAssert.assertAll();

The softAssert object holds all the failures and release all of them when you call assertAll().

  • Im expecting an explanation. And also im doing manual testing. – Joe Nov 13 '18 at 6:40
  • It's better if you can give a theoritical answer – Joe Nov 13 '18 at 6:42
  • @Joe, the link above has an explanation on Soft Assert. Let me know exactly what you haven't understood about them. – João Farias Nov 13 '18 at 10:11
  • It's not about the method you do. I wanted to know whether I should create separate test cases for each column or not. Im doing manual testing. So the code is useless for me at the moment. This might help if I do automation. Anyway thanks for the answer. – Joe Nov 13 '18 at 10:36
  • If you are talking about documentation of testing, it`s basically a question of taste: Either way, the execution of the test will evaluate which column and report bugs according to a root cause analysis - if errors in two or more columns are related or not. For a human being, it doesn't make too much a difference. – João Farias Nov 13 '18 at 13:15
0

I've done the same in one of my project where i need to verify export functionality and validate the data. You can refer below checklist for reference

  • Check whether file has been exported with valid file name and extension. Meaning full file name should be given. e.g. there is contact list and button to export in xls file then preferred filename could be contact_details.xls instead of xyz.xls.
  • Check whether user is able to open the exported file.
  • Check weather data format in excel is consistent or not ( font size, type etc)
  • Check exported file have the proper header related to data that user can easily understand. Lets say it a bank details file then first row header should have the headers like

    Bank Name____Branch Address____IFSC Code____Account Number____Account Type

  • Make sure data is exported in correct format and readable (sometime can garbage if wrong format selected)

  • You can consider the file size as well and check whether its in acceptable range
  • You have to pick some records from your application and have to match in excel sheet whether all details for that particular records are correct in excel file and in same row as it should.
  • Do you think it's unnecessary create separate test cases for each column? – Joe Nov 13 '18 at 7:47
  • I guess in excel file you have to verify your data. If there are some limited columns , 10 or 15 then you can define the cases like in in name column you should have bank names only or mobile no field should have only mobile number so on.. and it is getting covered while you validate application data in exported file . You have to understand what actually require and create the test cases for those only – NarendraR Nov 13 '18 at 8:25
  • To be honest i have 67 columns – Joe Nov 13 '18 at 8:33
  • Then go with the specification what actually required and take help from your manager or senior in team. [ personally i feel it doesn't required to create separate testcases for each columns. ] if your motive is to validate the data only then create the testcase for data validation and verify some records (which covers most of columns) in excel sheet. – NarendraR Nov 13 '18 at 8:41
  • That's what I was hoping for. But I was asked to do so. I felt like it's something useless to do so. – Joe Nov 13 '18 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.