logicabeans-logo-software-company

Types of QA Testing

types of qa testing

Introduction to QA Testing  

We are a human beings and mistakes can be common for us. Testing is important in our life as this will give us chance to learn more.  Software QA (quality assurance) testing is the process of evaluating the functionality of a software application to find any bugs or issues. It analyses whether the developed software has met the specified requirements and identifies any defects in the software, so that a high-quality product can be made. Software QA testing executes a system to identify any possible gaps, errors or missing requirements in contradiction to the current requirements. 

There are different factors for which software testing is important.  

● Cost-effectiveness: Testing the software on time can save money for a long term. During the development process, if the software QA tester finds any bugs or errors, then the cost to fix those bugs will be minimum. 

● To meet client expectation: It is very important to test the application before it is handed over to client. To maintain better bonding and relationship with client, all the requirement and acceptance criteria provided by client should be fulfilled so that there is no any bug in the production. Software testing should create the best user experience possible. 

â—Ź Security: Your customers will be searching for a trusted, reliable product without having to worry about sensitive data and security issues. Software testing helps in identifying and removing any problems or risks that deal with user security.

Types of QA Testing 

There are two types of QA testing namely manual and automation testing, in software industry. The type of testing you choose depends on several factors, including the requirements of the project, budget, timeline, expertise and suitability.

Manual Testing

Manual testing is a type of testing where tester test the software application by clicking the button manually or interacting with the software. QA engineer prepare the test cases prior to executing the test cases. Manual testing can be done for both mobile and web application. manual testing is something that’s still worth doing as it allows for exploratory testing, i.e., the uncovering of issues that aren’t obvious. Exploratory testing sessions need to have a clear brief to help testers focus on a specific area of the software. Once briefing has been completed, it’s up to testers to try out various actions to check how the system behaves. Black box testing and white box testing come under manual testing

Black Box Testing

Black box testing is a type of testing where behavior of the application is tested. The application is tested on the fly without focusing on internal code structure of application. Black box testing assesses a system solely from the outside, without the operator or tester knowing what is happening within the system to generate responses to test actions. A black box refers to a system whose behavior has to be observed entirely by inputs and outputs. Functional testing and Non-functional testing come under the black box testing

Functional Testing:

Functional testing is a type of testing where functionality of the application is tested based on given requirement and specification. In the functional testing QA engineer test the application with a given input and expect to returns the desired output, regardless of any other details. There is different categorization under functional testing and they are mentioned below 

1. Unit Testing

Unit testing includes testing of smallest piece of software to verify its behavior. It ensures that the code should satisfy the requirements. It is done by developers. Unit testing can be done by both manually or by using tools also like JUnit. It is done to reduce future cost due to early detection of errors. It tests smaller components so that it is easy to find out errors. Enhancement can be performed.

An Example of unit testing would be testing a function that calculates the total cost of a shopping cart for an e-commerce website. The function takes in the list of items in the cart and their respective prices, and returns the total cost of the cart. 

2. Integration Testing

Integration testing is done to ensure that individually tested components can work together to perform the intended task. Integration testing is important because modules work individually but they may not work together when they are integrated It is used to uncover the problems which are occur in interfaces between different modules.

An example of integration testing would be testing the integration of a new payment gateway feature on an e-commerce website. In this scenario, the website already has a working shopping cart feature and an existing payment gateway, but the company wants to add a new payment gateway option for customers

 3. System Testing

Security testing involves determining how well a system can guard against unwanted access, abuse, and data breaches. It is a form of non-functional testing that aids in locating security flaws and vulnerabilities in the system. For security testing, a variety of technologies are accessible, including: OWASP ZAP, Nessus, Burp Suit, and others.

An example of security testing would be testing a new mobile banking app, using a tool such as OWASP ZAP, to simulate an attack on the app and identifying vulnerabilities such as SQL injection or cross-site scripting. By performing security testing, we can ensure that the app is protected against unauthorised access and data breaches and that it meets the necessary requirements for sensitive data

4. Acceptance Testing

Acceptance testing is the last stage of software testing in which the client or end user assesses the software to see if it satisfies their needs and expectations. User acceptance testing (UAT), another name for this kind of testing, is done to make sure the software is fit for its intended usage. Functional and non-functional testing, such as usability and accessibility testing, may both be a part of acceptance testing. Only after the software passes each acceptance test is it deemed to be acceptable.

