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 Email delivery functionality

Email functionality is most important part of any web based application. Email feature starts at the Sign up in most of the websites and after that user receives different kinds of emails like updates of application, various kinds of promotions etc. If there will be any issue in this email delivery functionality in that case users can suffer lot and due to this there will be negative impact on the website. So again testing plays very important role to ensure that email functionality is working as expected.
Testing of email functionality is not straightforward if there is no proper setup for email testing in test environment. So setup for testing email functionality in test environment is essential.
There can be various scenarios based on the business requirements in which application sends the email to the user so testing of each flow should be done properly based on requirements but below points are some common test cases for delivered email which should be tested as part of email functionality testing:
Common Test cases for Email Delivery functionality Testing:-
-Verify that Email is delivered successfully
-Verify that user doesn’t receive same email again and again
-Verify that emails are not going into spam folder normally.
- Verify “From” address in delivered email
- Verify “To”  address if email is sent to single email ID.
-Verify “To” address if email is sent to multiple email Ids and also verify that each email Id receive email
-Verify “Cc” address if only one email ID is in the Cc and one email ID  in “To” and verify that email ID mentioned in Cc is getting the email along with the email id  which is mentioned in “To” list
- Verify “Cc” address if multiple email IDs is in the Cc and multiple  email IDs  in “To” and verify that email IDs mentioned in Cc are getting the email along with the email ids  which are mentioned in “To” list
- Verify Subject of the email
- Verify Content of the email
-Verify the attachment if there is only one file in attachment in email and also verify the size of attachment.
-Verify the attachment if there are multiple files in attachment in email and also verify the size of attachments
-Verify the day, date and time details of delivery of an email.
-Verify UI of email in different email account like yahoo mail  Gmail, rediffmail, Hotmail etc.
-Verify Link navigation in the email
-verify that links are navigating to expected page
-After clicking on any link if login is required in that case verify that user is able to redirect to the expected page after login.
-Verify the behaviour of links in forwarded email if user forward that email to some other user.
-Verify the behaviour if user do reply on that email.
-Verify the behaviour if user do “reply to all”
-Verify the unsubscribe functionality of email.

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 .

Textbox-Field Validation Testing

Name-12345
Mobile no.-abcdefghij
Email Id-dsdfs2gmail.com
Age-1000
Anyone can be shocked after seeing this kind of data in there data base. This kind of data can corrupt the data base or sometimes application may crash due to this kind of data. If we don’t want do face this situation in that case we have to do proper field validation testing.   “Textbox” is mostly used  field in all website applications . We should be very careful while doing field validation testing of “Text box”.
Common Textboxes:
Below are the some common text boxes which are mostly used in web based Applications:
Name:
-Only some special characters should be allowed like apostrophe
-Only numerals should not be allowed in Name field
-There should be a character limit in Name field
Mobile No:
-only 10 digits are allowed as mobile no . There should be char limit in this field
-In india mobile no starts with 9,8,7
Email:
-Text in email format "xyz@abc.com" and "xyz@yahoo.co.in" should be accepted
-There should be a char limit in this field
Age:
-This should be numeric field.(Sometimes based on requirements it could be alphanumeric)
-Only max 3 digits should be allowed in Age field
-There should be max age value
Amount:
-There should be a char limit in this field
-only 2 digit should be allowed after decimal(or sometimes based on requirements)
-verify for -ve and +ve values based on requirements for some values like selling price of any item cannot be negative
-Different countries have different notations for numbers. -Enter the max value allowed in the field(ie-'999999' if 5 digit allowed or "9999999999" if 10 digit allowed)
Below are the general field validation test cases for  “Textbox” field:
-Verify the required field behaviour
-Enter special characters and verify the behaviour after saving the detail
-Enter char in caps and verify the details after saving the details
-Verify the max character length of the field
-Enter spaces and do not enter anything and verify the behaviour after saving the detail
-Enter space and then some characters and verify the behaviour after saving the detail
-Enter some words with spaces and verify the behaviour after saving the detail
-Enter alphanumeric characters and verify the behaviour after saving the details
-Enter alphanumeric characters with special characters and verify the details after saving the details
-Copy some text (more than char limit) from different document and paste in this field and verify the behaviour while saving the details and after saving the details
-Copy some text (less than char limit) from different document and paste in this field and verify the behaviour while saving the details and after saving the details
-Enter text after pressing enter button in between the text and save the details and verify the behaviour
Mind Map for Textboxes field validation

