Automation Testing

Q.No.1. what is the difference between automated and manual testing in Software Development ?

Ans:

Automated Testing:

Automated testing is a software development practice that uses tools to automate the process of validating and reviewing software products. It can help ensure that software meets requirements before being released into production. Automated testing can be beneficial for large projects, repetitive tasks, and projects that have already undergone manual testing. It can also help improve execution speed, test coverage, and effectiveness.

Automated testing can help teams save time, money, and resources. It can also lead to a more efficient feedback cycle, which can help get products to market faster and under budget.

Manual Testing:

Manual testing is a software testing method that involves manually evaluating the quality of an application or software to identify bugs, defects, and other issues. Testers simulate the behaviour of a real user by interacting with the system and using most of its features. Manual testing can be performed throughout the development cycle and after the software is released.

Differences between Automated and Manual Testing:

Manual testing involves a human interacting with a software product to identify issues, while automated testing uses computer programs to run pre-defined tests. Here are some differences between the two:

  • Accuracy

    Manual testing can be less accurate due to human error. Its Less accurate due to the higher possibility of human errors. However, it handles complex tests that require human thinking and judgment better. But automated testing is more accurate for repeatable scenarios. Very accurate for repeatable, non-flaky test scenarios. However, it can be less accurate for tests that need human thinking and judgment or interactions that rely on integrated modules or systems. Poor design of test cases and errors in the test scripts might also lead to lower accuracy.

  • Reliability

    Manual Testing is More reliable for performing exploratory testing and for identifying subtle issues or inconsistencies. Automated testing is More reliable for repetitive tests.

  • Speed

    Automated testing is faster than manual testing and More efficient and effective for testing large, routine, and repetitive tasks at scale.

    Manual Testing is Less efficient and more time-consuming. But more effective for UI-related and human instinct-needed tests

  • Structure

    Automated testing is more structured and doesn't support random testing, while manual testing can support exploratory testing.

  • Cost

    Automated testing can be less expensive than manual testing because the cost is based on the time spent coding and maintaining the tests, not the number of hours required for testing.

  • Programming skills

    Manual testing can be done without programming skills, but automated testing requires them.

  • Human Resources:

    Manual testing Does not require programming skills as it does not involve test scripts, but requires hands-on testing experience. whereas Automated testing, Typically requires programming skills. A strong understanding of at least one of the most common programming languages, like Python, Java, JavaScript, or C#, is recommended. Some modern test automation tools do not require as much scripting of code, although you may need to make sure those tools can reliably handle the tests you need to run based on the type of application you are testing.

  • Deployment

    Automated testing can allow for more frequent testing earlier in the development lifecycle, which can help catch issues sooner.

Q.No.2. Explore some of the most common automation testing tools available on the market ?

Ans: When choosing an automation testing tool, you can consider things like ease of use, supported platforms, and integration capabilities. Some popular tools include,

Selenium

An open-source framework for web testing automation, with a large community for support. Some say it's the best choice for large applications that use a mix of old and new technologies.

Appium

An open-source tool for mobile applications, that's cross-platform and testing framework agnostic. It can be used for native, hybrid, web, and desktop applications.

TestComplete

TestComplete can automate functional UI testing for desktop, mobile, and web applications. With built-in support for 500+ controls and third-party frameworks, TestComplete can handle and identify dynamic UI elements in most available technologies.

Soap UI

This open-source API Testing tool is designed for REST and SOAP web services. Some vital features include automated functional, performance, regression, and security testing. Users can also aim for the commercial version, ReadyAPI (formerly SoapUI Pro), for more advanced capabilities.

JMeter:

This open-source tool is designed for automated performance testing, primarily for web applications. It can stimulate a heavy load of users to access web services and analyse the AUT’s performance. JMeter can also be used for functional API testing.

TestCafe:

TestCafe is a modern end-to-end testing framework for web applications. It allows users to create, run, and maintain automated tests for web applications with ease. TestCafe provides a simple and robust testing solution that does not require WebDriver or other external dependencies, making it efficient and user-friendly.