An example of acceptance testing would be testing a new enterprise resource planning (ERP) system for a manufacturing company. In this scenario, the ERP system includes features such as inventory management, production scheduling, and financial reporting

The acceptance testing process would involve evaluating the ERP system by the end-users, such as the manufacturing company’s managers and employees, to determine if it meets their needs and expectations.

Non-functional Testing

Software testing that focuses on analyzing a software’s non-functional needs, such as performance, security, scalability, and usability, is known as non-functional testing. These tests are run to make sure the software runs and acts in accordance with the standards and guidelines established by the customer or end user.

1. Performance Testing

Performance testing, a type of non-functional testing that helps to discover bottlenecks and optimize the system’s performance, is the process of analyzing a system’s performance under various loads and conditions. A variety of tools are available for performance testing, including:  Apache JMeter, Gatling, LoadRunner and many others

For example. A new e-commerce website could be put through performance testing by simulating a large number of concurrent customers and various network conditions using a program like Apache JMeter, then monitoring the website’s response time, throughput, and stability under these loads

2. Security Testing

In this testing, the tester assesses how well the software will guard against unauthorized access, abuse, and data breaches. This includes checking for security flaws and vulnerabilities in the software. Penetration testing, which simulates an assault on the software, can be used to determine how well the software can defend itself. In order to confirm that the software satisfies the criteria for sensitive data, it is also crucial to evaluate the software’s compliance with industry standards and laws, such as HIPAA or PCI-DSS.

An example of security testing would be a penetration test, in which a team of security experts would attempt to gain unauthorized access to the system by exploiting known vulnerabilities. This could include attempting to bypass login mechanisms, access sensitive data, or disrupt the normal operation of the system

3. Usability Testing

Usability testing is non-functional testing that assesses how user-friendly and intuitive the product is. This include examining the software’s interface, navigation, and accessibility. Real people are used in this type of testing to evaluate the software’s usability by interacting with it. Focus groups, surveys, and user interviews can all be used for this. The software’s user interface and design are enhanced using the feedback gathered from usability testing.

An example of usability testing could be testing the usability of a new mobile app for a ride-sharing service. The test scenario would involve recruiting a group of users who are representative of the app’s target audience, and having them perform a series of common tasks on the app, such as requesting a ride, inputting a destination, and paying for the ride. 

4. Compatibility Testing

Compatibility testing is a type of software testing that is used to ensure that a product, such as a website, mobile app, or software application, works correctly on different platforms, environments, and configurations. It is designed to verify that the product can run on a specific operating system, browser, or device and that it can interact with other products or systems without any issues.

Compatibility testing is an important step in the development process because it helps identify and fix any compatibility issues before the product is released to the public. By performing compatibility testing, developers can ensure that the product will function correctly and as intended for all users, regardless of the system or device they are using. 

White Box Testing

White box testing, also known as structural testing or code-based testing, is a method of software testing that examines the internal structure of the code and the logic of the program. It is used to ensure that the code is functioning correctly and that it meets the requirements and specifications of the program. Unlike Black Box testing, it focuses on identifying and fixing any bugs or errors that may be present in the code and to improve the overall quality and reliability of the software.

It is usually done by developers but can also be done by QA who are technically able and have access to the codes and can understand the internal functioning of the software.

The following are the types of White Box testing

1. Branch Coverage:

Branch coverage is a type of white box testing method that measures the percentage of branches or decision points in the code that is executed during testing. The goal of branch coverage is to ensure that all possible outcomes of a decision point have been tested and that there are no untested paths in the code that could lead to bugs or errors.

The formula to calculate branch coverage: 

  • – (No. of executed branches / Total No. of branches in the code) x 100%
  • – If there are 10 branches in the code and 8 of them are executed during testing, the branch coverage would be: 
  • – (8 / 10) x 100% = 80% 

It’s important to note that achieving 100% branch coverage does not guarantee that the software is bug-free, it just means that all possible outcomes of decision points have been tested. Additionally, it also means that achieving 100% branch coverage does not mean that all conditions have been covered. 

