Task 14

1Q.what is the difference between automated and manual testing in software development ?

Manual TestingAutomation Testing
It is manually evaluating software programs to find problems.It involves using tools and scripts to run tests.
It depends on human testers to carry out test cases.It is performed using tools and scripts.
It takes more time and is more prone to mistakes.It is quicker and more accurate than manual testing.
It is subjective and susceptible to the tester's prejudices and experience.It is objective and consistent.
It is appropriate for regression testing and performance testing.It is appropriate for exploratory testing and usability testing.
It necessitates human engagement and observation.It can be carried out over the weekend or overnight.
It can be expensive, as it requires hiring and training manual testers.It can be more affordable long-term than manual testing because it doesn't involve hiring and training manual testers.
It might not be easy to do so because it asks for more resources for larger projects.It can be easily scaled.
It is suitable for smaller projects.It is better suited for larger projects.
It is more flexible since testers can adjust test cases as they go.It requires a more organized approach to test case creation.
It is better suited for exploratory testing.It is better suited for regression testing.
It is more suited to evaluating user experience and usability.It is better suited to evaluating performance and scalability.
It is better suited for testing new features and functionality.It is more suited for testing already-existing features and functionality.
It requires a high level of competence and experience.It requires scripting and programming ability.
It can be tedious and repetitive.It is more effective and lowers the possibility of human error than manual testing.
It can be influenced by the tester's attitude, degree of concentration, and attention to detail.It is dependable and consistent.
It can be time-consuming and cause software delays.It can speed up the testing process.
It can be influenced by the tester's knowledge of the software.It is unaffected by the tester's understanding of the software.

2Q.Explore some of the most common automation testing tools available in market

What is Automation Testing?

Automation Testing means using automation processes to test flaws in software. This is effectively automating human testing. These tests are done before production and ensure a big free and great experience to its ability. It uses test scripts and runs them to test software. Automation Testing is essential, especially nowadays, as it allows you to ship apps to production quickly.

  1. Selenium

    Selenium is an Open Source tool used for Automation Testing. Selenium is widely used for testing Web Applications with support for various programming languages like Python, Java, and Ruby. With Selenium you get access to numerous testing abilities. These include Regression Testing, Functional Testing, Compatibility Testing, and much more. Among all these products Selenium WebDriver which allows the automation of browsers, is by far the most popular.

Supported Platform:

Windows

macOS

Linux

Solaris

2. Appium

Brought to life by Dan Cueller, Appium is an open-source tool for automation testing supported across platforms. It is used for testing mobile applications on both Android and iOS. But that doesn’t mean it can only test native apps. Appium is also suitable for testing Web Apps and hybrid mobile apps. As a user you get the ability to use your preferred programming language with Appium and frameworks like JUnit and TestNG make it very famous.

Supported Platform

  • Windows

  • macOS

  • Linux

  • Android/iOS

3. Katalon

Released in 2015, Katalon is another solution for your automation testing needs. It is very desired as this supports Mobile, Web, and API testing all in a single package. Katalon has features like test recording, test execution, and script generation. It supports programming languages like Java and Groovy. A user can identify problems and analyze results using the built-in feature for test reporting in Katalon.

Supported Platform

  • Windows

  • macOS

  • Linux

  • Android/iOS

4. Ranorex

Ranorex is an automation tool used for testing on multiple platforms. Along with multiple platforms, it also supports multiple programming languages. These include VB .NET and C#. Ranorex supports test recording, test execution, and also test script generation. It is famous for its easy to use Interface which makes the process of testing very simple and efficient. Some additional highlights of this test tools to automate testing:

Supported Platform

  • Windows 2000 (Ranorex Studio not available)

  • Windows XP

  • Windows Server 2003

  • Windows Vista

  • Windows Server 2008

  • Window 7

5. TestComplete