UFT:

UFT, is a tool designed to perform automated functional testing seamlessly without monitoring the system in intervals. QTP was renamed as UFT (Unified Functional Testing) by Microfocus. The tool is primarily used for functional, regression, and service testing.

Cucumber:

Cucumber is a testing tool that supports the Behaviour Driven Development (BDD) approach. It offers a method to write tests in a way that anybody can understand, even if they are not technically proficient. Test scenarios are written by business analysts or product owners, wherein the behaviour of the system is described from the POV of the users. It is given for review and sign-off by the product owners before developers can write the codes. Cucumber uses Ruby language. The best part about Cucumber is that it involves business stakeholders who cannot understand code.

Katalon Studio

An open-source tool that can test both web and mobile applications. It can be used with Appium and Selenium 4, and integrates with CI/CD pipelines.

Cypress

A developer-centric tool for end-to-end web testing, with features like real-time reloads, automatic waiting, and a time-travel debugger.

Playwright

An end-to-end testing tool developed and maintained by Microsoft, that supports testing web applications in multiple cross-browser, cross-platform, and cross-language environments.

Testsigma

A codeless automation testing tool with a user-friendly interface, making it easy for both technical and non-technical users to create and run automated tests.

Watir

A free and easy to use web driver that can test various web and UI apps. It's compatible with various browsers like Opera and Chrome, and supports other software like Cucumber and RSpec.

Q.No.3. what is Cross Browser Testing ?

Cross browser testing is a quality assurance (QA) process that verifies that a web application, site, or page works as intended across multiple browsers, operating systems, and devices. The goal is to identify defects that could negatively impact how a user views or interacts with the site or page, and to expose errors in frontend functionality before real users encounter them.

Cross browser testing can help create a positive user experience and can lead to higher conversion rates and more revenue for a business. It can be done manually or as part of a test automation strategy.

When creating a cross browser testing strategy, you can consider things like:

  • Scope of testing

    How much testing will be carried out, what is the deadline, and how much functionality will be covered

  • Browsers, operating systems, and devices

    Which browsers (and their versions) will be used, and which OS and devices will be used.

Teams that perform cross browser testing can use metrics to evaluate different aspects of the user experience. Specific metrics may vary depending on how you implement cross browser testing and which platform you use. For each workflow or user journey that you test, you can compare how these metrics stack up across different browsers and devices:

  1. Duration

The time it takes to execute the entire user transaction or interaction on the web page, such as creating an account.

  1. Step Duration

The time it takes to execute a single action, such as clicking a button, within the larger workflow.

  1. Time to Interactive

The time it takes for all elements on a page to fully load.

  1. Largest Contentful Paint (LCP)

The time it takes for the largest element of a web page (considering only content above the fold) to load.

  1. Cumulative Layout Shift (CLS)

This metric measures the movement of content on a web page when certain elements like videos or images load later than the rest of the page. These unexpected movements can cause users to lose their place on a page or click the wrong button.

The last two of these metrics (LCP and CLS), along with a third usage metric called First Input Delay (FID), are especially useful for measuring a website’s performance. Together, they are called Core Web Vitals, a Google-determined rating that measures user experience quality on a specific webpage. To track Core Web Vitals yourself, you first need to install some APIs on your website. Note that some of these APIs are only supported by Chromium browsers Chrome, Edge, Opera, and Samsung Internet. LCP and CLS, for example, cannot be measured on Firefox, Safari, or Internet Explorer.

Q.No.4. Write a blog on TDD and BDD ?

Ans:

TDD- Test Driven Development:

TDD, or test-driven development, is a software development process that involves writing tests before writing code. It's an iterative approach that combines programming, unit test creation, and refactoring. Test-Driven Development (TDD) is a methodology in software development that focuses on an iterative development cycle where the emphasis is placed on writing test cases before the actual feature or function is written. TDD utilizes repetition of short development cycles. It combines building and testing. This process not only helps ensure correctness of the code -- but also helps to indirectly evolve the design and architecture of the project at hand. The process is a simple cycle of:

  1. Create Precise Tests

  2. Code

  3. Refactor

  4. Create precise tests: Developers need to create exact unit tests to verify the functionality of specific features. They must ensure that the test compiles so that it can execute. In most cases, the test is bound to fail. This is a meaningful failure as developers create compact tests based on their assumptions of how the feature will behave.

  5. Correcting the Code: Once a test fails, developers must make the minimal changes required to update the code to run successfully when re-executed.

  6. Refactor the Code: Once the test runs successfully, check for redundancy or any possible code optimizations to enhance overall performance. Ensure that refactoring does not affect the external behaviour of the program.

These three steps repeat for each new feature until development is complete.

Advantages of Test Driven Development (TDD)

  • Unit test provides constant feedback about the functions.

  • Quality of design increases which further helps in proper maintenance.

  • Test driven development act as a safety net against the bugs.

  • TDD ensures that your application actually meets requirements defined for it.

  • TDD have very short development lifecycle.

Benefits of Test Driven Development (TDD)

  1. Fosters the creation of optimized code.

  2. It helps developers better analyse and understand client requirements and request clarity when not adequately defined.

  3. Adding and testing new functionalities become much easier in the latter stages of development.

  4. Test coverage under TDD is much higher compared to conventional development models. The TDD focuses on creating tests for each functionality right from the beginning.

  5. It enhances the productivity of the developer and leads to the development of a codebase that is flexible and easy to maintain.

BDD-Behaviour-Driven Development:

Behaviour-Driven Development (BDD) is a software development process that focuses on user needs and expectations. It's an Agile Testing practice that emphasizes meeting business needs by defining and potentially automating tests before or as part of specifying system behaviour. BDD is based on the test-driven development (TDD) approach and evolved from it.

BDD can help software teams work in the following ways:

  • Collaboration: Encourages collaboration across roles, such as business, development, and QA, who are often called the "Three Amigos"

  • Iterations: Works in rapid, small iterations

  • Documentation: Produces system documentation that is automatically checked against the system's behaviour

BDD can also help address issues with ill-defined requirement specifications and align business and QA professionals. Some advantages of BDD include: Customer-driven product development, Proper prioritization of features, Greater transparency, and Reduced maintenance and project risk.

BDD uses a domain-specific language and a fixed syntax for developing tests. For example, in BDD, developers use Gherkin syntax to express the system behaviour they want to create, then code according to those expressions.

Advantages of BDD Testing

With BDD testing, you can:

  • Have a common language for engineers and stakeholders to communicate about user needs and software solutions.

  • Craft user stories and scenarios to define acceptance criteria for specific software features.

  • Promote collaboration among users, quality team, product team, and engineers to achieve consensus on the project's goals.

  • Reduce uncertainties.

  • Enable faster product delivery by the rapid creation of mutually agreed upon automated tests.

  • Reduce errors in software implementation by converting business requirements into a clear format for all executed tests.

  • Minimize the learning curve and jargon.

Importance of BDD in Software Development

  • Behaviour-Driven Development (BDD) plays a crucial role in software development by bridging the gap between technical and non-technical team members. It ensures everyone understands each other clearly, like a universal translator in a sci-fi movie.

  • BDD keeps development projects focused on meeting both business needs and user requirements. By making collaboration among different roles, it builds a shared understanding of the problem to be solved, similar to a team huddle in a football game.

  • This collaborative approach enables rapid iterations, increased feedback, and a smoother flow of value. Moreover, BDD improves code quality, reducing maintenance costs and project risks. It’s like building a sturdy house with high-quality materials and a solid foundation, ensuring long-term stability.

In summary, BDD practices empower teams to develop better software by specifying product behaviour's using plain language examples, leading to improved collaboration, efficiency, and overall project success.

Behaviour driven development helps you focus on creating better software. It is designed to shift the emphasis from passing tests to delivering features. However, it isn’t a panacea and won’t work for every project.