2. Condition Coverage:

Condition coverage is a type of white box testing method that measures the percentage of conditions in the code tested during testing. The goal of condition coverage is to ensure that all possible outcomes of a condition have been tested and that there are no untested combinations of conditions that could lead to bugs or errors.

The formula for condition coverage is: 

  • – (No. of executed conditions / Total No. of conditions in the code) x 100%
  • – If there are 10 conditions in the code and 8 of them are executed while testing, the condition coverage would be:
  • – (8 / 10) x 100% = 80%
    This means that 80% of the conditions in the code have been executed during testing.

Here, achieving 100% condition coverage does not guarantee that the software is bug-free rather it means that the possible outcomes of the conditions have been tested. Another thing to note here is that achieving 100% condition coverage does not mean all branches have been covered as some conditions may have multiple branches

3. Statement Coverage:

Statement coverage or “condition-decision-coverage” is a type of white box testing that measures the percentage of statements in the code executed during testing. The goal of statement coverage is to ensure that all statements in the code have been executed and that
there are no untested statements that could lead to bugs or errors.

The formula for statement coverage is: 

  • – (No. of executed statements / Total No. of statements in the code) x 100%
    – If there are 10 statements in the code and 8 of them are executed during testing, the statement coverage would be:
    – (8 / 10) x 100% = 80%
  • – This means that 80% of the statements in the code have been executed during testing.

Here, achieving 100% statement coverage does not guarantee that the software is bug-free, it just means that all statements in the code have been executed. It is equally important to understand that achieving 100% statement coverage does not mean that all branches and conditions have been covered.  

Some tools to use for White box testing: 

● JUnit: An open-source unit testing framework for Java that is widely used in the industry. 

● NUnit: An open-source unit testing framework for .NET that is widely used in the industry. 

● CppUnit: An open-source unit testing framework for C++ that is widely used in the industry. 

● PHPUnit: An open-source unit testing framework for PHP that is widely used in the industry. 

â—Ź TestNG: An open-source testing framework for Java that is widely used in the industry and supports both unit and integration testing.

Some IDEs such as Eclipse or Visual Studio have built-in coverage features and plugins that integrate with these tools, making it easier to use them in the development environment. 

Automation Testing

Employing automation testing is a practice of utilizing precise programs to perform trials and compare the actual results to the expected outcomes. This approach can be utilized to investigate software applications, websites, and even infrastructure. The motive behind automation testing is to maximize efficiency and cut down the number of manual tests that must be performed. This process can be conducted on multiple levels, such as unit testing, integration testing, and acceptance testing. 

Why we need automation testing?

The advantages of automation testing are numerous: 

● Enhanced productiveness: Automated tests can be executed quickly and in high numbers, optimizing the testing process.  

● Repeatability: Automation testing permits the same tests to be conducted repeatedly with reliable results.  

● Recyclability: Automation scripts can be utilized for different tests and versions of the software.  

● Cost-effectiveness: Automation testing can be economical in the long run as it eliminates the requirement for manual testing, which is generally more costly. 

What are different types of automation tools available?

There are numerous testing automation tools available, some of the most well-known being:

1. Selenium: 

Selenium is an open-source tool for automated testing which is widely used for automating web browsers. This tool enables users to control actions on web pages such as clicking buttons, filling forms, and browsing between pages.  

One of the major benefits of Selenium is its support for multiple languages like Java, Python, C#, Ruby, and JavaScript. This implies that you can choose a language that you are familiar with and use it to create your test scripts. 

For example, 
import org.openqa.selenium.WebDriver; 

import org.openqa.selenium.chrome.ChromeDriver; 

import org.testng.Assert; 

 

public class GoogleSearchTest { 