With its original release in 1999, TestComplete is an automation testing tool well-known for automating Web and Desktop applications. Along with extensive support for multiple programming languages like JavaScript, Python, and VBScript, it is equipped with a powerful object recognition engine that can identify objects and properties with accuracy. TestComplete has a range of testing abilities, like functional testing, UI testing, and performance testing.

Supported Platform

  • Windows 11

  • Windows 10 both 32-bit and 64-bit editions

  • Windows Server 2019 & Windows Server 2016

  • Windows 8.1 both 32-bit and 64-bit editions

  • Windows Server 2012, Windows Server 2012 R2

  • Windows 7 with Service Pack 1 both 32-bit and 64-bit editions

    Windows Server 2008 R2

6. IBM Rational Functional Tester

IBM Rational Functional Tester lets you test .NET, Java, and Web-based applications. This Automation Testing Tool provides you with a wide set of features. The features such as Regression, Functional, and GUI testing make it a feature-packed testing application. With IBM’s Rational Functional Tester, you can track the test results and manage various activities regarding testing. Not only that, it also allows for data-driven testing and team collaboration.

Supported Platform

  • Microsoft Windows XP Professional

    • SP2,

    • SP3

  • Microsoft Windows 2003 Server

    Standard Edition SP1,

    SP2 Enterprise Edition SP1, SP2

    Microsoft Windows Vista

    Business SP1, SP2,

    Enterprise SP1, SP2,

    Ultimate SP1, SP2, etc.

  • Linux

3Q.What is cross browser Testing ?

What is Cross Browser Testing

Cross-browser testing is simply what its name means, to test your website or application in multiple browsers and make sure that it works consistently as intended without any dependencies or compromise in quality. This applies to both web and mobile applications.

What kinds of applications undergo this? Customer-facing applications are the best choice. You might wonder “Aren’t all applications customer-facing?” Well, sure, they are. However, let us look at an example.

Application 1: An application developed for a company to internally keep track of its inventory.

Application 2: This is for the end-users to buy products from this company.

1.The best idea would be to test Application 2 for browser compatibility testing since it is impossible to control what browsers/platforms/versions the end-user is going to use.

2.If all computers internal to the company use Windows 8 machines with Chrome browser, then there is no need to look or test for anything else concerning Application 1.

Why is it Performed

For that matter, why is any kind of testing done? The following are some reasons:

To know what is wrong and be able to fix it.

Enhancing efficiency, user experience, and finally, business.

Be informed of any pitfalls.

But if we think specifically about the intent of cross-browser testing–It is twofold. It can be a rendition or appearance of the page in different browsers. Is it the same? Is it different? If one is better than the other, etc. The other reason is the functionality and its working. (Of course!)

Who Performs This Testing

Are you thinking, “There are a million browsers, versions, and platforms out there, which one to choose?”–This, thankfully, is a decision that is not the tester’s responsibility. The client, business analysis team, and marketing teams have a major role in this decision. Also, companies collect usage/traffic statistics to narrow down what browsers, environments, and devices are mostly in use.

The entire project team should have an invested interest, time, money, and infrastructure to support this endeavor.

The QA team can be involved in this process or it might be the design team who are keen on knowing how the application fares in multiple browsers.

Whether QA or any other team performs it, the design and development teams interpret the results and make the relevant changes.

How to Perform Cross-Browser Testing

First things first- is it done manually or using a tool?

People can surely do this manually. However, there are several machines, OSs, browsers, and machines. This leads to a lot of problems, multiple investments, and challenges.

Manual Method

In this case, a business identifies the browsers that the application must support. Testers then re-run the same test cases using different browsers to observe the application’s behavior and report bugs, if any.

In this type of testing, it is not possible to cover many browsers and also, the application might not be tested on major browser versions. Also, performing cross-browser checks manually is costly and time-consuming.

Automated Method

Cross-browser testing is running the same set of test cases multiple times on different browsers. This kind of repeated task is best suited for automation. Thus, it’s more cost and time-effective to perform this testing by using tools.

Lots of tools are available in the market to make this easier.

