What is Functional Testing in Software Testing?

What is Functional Testing?

Let us assume that a client is interested to develop a Web Based Email Application (examples: Gmail, Yahoo Mail, Hotmail). Before developing the project, a Feasibility Study is conducted by the client to find out whether they will be able to create a web based email application that covers all the functionalities and their expectations.  If everything goes well with Feasibility Study, then System Requirement Specification (SRS) Document and Functional Requirement (FRS) Document are created. SRS explains about the total behavior of the system in a high level (hardware, software, functional, non-functional requirements) and FRS is focused on functional requirement (operations done by each screen, fields to be present, data to be entered) etc.

For testing the application, TestPlan and TestCases documents are created based on SRS and FRS and testers execute test scenarios present in test cases, find the defects and enter the defects in Testing Tools and follow up with relevant teams until the defect is closed.

Note: Closing of a defect depends upon the priority of the issue.

Prerequisites:

To develop, client needs a domain, a hosting server, a database, mail server. For testing the software, they buy tools like HP’s Quality Center (QC), Quick Test Professional (QTP), and Load Runner etc. The client hires several consultants to complete the web based email application project.

Note: The application life cycle management includes the following phases. The following diagram has been sourced from HP’s Quality Center Manual.

stlc_process

After the email application is completed, a user sees a login page. After logging in, a user sees links like Inbox, Compose, Drafts, Sent, Spam, Trash, Folders, and when an email is opened user sees headers like  Delete, Forward, Reply to sender, Reply to All,  Move etc. When the compose button is clicked, the user sees boxes like To, CC, BCC, Subject, Message body, Send etc. When clicked on each links mentioned above, the user sees a different screen and information related to that screen.

Example for Functionality:

In a web based email application, most of the screens will do some functions i.e. when you click something:

  • It will redirect to another page. When you click menus, sub menus, URLs, it will take you to another page.
  • It will retrieve the information from the database and display it.
  • It will do some calculation and will return the results.
  • In a database, the definition of a function: A FUNCTION IS A DATABASE OBJECT WHICH WILL ALWAYS RETURN A VALUE.

Login Screen (page): User sees create new account link, username box, password box and log in button etc.

Username/Password: If correct username and password is typed, it allows you to log in and do actions that you like. If an incorrect username or password is typed and when the login” button is clicked, the email application will flash an error message. “Either username or password is invalid”. The main functionality of the login page is to obtain the username and password from the user and to return back the requested information or error message upon checking the credentials against the underlying database.

Compose Screen: When composed button is clicked, the user has to enter relevant information for To, Subject, and Message Body Boxes.

When send button is clicked, the email has to reach the intended recipient in the To Box. If a wrong email id (example) is typed in the “To” box, it has to return back an error message. “Invalid email Id; Please type correct email address”. The main functionality of the compose screen is to obtain the necessary information, send the email to the intended recipient and a message “email sent” should be displayed on the screen or it has to return back the “error message” upon checking the credentials against the underlying database.

Inbox Screen: When the inbox link is clicked, the functionality of the screen has to connect with the database, retrieve all emails from the database and has to display all emails. Similarly for sent link it has to show the sent emails, and for draft link, it has to show all drafts.

Other Examples:

Bank Domain: When you take out money by using debit card/online transfer your amount in your account has to be debited. When you deposit money, it has to be credited into your account.

Stocks/Shares market: When a share is bought in settlement trading, that share has to be displayed in Demat account.

 

Software Testing Documentation

What types of documents are needed in software testing?

Requirements: Requirements explain about the client needs to develop software or a software application. Without creation of requirements or understanding the requirements, it is impossible to create software test plan or test strategy or test case or test scripts or requirement traceability matrix. Usually the development team and testing team understands the requirements from documents like System Requirement Specification (SRS), Functional Requirement Specification (FRS), USE Cases apart from discussing with Business Analysts, and Smart Management Experts (SME).

  • SRS: It is a document that has information about the complete behavior of the software system. It provides information about Hardware, Software, Middle-ware, Functional Requirements (overview), and Non-Functional Requirements (overview) etc.
  • FRS: It is a document that has information about the requirements. Functional requirements are explained in a detail manner. In some projects, FRS will be included in SRS itself.
  • USE Cases: The functionality of the software is explained with objective, actors, precondition, normal course, additional course and exceptional course.

Note: At times, understanding requirements is a difficult one because of incomplete information in SRS/FRS/Use Cases or non-availability of those documents. To get more knowledge on the domain (mortgage, insurance, telecom, retail, financial instruments trading) that you are working you can read books and search on the internet.

What is Software Test Plan?

It is a document which provides information about testing activities and a systematic approach to complete software testing and hand over to maintenance. Test Plan is similar like project planning. Unit Test Plan, Integration Test Plan, Acceptance Test Plan, System Plan are different types of Test plans created by testing team.