Testing of Auto-suggest list

Image
Verification of Autosuggest list is important while testing. Based on my experience following cases needs to be verified :
  • Enter 1 character in the autosuggest field for which Values are not present in the auto suggest list
    • Verify that Autosuggest list is not populating
    • After deleting this character enter other char for which values are present in the autosuggest list and  verify autosuggest list.
  • Enter 1 character in the autosuggest field for which Values are present more than the max display limit of auto suggest list
    • Verify the autosuggest list  and sorting order of values in the list
    • Verify that user is able to select any value from autosuggest list
    • Delete this character and enter other character for which  values  are present
    • Delete this char and enter other char for which values are not present
    • Enter 2nd char
      • verify auto suggest list when values are not present for this entered 2 letter combination
      • verify  autosuggest list when values are present more than the max limit of autosuggest
      • verify  autosuggest list when values are present less than the max limit of autosuggest
      • Verify that user is able to select any value from autosuggest list
  • Enter 2nd,3rd 4th char and verify the values in the autosuggest list and verify the values in auto suggest list which has 2,3 ,4 characters
  • Enter 1 character in the autosuggest field for which Values are present less than the max display limit of auto suggest list
    • Verify the autosuggest list  and sorting order of values in the list
    • Delete this character and enter other character for which  values  are present
    • Delete this char and enter other char for which values are not present
    • Enter 2nd char
      • verify auto suggest list when values are not present for this entered 2 letter combination
      • verify   autosuggest list when values are present less than the limit of autosuggest
      • Verify the value in auto suggest list which has only two char
  • Enter 2nd,3rd 4th char and verify the values in the autosuggest list and verify the values in auto suggest list which has 2,3 ,4 characters
  • Enter first character as special character and verify the autosuggest list.
  • Verify the value in autosuggest list which has special character at 2nd place like (M.A,L&T ,D'Souzaetc) after enterting first 2 chars
  • Verify the value in autosuggest list which has some special characters in between
  • Verify the value in autosuggest list which has space at 2nd place after entering first 2,3 chars
  • Verify the value in autosuggest list which is a combination of 2 to 3 words
  • Enter exact matching word in autosuggest field and verify the autosuggest list
  • Enter some character and after that pick the value from the auto suggest list, delete the value and after that enter some char and pick another value from the autosuggest list.
  • In autosuggest if values are displaying from different different categories then after entering characters verify the values of different different categories
  • Verify the browser compatibility of autosuggest list
Apart from above cases figure out a data set in which values having 2chars,3chars 4 chars, max character values and values from different different categories  and verify these data set values in autosuggest list.

Introduction to Software Testing-Part two

I am continuing my previous post “Introduction to software testing-Part one” .In my previous post I shared the basic process steps of software testing. Now in this post I am going to share high level classification of testing and some basic terms used in testing. In this post I have used some mind maps.I have used mind maps first time and credit goes to "Ajay" who suggested me to use mind maps.It was good experience to use and learn mind maps.
High Level Classification of Testing:
High Level Classification of  software testing
Basic terms used in software testing:
Test Scenarios:   Test scenarios provides  high-level description of the functionalities we need to test for. For example: There is a home page of website and on Home page Login functionality is present so here test scenarios for Login functionality would be:
Example of Test Scenarios
Test Cases: Test cases are the conditions which we test for any particular scenarios and test cases provides more details of functionalities. For Example: For the scenario “Active user tries to login” following could be the test cases:
Example of Test cases
Bug/Defect: This is most interesting thing for testers. This is the output of testing effort . Any behaviour  of the system which is not according to the requirement and any behaviour which negatively impacts the system is a bug/defect. Bug can be related to functional behaviour, UI behaviour, Usability behaviour ,Performance behaviour and  Security  behaviour of the application.
Points to remember for raising bugs:
Bug-Points to remember

Metrics:  During the testing process we collect some kind of information data like No. of defects by severity or no. of defects by phase, Defect Injection rate, Defect removal Efficiency etc. which is called metrics. A good set of metrics provides the direction, it tells us testing status at any given point of time .
Smoke Testing:  Smoke testing usually we perform when any new build of application is available for testing. We do smoke testing to verify whether system is quite stable for the testing  or not. If system is stable then only we proceed with the further testing
Regression Testing:   We do regression testing to verify that new modifications/enhancements does not negatively impact the existing behaviour of the system (which should not be changed as part of new modification/enhancement).
Retesting: During testing if we face any issue in any test case then we raise bug  and that test case status will be fail. Now when the fix of that bug will be available in that case we have to verify that bug as well as we have to test that test case which was failed due to this bug. Testing of same test case again when the associated bug is resolved  is called retesting.
Exploratory Testing:  In Exploratory testing we learn as well as test the application at the same time. More details of exploratory testing we can get here:

Introduction to Software Testing-Part One

Question:What is Software Testing ?
Answer:"Finding bugs/errors in software is called software testing"
Is it wrong answer?
No,It is incomplete answer
Then what is complete answer?
Finding errors/bugs in software is a part of software testing but software testing is :
'Validating the software application against the requirement and to uncover the behavior of application which can negatively impact the end users"
Software testing is an engineering process and it is not an art.As in manufacturing engineering, Engineers always try to increase the production of any item per hour in any manufacturing companies who makes product similarly test engineer always try to increase the rate of finding bugs.Software testing is a complete engineering process.
Software testing engineering is growing rapidly.We have seen lot many enhancements/improvements and changes in software testing process from traditional software testing to Rapid Software Testing(RST).
I will try to share each and every aspects of software testing in details which are known to me but I am starting from the basics.
Development of any software application follows the SDLC (Software Development Life Cycle).And software testing is a part of SDLC. There are many SDLC models like Waterfall model,Iterative model,V-model,spiral model and RAD (random Application development) model etc.But the basic steps of testings are same in all models.
Ideally Software testing process starts at the time when anyone start thinking of making any application but actual testing starts when the product is available for testing after development. In real world testing process starts when basic requirements are ready for making any application.Following are the basic steps of traditional software testing
STEP 1: Requirement understanding: Testers get the requirement details from the business and after that they analyse the requirements and try to understand the requirements from the users perspective.During requirement analysis,several queries comes in testers mind and they raise those queries and get the clarification from the higher authorities and the business.
STEP 2:Test Plan preparation: After understanding the complete requirements,testers starts preparation of Test plan.It is very important part of Testing process.In this step they give estimates about how much time testing will take based on their experience .They decide about the approach of testing whether compatibility testing,security testing ,performance testing and regression testing will required or not.They decide about the data conditioning and so many other things.In a large team usually senior tester or team lead prepare the test plan but if team is small and only one person is handling the complete testing then he prepares the test plan.
STEP 3:Test Case preparation:After understanding and analyzing the requirements testers start the test case preparation.Test case is a high level functionality which needs to be tested.In test cases all requirement should be covered.Usually requirement tracebility matrix can be used to ensure that all requirements have been covered in test cases.
STEP 4:Test Case review: Review of test cases start after completion test cases. Reviewer provides their comment. Reviewer can be any person who knows about the application/requirements/testing.Based on reviewers comment testers modify the test cases if the review comment is valid.
STEP 5:Test Data preparation: To test some application there can be a need of some specific data.Testers have to prepare the test data for testing the application.
STEP 6:Test execution and Defect Management: When development is done of the application then it comes for testing.Then execution of test cases start.If tester face any issue then they raise bug and assign severity and priority to the bug.When bugs get fixed then testers do retesting.After completing the execution of test cases testers do regression testing of application to make sure that existing functionality is working as expected.
STEP 7:Testing Sign Off: After execution of all test cases if application meet the release criteria like all the bugs closed or in some cases if all the critical/immediate/high bugs are closed or then testers give sign off of the application for release.In some cases based on the deadline and system status management takes decision to release the application in production.
to be continued.....