Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

When selecting an automation tool, what features will you look for?

Answer»

Here are some of the features to look for when selecting an AUTOMATION tool:

  • TEST Environment support, 
  • EASE of use,
  • Debugging features,
  • Testing capabilities for various elements,
  • UI ELEMENT identification features,
  • Should allow database testing.,
  • Should support MULTIPLE frameworks.
2.

What are some development practices to follow when writing automated tests?

Answer»

All the software development rules APPLY when writing automated tests. Here are some of the best practices that ONE can apply for tests.

  • Validating the tests will fail
    • Similar to testing that software will work, it's essential to ensure the test will fail if the FEATURE its testing doesn't meet the criteria. 
    • A test that never fails is worse than having no tests, as it gives a false assurance that the feature is working. 
  • Don't Repeat Yourself (DRY)
    • Avoiding duplication in code is crucial.  
    • The benefit of this strategy is that the change is isolated to a single location, preventing BUGS and ERRORS
  • Keep Functions Small
    • Since the testers who are creating automated tests are not familiar with good coding standards, it's easy to fall into the trap of creating giant functions that try to do everything. 
    • This quickly results in unmaintainable code that the team is afraid to touch when the requirements change, resulting in out-of-date tests that test the legacy behavior of the system. 
  • Write Good Documentation
    • Having well-written documentation explains not only the what, but then why is important for new team members when they try to understand the tests. 
    • It can also help the person who wrote the tests when they try to modify/understand the tests in the future.
3.

How do you automate the testing of CAPTCHA?

Answer»

It’s not possible to automate the TESTING of CAPTCHA. That is the goal behind any good CAPTCHA strategy. By definition, a COMPUTER can’t automate it. If it could, then it’s not a good challenge that you can use in your application.

However, if you need to test an application that uses CAPTCHA, you have to work with the development team to build a workaround or a BACK door that allows the automated test to bypass the CAPTCHA challenge. It’s IMPORTANT to restrict this workaround only in the test environment and not release it to production.

4.

What is CAPTCHA?

Answer»

CAPTCHA stands for COMPLETELY AUTOMATED Public Turing Test to tell Computers and Humans Apart. It is a type of security measure and is also KNOWN as challenge-response authentication.

The primary goal of the CAPTCHA is to protect you from spam or denial-of-service attacks by bots/scripts by asking you to complete a simple test that is difficult for computers to follow. It proves you are human and not a COMPUTER.

A CAPTCHA challenge consists of two parts:

  • A randomly generated sequence of letters/numbers. These alphanumeric characters appear as distorted images and might appear behind other non-significant characters to make it difficult for a computer to parse them. 
  • A TEXT box where the user is supposed to copy the characters. To pass the test and prove that they are human, the user types the characters in the text box.
5.

What are the different phases in an automation testing life cycle?

Answer»

Similar to a software development and software TESTING life cycle, automation testing has its life cycle. Here are the major phases that an automation testing project goes through.

  • Figure out the SCOPE of automation testing
  • Choose the CORRECT automation FRAMEWORKS and tools
  • Design a TEST plan + test execution strategy
  • Set up the test environment
  • Development and execution of the test cases
  • Analysis and generation of test reports
6.

What are some risks associated with automated testing?

Answer»

Although test automation comes with benefits such as efficient and FAST, repeatable tests, there are a few risks a team should be aware of.

  • Negative ROI
    • A team can make a considerable investment to get automation testing going. Automated tests require lots of code and expensive tools. Developers and testers spend significant time in learning and implementing automated tests. 
    • However, as it’s put into practice, the team might realize that the testing STRATEGY is not providing any real value, as the software is complex with constantly changing configuration and features. They have to keep the tests constantly up-to-date. 
  • Playing catch-up with the technology.
    • As with any software, automation testing tools and frameworks go through constant evolution. There is a STEEP learning curve to the automation tools and need prior programming experience. 
    • Instead of picking a tool and using it well, the development/testing team spends their time learning and playing with different tools and technologies. In that case, the automation testing might not realize its original promised value. 
  • Maintenance Risk
    • All code has to be maintained and kept up-to-date with the changing REQUIREMENTS and fixing bugs. Test automation code is no exception to that. 
    • Instead of building new features and fixing bugs in the software, if developers and testers find themselves spending most of their time working on the automation framework, automated testing has failed.
7.