Software Test Plan Includes:
  • What project features has to be tested.
  • What project features not be tested (Project features out of scope).
  • What are the test deliverables (Test Cases, Test Reports etc.)
  • What are the phases and tasks?
  • How to schedule phases and tasks? Scheduling means when it will start and end.
  • Test Strategy (What is the approach?)

What is Test Strategy?

It describes the testing approach to complete the software testing life cycle. It explains about the testing levels (unit testing, integrating testing, system testing and acceptance testing) and who does the testing for the testing levels. It also explains the roles and responsibilities of the entire team.

What is a Test Case?

Test case is a document which contains 1 or more test conditions (Test Scenario). A good test case will capture more errors so that the software or application is bug free. Test Cases are designed based on the test conditions and they are executed manually or automatically. Each requirement will have at least one test case. Test procedures can run the test cases in a sequential order.

Test Data:

Fact tables, Look up tables, History Tables, XRef Tables, Security Table, Performance related tables etc are few tables present in the databases. For testing, you need some sample data which is called as TEST DATA. For performance testing also, you need test data.

Test Scripts:

A set of instructions written by program language (java, .net) or scripting language (JavaScript, Unix Shell Script, VBScript) to do some actions. Test scripts are written manually by the developer or by automated tools also.

Requirement Traceability Matrix:

In software development life cycle, there are requirements related to release, design, development, and testing etc. New requirements are created and updated as and when required. Requirement Traceability Matrix is a document which traces the requirements.

What is Test Execution Reports?

It is a report run on the test cases execution.

  • How many test cases have been executed?
  • How many test cases have passed?
  • How many test cases have failed?
  • How many test cases have been blocked?
  • How many test cases have errors?

 

Software Testing Tutorial

What is software testing?

Software Testing is a process by which defects or bugs or errors are identified in a SOFTWARE or SOFTWARE Application as per the requirements. This testing process is done by the Testing Team which involves one or more testers (QA), QA Lead, QA Managers, and QA Administrators etc. This testing results/feedback is sent to the development team which involves one or more Business Analysts (BA), Smart Management Experts (SME), Developers, and DBAs etc. The development team checks the defects or bugs or errors and rectifies those and responds back to the testing team. Then the defect is retested by the tester and if everything is okay, then the entire code is moved to the production environment later to achieve the expected results. At times, based on the priority of the issue it will not be closed.

In Software Development Life Cycle (SDLC), the DEVELOPMENT TEAM and the TESTING TEAM will play a major role in achieving the end result or outcome of an application.

SDLC Phases:

  • Requirement Analysis: Feasibility study is done whether the project will be successful on various parameters. If everything is okay, then Business Analysts analyze each and every requirement and create business/functional requirements.
  • Design Phase: Data Modeler designs databases, and an application architect designs front end application or middle tier application.
  • Coding (Programming) Phase: DBAs create databases and developers write code for the front end application or middle tier application or back end.
  • Testing Phase: Build Engineer creates the testing environment and Tester Tests the database, code written by developers etc. Testing will be explained in detail later.
  • Production (Release) Phase: The entire code is implemented in the production environment.
  • Maintenance/Support Phase: DBAs maintain/support the databases and developers support and maintain the applications. Testing is also done for every change occurring in the project.

Defects or Bugs:

Even though defect or bug or errors are more or less similar, in software testing, it has got a different meaning.

Defect:  Examples
  • There may be a situation when BA or SME interprets the business in a wrong way and writes wrong business requirement documents. In that case, the designers will design an incorrect database structure or an application or middle tier services etc. as per the given business requirements. Then this leads to a defect.
  • When Designer doesn’t understand the business requirement document and design an incorrect database structure or an application or middle tier services etc. This will also cause a defect.

Bug:

Bug is the result of an Incorrect Program Code.

Error/Failure:

When an end customer finds a defect or when the program results deviate from the expected results then it is called an error or a failure.

Software Testing Examples:

I. Testing while Development of New Software: There are several companies who have developed new software or developing new software.

Example: oracle, .net, java, UNIX, Linux, open source software etc.

II. Testing while Upgrading of Software: Companies usually adds new features to their existing software. The existing version may be 8.0 and new release may be 9.0.

III. Testing while Development of a new Web Based/Client-Server application: Some bank would have bought some software and created a new application for their line of business say “Credit Card”.

IV. Testing while Upgrading of a new Web Based/Client-Server application: Due to the increased competition, Bank would have added some new features for their line of business “Credit Card” or they would have thought to upgrade their application with new version of software.

V. Back-end testing (data stored in databases) on different operating systems like windows, Linux and UNIX etc.

