Showing posts with label Software testing. Show all posts
Showing posts with label Software testing. Show all posts

Thursday, October 20, 2016

Testing of Importing Data from Excel

                  Importing data from Excel or CSV file is a common use case which is used in most of the web portals.First data teams collect the data in excel/csv file as it is easy way to gather the data and then upload the collected data in the portal.
This feature seems simple and easy to use but testing of this feature is little complex and sometimes its time consuming.
This feature has basically 3 important component for verification:
1-Excel file
2-Web page
3-Database
Excel file upload
There will be many use cases for testing based on requirements but there are some common and important use cases for testing this feature:
Bulk Upload page
Common Test cases:-
-Don’t select any file and click on “Submit” button
-Select valid excel file having correct data and click on submit button and verify the uploaded data in db.
-Select invalid file like .doc file,jpg file etc and click on Submit button
-Upload one file and try to upload the same file again
-Select valid excel file and click multiple times on submit button
-Open this upload file page in two tabs of browser and select the same file in both page and then try to upload same file
-Verify the use case when file upload process starts and internet connection goes down
-Verify the use case when file upload process starts and server goes down
-Start the upload process and close the browser
-Try to upload the blank file
Excel compatibility:- Verify whether different version of excel file is compatible with this feature.like xls file or xlsx file etc
Excel file name validation:- Verify uploading valid excel file having different kind of names( one word name, name having space, name having special character like abc.xls,abc 123.xls,abc_123.xls)
-
Excel file column validation:
-Remove one column at a time and try to upload the excel file
-Rename the column name
If column name is Abc then change it to ABC or abc and xyz and then try to upload the file
-Interchange the column name and don’t data and try to upload the file
-Interchange the columns and try to upload the excel file
-Remove the the first row contains column names and try to upload the excel file
 Data validation:
Based on the field validate the excel data like
-If field name is mobile number then enter only characters like abcdefgh and then upload the file
-if field name is email then enter email as “asdasd” or “sdfdsfsd@” etc and uplaod the file
-Blank field validation test:- Don’t enter any mandatory field data and try to upload the file
More details on field validation is available at:- http://testerdeep.wordpress.com/2012/05/20/textbox-field-validation-testing/
-If excel file has only first row containing the column names and rest of the file is blank then try to upload this file and verify.
-If blank row is present between two rows having data then try to upload this file and verify the data .
Duplicate data: If one row data is present in another row in that case try to upload the file
Apart from above use cases there are two more important use cases:
Max Size of the file:- Test for the max size of file which can be uploaded
Max number of records which can be uploaded at a time:- Test for Max number of records which can be uploaded


Testing of "Search" functionality



Requirement:  Client wants a “Search” feature for his retail website on which any user can search the items which are available in the website.
 Is this requirement sufficient to start testing?No, this requirement statement doesn't give answers of many questions so clarification is required for those unanswered questions before starting testing.
Requirement Clarification:-
Following questions can be asked for the clarification of the "Search" functionality:-
-On which pages this search feature will be available?
-“Categories” and “Subcategories”  fields will be present  along with “Search” field  for search in specific categories? (Categories should be  based on the items available in the website like –“Sport items”, “Entertainment”. ”Electronics” etc.)
-Search within functionality like “Search in Title”, “Search in price”, ”Search  in all content”  etc. will be present?
-Wild card search  will be present or not?
-Search results  will be based on complete string or will be based on each word of the string?
-Autosuggest will be available in search field?
-UI of search result  page: How we will show the items on search results page? What details will be displayed   in search result page? Image of item will be displayed or not? Etc..
-What will be the users actions on “Search Result” page?
-What will happen when  entered search string matches more than one item available in the system? In which sorting order results will be displayed?
-What will happen if search  string doesn’t matches any items?
-If more results will be present then pagination will be present or Infinite scrolling will be present?
-Will it be same for logged in user and for non logged in user?
-If user does spelling mistake in that case closely matching results will be displayed or not?
-In the search field will there be any maximum character limit ?
Above are the some common questions which any one can ask for getting the more detailed requirements. After getting the clarifications, testing should be done based on the clarifications.
Based  on the clarifications many test cases will be possible for testing this “Search” functionality  but there are some common test cases which should be tested in search field .But before start testing   we need to prepare some test data:
Test data preparation:
Note down all the categories of items which are available in the websites. After that for each categories note down the title of  following items:
-Items having one word in title
-Items having multiple  words in title.
-Items having special characters in title.(especially <>,(),{},[],’ ‘,” ”,&)
-Items having space after one character
-Items having very long title.(more than max character)
-Items starting with different characters and different alphabets.
Test cases for Search functionality:-
Field validation test cases-
      -Without entering anything click on Search button.