How will you automate the basic login in a web application?

Answer»

Assuming a tester has configured the TEST environment and a test tool like Selenium, here are the steps I would take to automate the login functionality.

  • Test the login manually to understand all the input fields, checkboxes, and buttons on the login screen. Keep a note of which pages the user is redirected to in both successful and failed logins. 
  • Prepare a test dataset that contains the USERNAME and password combinations. The inputs consist of varying lengths and have alphanumeric CHARACTER sets. 
  • Develop test cases to test various paths the user MIGHT take in a real-world scenario. Note down the expected outputs for each test case. 
  • In the test tool, configure each test case to be manually invoked, and use the test data prepared in step 2. Record the instances where the actual output doesn’t match the expected result. 
  • Verify and VALIDATE the success/error messages and the redirects after each login attempt.
8.

What are the test library APIs provided by the Robot Framework?

Answer»

The Robot Framework has three test library APIS

  • STATIC API: A module or a class containing methods map directly to the keyword names that take the same arguments as the implementing methods. 
  • Dynamic API: The names of the KEYWORDS to implement and how to implement is determined at runtime. 
  • Hybrid API: Combination of both the static and dynamic API. LIBRARIES are CLASSES containing the methods that tell them which keywords to implement, but those keywords must be available directly.
9.

What is the Robot framework? Provide a brief overview of its architecture.

Answer»

Robot Framework is an increasingly popular, open-source automation testing framework primarily used for robotic process automation (RPA). Robotic process automation tries to emulate human actions and interactions with software. Similar to REAL humans, robotic automation can understand (to an extent) what is on screen, press keys and buttons, navigate to links and extract data.

The Robot Framework is written in Python and OPERATING system agnostic. Most of the libraries in the ecosystem are also open-source. It has a modular architecture open for extension with other libraries. It defines the test data in files using a special syntax that’s specific to the framework. A test suite contains multiple such tests. 

When you start the execution of the tests, the Robot Framework parses the test data and uses the keywords PROVIDED by the libraries to INTERACT with the software. These libraries communicate with the software directly or indirectly using driver tools.

The Robot Framework runs the test from the command line. However, you can get detailed reports and logs in both XML and HTML formats. The framework has good support for STANDARD libraries out-of-box, e.g. ArchiveLibrary, Browser Library, DataDriver Library, HttpRequestLibrary (for Java), etc.

10.

What are some of the alternatives to Selenium?

Answer»

For a long time, Selenium has been one of the most popular test automation tools preferred by many teams. HOWEVER, it is a very sophisticated tool with a steep learning curve, and it might not be suitable for all test projects. In recent years some popular alternatives have emerged, listed below.

  • Cucumber
    • It’s an open-source testing tool that allows writing tests in a simple, plain language readable by ANYONE on the team.
    • It focuses on behavior-driven development, where the human-readable description of the functionality is used as the basis for testing.
  • Cypress
    • Cypress is a free and open-source testing tool. It’s WRITTEN in JavaScript and has become very popular recently because of its simplicity and advanced features that allow you to perform browser testing.
    • Cypress makes it easy to write and debug UNIT tests, end-to-end tests, integration tests. It also supports taking snapshots and recordings to help to reproduce the bugs.
  • Robot Framework
    • Robot Framework is a generic open-source automation framework. It can be used for test automation and robotic process automation (RPA).
11.

What is a test automation platform?

Answer»

A TEST automation platform is a tool or a framework that makes it easy to automate software testing. It uses programs and scripts that are written by developers or TESTERS to automate the ENTIRE process.

A test automation platform typically provides all the functionality that you would need to start with automated testing. It SAVES you from using a plethora of tools and makes them work with each other.

Test automation platforms primarily find their use in complex or large software projects where it’s DIFFICULT or cumbersome to perform manual testing on all the functionality provided by the software.

12.

What is Protractor?

Answer»

Protractor is an open-source automated testing framework that ALLOWS you to perform end-to-end testing of your WEB applications. It’s built on top of WebDriverJS. Protractor is developed by GOOGLE and is especially used for testing Angular applications.

Protractor runs the tests against the web application by running it in REAL web browsers. It also interacts with the application like an end-user would, e.g. clicking buttons, links, filling forms, etc., and verifying the result with the expected outcome.