VI. Testing Mobiles and Mobile Based Applications: There are lot of big players like Samsung, Nokia, Apple, Windows, Motorola, BlackBerry etc who sell mobile phones (SMART PHONES) or Tabs and before launching new mobiles, they test the product and sell it. Since mobile users are using these mobile for purchasing, account checking, online stock trading, secured transactions like Paypal, loan applications, companies provide options for their applications to be downloaded in mobiles.

Example: A company XYZ provides online stock trading activities. By using internet, traders connect to the company XYZ and trade by using their lap tops or desk top. Nowadays users are interested to trade by using their mobiles. For this to happen, XYZ create mobile based applications and provide links on their website to download these applications. Apple mobile users will download apple based application and Nokia mobile users will download Nokia based applications respectively. These applications will be thoroughly tested by the testers before it is used.

Why you need Testing: Few examples

  • Social Security Websites: Hackers may steal personal and identity information. This is due to lack of security in their systems and security testing has to be done aggressively.
  • Web (Email) based applications: You would have logged in by providing your username and password, and at times you will not be directed to the home page of email based applications. The main reason for this error is several users would have logged at the same time. With correct load testing this error can be avoided.
  • Addition of technologies, technology updates and support to technologies.
  • Agile methodology and changes in Agile methodology.
  • Cloud environment and SOA architecture.
  • Reducing cost.

In the following sections, you can learn software testing in a detailed manner like software testing life cycle, bug life cycle,  testing tools, testing methods, testing levels, testing types, testing documents, testing standards, testing interview questions along with real time examples.

 

Software Testing and Mobile Testing Tutorial for Beginners

Software and Mobile Apps Testing Tutorial:

Software Testing:

Software Testing is all about how to develop quality software or a defect less software application system. In a software testing life cycle (STLC), various testing are performed during the software development. For example, manual Testing, automated testing, black box testing, white box testing, regression testing, smoke testing, alpha testing, beta testing, installation testing, performance testing, functional testing unit testing, integration testing, system testing, user acceptance testing are different testing performed during the software development. During STLC different documents like Test Plan, Test Scenarios Test Cases, and Test Procedures are created and Test Cases are executed to develop an error free software or application. The testing may be done either manually or automated by tools.

Mobile Phone:

It is all about how to manufacture a quality mobile phone (device testing), quality mobile website and quality mobile web based application.

  • Mobile Phone Testing: In a mobile phone, you can see different parts like display, key pad, battery, SIM, PCB (Printed Circuit Board), camera, video recorder etc. plus accessories and these parts are tested by Original Equipment Manufacturers (OEMs) like Apple, Nokia, Motorola etc. Different functionalities like calling, SMS, video recording etc. available on the mobile phone are also tested by OEMs prior to release.
  • Mobile Based Applications Testing: When you buy a phone, applications like games, calendars, calculators etc. are embedded in the phone. These applications are tested by the OEMs itself. These mobile manufacturers have stores, where applications (free or cost based) are available and you can download those applications. These applications are created by OEMs, individual developers, Companies etc. As of now, close to half-a million applications are on these stores which are also tested by OEM.
  • Mobile Websites Testing: Companies have created several websites exclusively for mobile phones to help the mobile phone users. Using Mobile phones on mobile websites will be faster than their regular websites. These mobile websites will be tested by companies before it is ready for use.

Contents:

Browse through the following sections to learn more.

 

Software Testing Life Cycle

What is Software Testing Life Cycle | Basics and Concepts of Testing Life Cycle:

In this section, we will see the Software Testing Life Cycle (STLC) in brief which includes the requirements, test plan, test strategy, test case design, Test data, test scripts, requirement traceability matrix and test execution reports. We have also included a Flow Chart for describing software testing life cycle for better understanding.

Requirements:

  • Requirements Study.
  • Clarification of Requirements should be closed.
  • Functional Documents should be signed off.

Test Plan:

  • Test Plan should cover all requirements.
  • Test Plan should be signed off.

Test Case Design:

  • Identification of Test Scenarios.
  • Identification of Test Data for the identified scenarios.
  • Test Cases signed off.

Mapping:

  • Requirements and Test Cases should be mapped.

Requirement Traceability Matrix (RTM):

  • RTM should be created and signed off.

Test Execution:

  • Unit Testing should be completed.
  • Test Environment should be created.
  • Smoke Testing should be completed.
  • All Test Cases should be executed.

ReTesting and Regression Testing:

  • Defects raised should be mapped to Test Cases for the defects raised.
  • Retesting and Regression should be done.

Test Summary Reports and Exit:

  • Test Summary Reports should be signed off.

Test Closure:

  • Testing Completed. Maintenance Phase Begins.
  • Testing signed off.

Software Testing Life Cycle (STLC) Flow Chart:

Software Testing Life Cycle (STLC) Flow Chart:

1 2