    public static void main(String[] args) { 

        // Set the path of the ChromeDriver executable 

        System.setProperty(“webdriver.chrome.driver”, “path/to/chromedriver”); 

  

        // Create a new instance of the ChromeDriver 

        WebDriver driver = new ChromeDriver(); 

  

        // Navigate to the Google homepage 

        driver.get(“https://www.google.com”); 

  

        // Find the search box element and enter “Selenium automation testing” 

        driver.findElement(By.name(“q”)).sendKeys(“Selenium automation testing”); 

  

        // Find the search button element and click it 

        driver.findElement(By.name(“btnK”)).click(); 

  

        // Wait for the search results page to load 

        Thread.sleep(5000); 

  

        // Verify that the search results page is displayed 

        Assert.assertTrue(driver.getTitle().contains(“Selenium automation testing”)); 

  

        // Close the browser 

        driver.quit(); 

    } 

}

2. Appium:

Appium is an open-source test automation tool that allows you to execute tests on iOS, Android, and Windows-based mobile applications. It’s a popular choice among mobile app developers and testers for conducting functional and regression tests.  

One of the key benefits of Appium is that it offers support for multiple programming languages, such as Java, Python, Ruby, and JavaScript. This means you can select the language you are most familiar with to craft your test scripts. 

For example: 

import io.appium.java_client.android.AndroidDriver; 

import io.appium.java_client.android.AndroidElement; 

import org.openqa.selenium.remote.DesiredCapabilities; 

import java.net.MalformedURLException; 

import java.net.URL; 

import org.testng.Assert; 

 

public class CalculatorTest { 

    public static void main(String[] args) throws MalformedURLException { 

        // Set up desired capabilities 

        DesiredCapabilities capabilities = new DesiredCapabilities(); 

        capabilities.setCapability(“deviceName”, “emulator-5554”); 

        capabilities.setCapability(“platformName”, “Android”); 

        capabilities.setCapability(“appPackage”, “com.android.calculator2”); 

        capabilities.setCapability(“appActivity”, “com.android.calculator2.Calculator”); 

  

        // Create a new instance of the AndroidDriver 

        AndroidDriver<AndroidElement> driver = new AndroidDriver<>(new URL(“http://127.0.0.1:4723/wd/hub”), capabilities); 

  

        // Find the element of the number 3 button and click it 

        driver.findElementById(“com.android.calculator2:id/digit_3”).click(); 

         

        // Find the element of the plus button and click it 

        driver.findElementById(“com.android.calculator2:id/op_add”).click(); 

 

        // Find the element of the number 4 button and click it 

        driver.findElementById(“com.android.calculator2:id/digit_4”).click(); 

  

        // Find the element of the equal button and click it 

        driver.findElementById(“com.android.calculator2:id/eq”).click(); 

  

        // Get the result text 

        String result = driver.findElementById(“com.android.calculator2:id/result 

3.Cypress

Cypress is a free, end-to-end testing program that can be utilized to automate trials for web applications in a web browser. It is created for making it convenient to set up, compose, execute, and debug tests and to verify your application in a live browser. One of the primary benefits of Cypress is its ability to work with modern front-end structures and technologies, including React, Angular, and Vue js. Furthermore, it offers built-in assistance for different assertion libraries and a powerful debugging tool that makes it simple to diagnose test failures. 

For example: 

Install cypress

npm install cypress

write your test script 

describe(‘Google Search’, () => { 

  it(‘should search for Cypress end-to-end testing’, () => { 

    cy.visit(‘https://www.google.com’) 

    cy.get(‘input[name=”q”]’) 

      .type(‘Cypress end-to-end testing’) 

      .should(‘have.value’, ‘Cypress end-to-end testing’) 

    cy.get(‘form’).submit() 

    cy.url().should(‘include’, ‘q=Cypress+end-to-end+testing’) 

  })

 

run your test script

npx cypress open

4. Katalon

Katalon Studio is an effective and straightforward test automation platform that can be used to test web, mobile, and API programs. It is a popular choice for both developers and QA teams to automate functional and regression tests, and it works with a variety of scripting languages such as Java, Groovy, and C#. 

 An important benefit of Katalon Studio is its user-friendly interface which allows users to generate and execute tests without having to write complex code. In addition, it has integrated support for different testing frameworks including Selenium, Appium, and Cucumber.

Conclusion

To sum up, testing is imperative in the software creation process. It verifies that the software is of superior quality and fulfills the expectations of the end-users. There are many different kinds of testing, including unit testing, integration testing, and acceptance testing, each having its own advantages and drawbacks. It is important to assess the various options and select the one that best accommodates your requirements. In any event, testing is a significant component of the software development process, and it should be given the consideration and resources it deserves.Â