Automation Testing Interview Questions: Click Here
Automation Testing Interview Questions: Click Here
Questions
© Copyright by Interviewbit
Contents
Conclusion
33. Conclusion
The primary goal of automated testing is to save time, effort, and money on
repetitive tests that don’t change frequently.
Automation testing helps teams and organizations automate the testing efforts, in
turn reducing the need for human intervention and thus achieving greater speed,
reliability, and efficiency. It also helps speed up the development cycle, as the
developers get quick feedback and can iterate quickly.
1. Unit tests: These are written by so ware developers and test a unit of code in
isolation.
2. Integration tests: These test how well different so ware components work with
each other.
3. Regression tests: Verify that the new code didn't break any existing functionality.
4. Performance tests: Ensure that the so ware won't crash and perform
reasonably under heavy load or stringent conditions.
5. UI tests: Ensure that the so ware uses a consistent user experience and no visual
or graphical elements on the screen are broken.
Here are some criteria based on which one can evaluate these tools.
Programmable (code-based) or code-less tools. Some tools require
programming skills, while some don’t, allowing a non-coder tester to create test
cases with visual assistance. Depending on your team’s experience and skill-set,
you should choose accordingly.
Commercial vs. Open Source. There’s a vast variety in the pricing of the tools
based on the feature they have. Commercial tools can be expensive, but you get
tech support when needed. Open-source so ware is free, but you have to do
your research when troubleshooting the problems.
Ease of use. Some automated testing tools are notoriously hard to use and
require extensive training before providing any value. Some are easy to use, and
you can start using them out-of-box.
Some of the most popular automation tools include Selenium, Katalon Studio, UFT,
TestComplete, Testim, etc., and many more. When choosing one, you should
consider the testing requirements for your project, consult your team, and assess
their skills, experience, and comfort with the tool.
You should also periodically assess the return on investment from the tool you
choose and be prepared to switch if needed.
A test environment enables the tester to create reliable test setups which are
identical whenever a new version of the so ware is released. The test environment
includes the test bed, which is the test data using which the tester will test the
so ware. This data helps the tester to verify test cases that need a particular setup.
Typically, the test environment is an identical copy of the production environment.
Having a duplicate copy allows the tester to reliably reproduce the bugs reported by
the customers and provide the exact steps to the developers to fix them.
Here are some prerequisites for a good test environment:
1. A server with a similar configuration, including the so ware and the hardware to
match a production environment.
2. Sample test data with which to test the so ware.
3. Test database with reasonably realistic data, it can be a copy of an actual
production database.
4. Installed so ware under the test.
The goal of the cross-browser testing is to launch the application on various browsers
running on different operating systems, e.g. Windows, Mac OS, Linux, etc., and verify
that the application works as expected. The tester looks for the design/rendering
issues, the functionality of the application, and device-specific functionality.
Though it can be typically, sophisticated tools exist that allow the testers to
automate cross-browser testing. Some examples include Selenium Box,
BrowserStack, Browsershots, LambdaTest, etc.
GUI testing is very brittle. User interfaces are constantly changing. An enhancement
to the so ware easily breaks up many tests, which need to be updated, causing
additional work for the team. Testing the UI is slow and results in increased build
times. You can perform it on a few machines on which you have the license for the
GUI testing tool.
Hence, the test pyramid argues that you should have more automated unit tests than
through the traditional UI-automation tests. It also has an intermediate layer of
service tests that can provide many benefits of end-to-end UI tests without the
complexities of dealing with the UI frameworks.
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.
Advantages of Selenium:
Open Source: It’s developed in open and has excellent community support. The
so ware 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 so ware, 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.
20. What is UI testing?
The so ware’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 so ware. 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 so ware 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.
21. What is Protractor?
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.
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).
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 so ware. These
libraries communicate with the so ware 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.
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 so ware 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 so ware, 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 so ware, if
developers and testers find themselves spending most of their time
working on the automation framework, automated testing has failed.
29. What is CAPTCHA?
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.
All the so ware 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 so ware 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.
Conclusion
33. Conclusion
So ware testing is an important activity that ensures quality, giving the confidence
to release the so ware to customers. Automation testing is a type of so ware testing
where the tests are automated using tools, scripts, and frameworks, which improves
the efficiency and speed of testing. This article explained automation testing and its
importance in so ware development. It also explained different types of tools used in
automation testing such as Selenium.
However, automation testing is only a single component of a good so ware testing
strategy. Good old exploratory and manual testing conducted by a human tester are
still crucial to shipping a quality so ware product. As a long-term strategy, the best
way to improve the testing process is to test frequently, measure the results, gather
feedback and use it to get better.
References:
Css Interview Questions Laravel Interview Questions Asp Net Interview Questions