-Click in the search field and press Enter key.
-Enter any  one character and click on Search button/press Enter key .
-Enter only special characters and click on Search button.
-Enter  only numbers and click on Search button
-Enter alphanumeric characters and click on Search button
-Enter  alphanumeric characters and special characters and click on search button.
-Enter string more than the max char limit of the field.
-Enter string with spaces(before string , after string  and in between) and verify the results.
Common Functional Test cases for search field:
-Enter the value in Search field which will give only one result and verify the UI of the page
-Enter the value in search field which will not give any results and Verify the UI.
-Enter First / middle/ last  word of any title and verify the search results
-For each item category -Enter the value in search field based on the above prepared “Test Data” and verify the search results. Verify this on all pages where Search functionality is available(Try to test different combination of test data in different pages).
-For each category- Enter the value in search field which will give multiple results :
-verify the UI and pagination.
-Verify sorting order of search results.
-validate the search results and no. of Search results from the DB
- For each category-Add new item in the system and after that search the same item through the Search field.
- For each category-Update title of any existing  item  and after that search updated item through the Search field with old and new title.
- For each category-Remove any existing  item from the system and after that search same item through the Search field.
-Verify the above test cases for logged In and not logged in user.
-Verify that users are able to search public items only. They should not be able to search those items /details which are private.
 -Verify the Browser compatibility for the search functionality
Above are the some common test cases for search functionality.Many other test cases will also possible based on the requirements.
These are the few inputs from my side based on my experience and if you have any other inputs on this then please share your inputs in the comments.

Testing of radio buttons

Radio buttons are very important components of a web page for getting the user responses. If these will not work properly then user entered data can be lost. I am going to share one of my experience of testing radio  buttons with one general question.
Are you Indian?
For testing this question I have verified following  test  cases:
-Without selecting any option click on Next button(If nothing is selected by default)
-Select “Yes” option and click on Next button.
-Select “No” option and click on Next button.
-Select “Yes” option and double click on Next button
-Select “No” option and double click on Next button
-Select “Yes” option ,click on Next button  and then  click on back browser button and verify the selected option
-Select “No” option, click on Next button and then  click on back browser button and verify the selected option.
There were  more than 30 questions in the form and only this question  had radio button options. While testing this question I have faced one issue. User responses were saved in the db for all other questions but responses were not saved  for this radio button type Question . From the front end I have not faced any issue but in DB responses were not there. What could be the reason?
I was curious to know the reason of this bug. After investigation Developer  found that the data type of this column was ‘tinyint(1)’   and   the code was written to accept  “Yes” and “No”  values in this column due to that this issue was happening. The requirement was if User has selected “Yes” then “1” should be stored in Db and If user has selected “No” then ‘0’ should be stored in DB and If user has not selected anything then nothing should be stored in DB. In place of storing ‘1’ and ‘0’  it was trying to save ‘Yes’ and ‘No’.
This was the minor mistake but the impact of this issue was very critical which could result in the data loss of the client.
The most important lesson which I learnt after this was to always verify the entered data in the DB if testers have access to DB otherwise verify all the front end places where the entered data will display or where this  entered data will be used or where this entered data will impact the Application.
Please share your views and experiences and bugs related to radio buttons .