These tools can help us with one or all of the following, depending on the tool and the licensing types:

1.They provide a VPN (Virtual Private machine) using which you can connect to remote machines and check the working and rendition of your JAVA, AJAX, HTML, Flash, and other pages. Most of them are secure, but since you are submitting your information to a third party, some discretion is advised.

2.Screenshots are provided for the pages, and links are submitted to how they appear in multiple browsers. This is, of course, static.

3.Multiple browsers are synchronized regarding operations performed on one and the results are presented browser-wise.

4.Show the rendition of the page at multiple screen resolutions.

5.When encountering a problem, the team records a video or takes screenshots to transport the issue for further analysis.

6.Support is available for both web and mobile apps.

7.Private pages that require authentication to be accessed can also be tested.

8.Local and within a private network/firewall page can be tested too.

4Q.write a Blog on TDD and BDD ?

What is Test-driven Development(TDD)

Test-driven development emphasizes the creation and execution of automated tests before the development of the actual software code. This methodology revolves around a short, repeatable development cycle to ensure the code base remains error-free and robust.

TDD operates under a simple but strict mantra: "Red, Green, Refactor." This cycle involves the following steps:

Red: Write a Failing Test. The first step in TDD is to write a test that defines a desired improvement or new function. This test should initially fail because the feature it is testing does not yet exist. Green: Make the Test Pass. Once the failing test is in place, the next step is to write the minimal code necessary to pass the test. This step often requires just enough implementation to fulfill the test's requirements without concern about perfect design or optimization. Refactor: Improve the Code. With the test now passing, the code is then refactored. This step may involve reorganizing the code, removing duplication, and making other improvements to ensure the code is clean, efficient, and well-structured. Notably, the functionality, as defined by the tests, should not change during refactoring.

Example of the refactor cycle with red and green.

TDD features :

Test-driven development (TDD) is structured around several fundamental principles that guide the coding and testing process:

  • Test first approach. This principle requires that before developers write any functional code, they must first write an automated test for the new feature or functionality they intend to implement. This test initially fails (the "Red" phase in TDD), which is expected since the corresponding functionality does not yet exist. Writing tests first ensures that development efforts are focused solely on passing the tests with the minimum code necessary, avoiding over-engineering, and keeping the codebase simple and clean.

  • Short development cycles. TDD emphasizes short, manageable cycles of development, often referred to as iterations. Each cycle involves writing a test, passing it, and refactoring, allowing developers to focus on small, incremental changes. The benefit is twofold: it minimizes the risk associated with changes by isolating them into small, controllable portions and allows for continuous improvement in code functionality and structure. Short cycles also enable developers to adapt to changes in requirements or design decisions, as the impact of each change is confined to a small project segment.

  • Refactoring. Refactoring involves improving the internal structure of the code without changing its external behavior. This process simplifies algorithms, removes duplicate code, and renames variables for clarity. Regular refactoring helps avoid technical debt and ensures that the code remains easy to understand, modify, and extend. Importantly, because tests cover functionality, developers can refactor with confidence, knowing that they'll be alerted if a change inadvertently alters the correct behavior of the code.

  • Immediate feedback. The principle of immediate feedback allows TDD to create high-quality software. As developers write tests and the corresponding code, they run them frequently often several times an hour. This process provides them with continuous, immediate feedback on how their changes affect the existing codebase. Immediate feedback is critical for catching issues early in development, significantly reducing the debugging and troubleshooting time typically required later in the project lifecycle.

  • TDD Advantages

    The goal of TDD is to write cleaner, bug-free code from the outset. This leads to several key outcomes:

    • Robustness. Developers ensure the codebase's robustness by writing tests covering each function before implementation. Each new feature starts by meeting the documented expectations, which guards against future changes that could break existing functionality.

    • Fewer bugs. Since TDD requires tests for every new feature before it is implemented, it greatly reduces the likelihood of bugs in the code as tests catch regressions and errors early in the development cycle.

    • Better design decisions. TDD encourages developers to consider structuring their code to make it testable, often leading to better overall design. By focusing on the requirements one at a time, developers are also encouraged to build modular, decoupled systems.

    • Documentation. Automated tests serve as live documentation for the code. They explain what the code does more clearly and concisely than traditional documentation, as they must be updated alongside the code to remain passing.