Since Protractor is based on the Selenium WebDriver, it’s easy to perform cross-browser testing. It provides a simple API compared to Selenium, so the learning curve is not too steep. Developers can quickly get familiar with it and start writing the end-to-end UI tests. You can also take snapshots and compare them USING Protractor. It also allows you to run parallel test cases on different machines.

13.

What is UI testing?

Answer»

The software’s user interface is the only thing that the users SEE, touch and FEEL. They are not concerned about the backend code, database, or the frameworks you used to BUILD the software. Building an application with broken, inconsistent, or annoying user interfaces can be enough to lose customers.

The goal of the UI testing is to ensure that the software uses a consistent user experience and no visual or graphical elements on the screen are broken. An advanced form of UI testing also ENSURES that the user interface is intuitive, prevents common mistakes, and doesn’t get in the way of the users getting their job done.

Typically, UI testing is performed manually by a human tester. With the advancements in the tools and frameworks in automation testing, UI testing is becoming a GOOD candidate for automation.

14.

What are the different components of Selenium?

Answer»

SELENIUM is not a single tool or a framework. It is a suite of TOOLS that work with each other or in isolation to provide different types of AUTOMATION testing. Here are the FOUR major components of Selenium.

  • Selenium WebDriver
    • A collection of open-source APIs and browser-controlling code implementations that provide a concise and straightforward programming interface. 
  • Selenium Grid
    • It enables the tester to run multiple tests across different browsers, machines, and operating systems in parallel. 
  • Selenium IDE
    • Stands for the Integrated Development Environment.
    • It ALLOWS the tester to write, record, run and debug the test cases.
15.

What is Selenium? What are its pros and cons?

Answer»

For any web APPLICATION, browser automation and cross-browser testing are two critical testing activities to ensure that the software works on VARIOUS browsers/devices/platforms. Selenium[2] is a popular web automation tool that helps achieve that. It’s one of the most widely used and popular tools used in automation testing.

Advantages of Selenium:

  • Open SOURCE: It’s developed in open and has excellent COMMUNITY support. The software is updated regularly, ensuring significant problems and bugs are fixed, and new features are getting added constantly. 
  • Cross-Browser: Selenium allows you to run and test your web application in multiple browsers, such as Chrome, Safari, Firefox, ETC
  • Cross-platform: You can use Selenium on Windows, Mac OS, or Linus. This allows testing the platform compatibility of your web application. 
  • Language Agnostic: You can use Selenium in your favorite programming languages, such as Java, C#, Python, Ruby, and many more.

Disadvantages of Selenium:

  • Learning Curve: One of the most common and recurring problems mentioned by new testers is that Selenium is complicated and takes a long time to learn. It requires prior programming knowledge. 
  • No support for desktop/mobile: Selenium only supports web applications. You cannot use it to test your desktop and mobile applications. 
  • No reliable tech support: As it’s open-source software, there’s no dedicated tech support that you can use in case you run into problems.
  • Complicated debugging: It’s tougher to debug Selenium programs than the other tools and frameworks.
16.

Who should be responsible for test automation? Developers or the QA?

Answer»

As a team is supposed to be a single unit responsible for shipping a quality software system, it’s a team’s responsibility to write, execute, and manage test SCRIPTS. That MEANS the developers and the QA should collaborate and use each others’ skills to perform automation testing effectively.

Each team has a different skill set. Some have more technical testers, some have quality-focused developers, and some have testers who came from development backgrounds and vice versa. Hence it’s not a good IDEA to pigeonhole AUTOMATED testing to a particular department. Instead, COLLABORATION and working together is the key to a successful automated testing strategy.

17.

Is automated testing making manual testing obsolete?

Answer»

No. AUTOMATED testing is not making manual testing obsolete. Though automated tests help avoid regression issues or find problems that you are already aware of, manual exploratory testing is essential to find the bugs you don’t know about, such as incorrect REQUIREMENTS or implementations.

Some types of testing, such as exploratory testing, usability, and accessibility testing, NEED to be performed by a human TESTER
Automated testing is only as good as automated tests. If bugs or problems are in the tests themselves, they will provide wrong results, giving false assurance to the stakeholders.

Good automation testing tests repeatable test cases which you can reproduce deterministically. It certainly reduces the amount of manual testing that a human tester would perform but does not ELIMINATE it. Once a human tester discovers a bug, they can add automation tests to ensure that it’s caught automatically in the future.

Previous Next