TDD Disadvantages

Here are the challenges of test-driven development:

  • Upfront design requirement. TDD requires developers to consider their application's design at the start, promoting a well-thought-out architecture but demanding more initial planning and time.

  • Learning curve and development pace. The TDD cycle can initially slow development as developers adapt to writing tests before the code.

  • Discipline in test writing. Successful TDD demands a high level of discipline and a deep understanding of how to accurately write meaningful tests that reflect user needs and system requirements.

  • Potential for overengineering. Balancing the depth and breadth of testing without overcomplicating the test suite is a key challenge in TDD. Developers might spend excessive time designing tests for unlikely scenarios, diverting resources away from more essential development tasks.

  • Integration challenges. Integrating TDD into a software development life cycle can be difficult, especially in large organizations with established workflows. The shift to TDD may require significant changes in team dynamics, project management, and the overall culture.

  • TDD Use Cases

    Here are the cases where the use of TDD is particularly compelling:

    • New projects. Starting with TDD can be helpful for a new software development project. TDD establishes a solid foundation by ensuring every feature added to the project has a corresponding test. This practice helps maintain high code quality, and as the project grows, the comprehensive suite of tests developed from the start serves as a safety net, allowing new features to be added and existing ones to be modified or extended.

      • Projects with precise requirements. TDD excels in environments where project specifications are well-defined and stable. In these cases, developers can write tests that directly reflect these requirements. The direct alignment between tests and specifications ensures that all functionality meets the predetermined criteria. Writing tests first also helps identify any potential misunderstandings or ambiguities in the requirements early in the development process, allowing for clarification before significant resources are invested. Furthermore, the iterative nature of TDD means that each requirement is systematically addressed, tested, and integrated into the larger project, ensuring comprehensive coverage and implementation.

      • Safety-critical systems. TDD is particularly suited for environments where software failures lead to significant harm or cost, such as in medical devices, aerospace, automotive safety systems, and financial systems. The safety and security provided by having a thorough suite of tests means that the software is verified at every stage of its development, significantly reducing the risk of critical bugs or vulnerabilities going undetected. Additionally, in regulated industries, the extensive documentation the tests provide is vital to complying with industry standards and audits.

    • Waterfall development model.

What Is Behavior-Driven Development (BDD)?

Behavior-driven development is a development practice that extends the principles of TDD by focusing more explicitly on software behavioral specification. This approach is fundamentally user-centric, emphasizing the creation of software that meets the business and user requirements by encouraging collaboration and understanding among all stakeholders involved in a project.

BDD aims to shift the focus of software development from merely writing functional code to ensuring that the software behaves exactly as the stakeholders expect. To achieve this, BDD uses simple, domain-specific language to describe the outcomes and behaviors of the system. Stakeholders create these descriptions collaboratively and express them clearly to technical and non-technical participants.

Here is how BDD works in practice:

  • Defining behavior. BDD starts with stakeholders, including developers, testers, business analysts, and product owners, collaboratively defining behaviors using a common language. This language simplifies complex software concepts into terms easily understood by everyone involved.

  • Writing scenarios. These behaviors are translated into specific, real-world scenarios that describe how the software should behave in various situations. These scenarios are written in a "Given-When-Then" format, which outlines the conditions, the action taken, and the expected outcome. This method, known as “Specification by Example,” helps ensure clarity and completeness in the behavior specification.

  • Automating tests. Once scenarios are defined, they are converted into automated tests before any functional code is written. These tests serve as living documentation and a checklist that the software must pass.

  • Implementing code. Developers then write code to pass these tests, ensuring the software behaves as agreed upon. This process is often iterative, where failing tests guide the development until all tests pass, confirming that the software meets the defined behaviors.

  • Refining and iterating. BDD facilitates continuous feedback and iterations as development progresses, allowing behaviors to be refined and extended based on ongoing discussions among stakeholders. This iterative cycle helps catch misunderstandings and misalignments early, significantly reducing the cost and effort of changes.

TDD vs. BDD divider image.

BDD Features

Behavior-driven development (BDD) incorporates several distinctive features that streamline communication among project stakeholders:

  • Ubiquitous language. BDD introduces a shared, domain-specific language that unifies communication across different teams, including developers, QA engineers, and non-technical stakeholders. This standardized language reduces miscommunication and ensures everyone understands project details and requirements, enhancing overall project coherence.

  • Specification by example. BDD defines software behavior using concrete, real-world scenarios. These examples act as precise, actionable specifications for development, allowing teams to visualize how software features should interact with users. This practice aids in developing intuitive and effective software and serves as living documentation.

  • Outside-in approach. This method prioritizes user needs and system behaviors over technical specifications. By focusing on user experiences and business goals from the outset, BDD ensures that development efforts are directly aligned with end-user expectations and company objectives, which leads to more relevant and successful software solutions.

  • Collaboration. BDD fosters extensive collaboration among all stakeholders, from the initial planning to ongoing development. This inclusive approach ensures that development remains aligned with business objectives and user needs, facilitating a more targeted and effective product development cycle.

BDD Advantages

BDD offers a range of advantages that contribute to a more efficient and effective development process:

  • Enhanced communication. Using a common language and the active involvement of stakeholders throughout the development process fosters better understanding and clearer communication across all team members.

  • Focus on user experience. BDD ensures software development meets user expectations and needs, resulting in valuable, user-friendly products.

  • Fewer misunderstood requirements. Stakeholders' early and continuous involvement helps clarify and solidify requirements, reducing the risk of misunderstandings and ensuring that the final product faithfully meets the intended specifications.

  • Continuous feedback. Regular feedback loops with stakeholders throughout the development process enable more accurate and adaptive development, helping teams quickly resolve issues or adjust to changing needs.

BDD Disadvantages

Despite its benefits, BDD also presents several challenges:

  • Requires involvement from various teams. Effective BDD implementation demands broad and continuous collaboration, which can be challenging to coordinate and manage, especially in larger or dispersed teams.

  • Time-consuming. Writing and maintaining detailed behavior specifications is time-consuming and may slow development.

  • Tool dependent. BDD relies heavily on tools for managing and executing behavior specifications, introducing potential dependencies and complexities that need careful management to avoid disrupting the development process. These tools, such as Cucumber, SpecFlow, and Behat, help translate plain language descriptions into executable tests that validate the software's behavior against the specified requirements.

  • Possible overhead. The additional layer of behavior specification introduces complexity and overhead. If not properly managed, this can increase project costs and extend timelines, impacting overall project efficiency.

BDD Use Cases

BDD is particularly effective in scenarios where clear understanding and communication are crucial:

  • Complex systems involving multiple stakeholders. BDD is ideal for complex projects requiring the integration of multiple perspectives. It ensures that all stakeholders' needs are considered and addressed in the final product.

  • User-centric applications. For applications where user satisfaction is critical to business success, BDD helps align the product with user expectations and preferences, enhancing user satisfaction and product viability.

  • Projects with evolving requirements. BDD is well-suited to environments where requirements may change over time, providing the flexibility to adapt effectively to new information and user feedback.

  • Integration with agile processes. BDD complements agile methodologies enhancing adaptability and team synergy. It is an excellent choice for teams that use agile frameworks to manage and execute their development processes.

0
Subscribe to my newsletter

Read articles from DURGAPRASAD KOMATI directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

DURGAPRASAD KOMATI
DURGAPRASAD KOMATI