Assignment 2 Final Exam
Assignment 2 Final Exam
Assignment 2 Final Exam
Assignment -2
1. What is Automation Testing?
Automation Testing Beats Manual Testing.
Automation testing or Test Automation is a process of automating the manual process to test the
application/system under test. Automation testing involves the use of a separate testing tool
which lets you create test scripts which can be executed repeatedly and doesn’t require any
manual intervention
2. Why should Selenium be selected as a test tool?
1. Is a free and open source
2. Have a large user base and helping communities
3. Have cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari etc.)
4. have great platform compatibility (Windows, Mac OS, and Linux etc.)
5. Supports multiple programming languages (Java, C#, Ruby, Python, and Purl etc.)
6. Has fresh and regular repository developments
7. Supports distributed testing
Selenium Remote Control is a testing tool which helps in writing test scripts for web-
based applications in any programming language. It has two parts to it. First is the one
which launches and kills browsers. This server acts as an HTTP proxy server for different
web requests. It also supports different client libraries. Selenium RC is the first tool that
provided support for different programming languages like Java, Ruby, Perl, PHP, etc. In
Selenium it is required to start the Selenium server before the tester starts the execution.
The Selenium server kills the browsers and runs Selenese commands which act as an
HTTP proxy and intercepts messages.
This server acts as a mediator between the code and the browser. The commands are sent
to the server and they interpret the commands which in turn are converted to JavaScript
and this JavaScript is then injected to the browser. Once this is done then the browser can
execute the JavaScript and send the response to the server. The browser now interprets
the command and will return the code in the respective language from which it was
converted. Selenium RC also supports parallel execution of different test cases as it
supports Selenium Grid.
Selenium WebDriver
Web Driver is the extension of Selenium RC. It supports all the latest browsers and
different platforms. There is no need of the Selenium server being started before starting
the execution of different test scripts. Selenium Web driver does not require JavaScripts.
It was developed in order to support dynamic web pages where any elements which will
be present on the page can change without having the page to be reloaded. It provides a
proper designed API that provides improved support for modern web testing applications.
Web driver is created in a way which directly calls the browser by using the native
support for automation.
Selenium server depends on the intention of using the Web driver. If the browser and test
cases are to run on the same machine, then there is no need to run the Selenium server.
Web driver will run directly. You can use Selenium Grid to segregate the tests over
multiple machines and virtual machines. Selenium server would be required when the
tester is connecting remotely or through a particular browser. The web driver interface
declares different methods that can be used for end to end testing. The test class which is
created should be used in the browser-specific implementation. This test class can control
web browser and also select different elements which can be loaded from HTML pages.
The web browser provides APIs which help in remotely controlling the user interface test
web applications
Selenium GRID is a suite that has specialization in running multiple test cases parallel.
These can be different browsers, operating systems, and machines in parallel. It uses the
concept of hub-node. This means that only running the test on a single machine but
executing it on different nodes. This helps in parallel execution and makes GRID
platform-independent. Also, it is not browser-specific and supports all browsers.
There are two versions of Grid. They are Grid 1 and Grid 2. Hub is the central point
where all test cases are to be loaded. There should be only one hub in the grid. There are
be any number of nodes in the grid. Also, nodes can be launched on different platforms
and browsers.
Example of grid:
4. What are the testing types that can be supported by Selenium?
Functional Testing.
Regression Testing.
Sanity Testing.
Smoke Testing.
Responsive Testing.
Cross Browser Testing.
UI testing (black box)
Integration Testing.
6. What is the difference between Selenium IDE, Selenium RC, and WebDriver? (Refer to Q3)
or below table
Selenium RC is
slower than
WebDriver
Selenium IDE is fast
as it doesn't
as it is plugged in with
communicates directly
the web browser that WebDriver communicates directly
with
Speed launches the test. with the web browsers. Thus
the browser; rather it
Thus, the IDE and making it much faster
sends selenese
browser
commands over to
communicates directly
Selenium Core which
in turn communicates
with the browser.
• By ClassName
• By TagName
• By LinkText
• By PartialLinkText
• By CSS Selector
• By DOM
Assert: Assert command checks whether the given condition is true or false. Let’s say we
assert whether the given element is present on the web page or not. If the condition is true then
the program control will execute the next test step but if the condition is false, the execution
would stop and no further test would be executed.
Verify: Verify command also checks whether the given condition is true or false. Irrespective
of the condition being true or false, the program execution doesn’t halt i.e. any failure during
verification would not stop the execution and all the test steps would be executed.
Unit Testing:
The developer carries out unit testing in order to check if the particular module or unit of code is
working fine. The Unit Testing comes at the very basic level as it is carried out as and when the
unit of the code is developed or a particular functionality is built.
Statement Coverage:
In this type of testing the code is executed in such a manner that every statement of the
application is executed at least once. It helps in assuring that all the statements execute without
any side effect.
Branch Coverage:
No software application can be written in a continuous mode of coding, at some point we need to
branch out the code in order to perform a particular functionality. Branch coverage testing helps
in validating of all the branches in the code and making sure that no branching leads to abnormal
behavior of the application.
Security Testing:
Security Testing is carried out in order to find out how well the system can protect itself from
unauthorized access, hacking – cracking, any code damage etc. which deals with the code of
application. This type of testing needs sophisticated testing techniques.
Mutation Testing:
A kind of testing in which, the application is tested for the code that was modified after fixing a
particular bug/defect. It also helps in finding out which code and which strategy of coding can
help in developing the functionality effectively.
Besides all the testing types given above, there are some more types which fall under both Black
box and White box testing strategies such as: Functional testing (which deals with the code in
order to check its functional performance), Incremental integration testing (which deals with the
testing of newly added code in the application), Performance and Load testing (which helps in
finding out how the particular code manages resources and give performance etc.) etc.
14. What is black box testing? What are the different black box testing techniques?
BLACK BOX TESTING is defined as a testing technique in which functionality of the
Application Under Test (AUT) is tested without looking at the internal code structure,
implementation details and knowledge of internal paths of the software. This type of testing is
based entirely on software requirements and specifications. In BlackBox Testing we just focus
on inputs and output of the software system without bothering about internal knowledge of the
software.
Types of blackbox testing:
There are many types of Black Box Testing but the following are the prominent ones -
Functional testing - This black box testing type is related to the functional requirements
of a system; it is done by software testers.
Non-functional testing - This type of black box testing is not related to testing of
specific functionality, but non-functional requirements such as performance, scalability,
usability.
Regression testing - Regression Testing is done after code fixes, upgrades or any other
system maintenance to check the new code has not affected the existing code
Black Box Testing Techniques:
Following are the prominent Test Strategy amongst the many used in Black box Testing
Equivalence Class Testing: It is used to minimize the number of possible test cases to
an optimum level while maintains reasonable test coverage.
Boundary Value Testing: Boundary value testing is focused on the values at boundaries.
This technique determines whether a certain range of values are acceptable by the system
or not. It is very useful in reducing the number of test cases. It is most suitable for the
systems where an input is within certain ranges.
Decision Table Testing: A decision table puts causes and their effects in a matrix. There
is a unique combination in each column.
1. Unit/component/program/module testing
2. Integration testing
3. System testing
4. Acceptance testing
1. Unit/component testing
The most basic type of testing is unit, or component, testing.
Unit testing aims to verify each part of the software by isolating it and then perform tests to
demonstrate that each individual component is correct in terms of fulfilling requirements and the
desired functionality.
This type of testing is performed at the earliest stages of the development process, and in many
cases it is executed by the developers themselves before handing the software over to the testing
team.
The advantage of detecting any errors in the software early in the day is that by doing so the
team minimizes software development risks, as well as time and money wasted in having to go
back and undo fundamental problems in the program once it is nearly completed.
(Must read: 5 best unit testing frameworks to automate unit tests)
2. Integration testing
Integration testing aims to test different parts of the system in combination in order to assess if
they work correctly together. By testing the units in groups, any faults in the way they interact
together can be identified.
There are many ways to test how different components of the system function at their interface;
testers can adopt either a bottom-up or a top-down integration method.
In bottom-up integration testing, testing builds on the results of unit testing by testing higher-
level combination of units (called modules) in successively more complex scenarios.
It is recommended that testers start with this approach first, before applying the top-down
approach which tests higher-level modules first and studies simpler ones later.
3. System testing
The next level of testing is system testing. As the name implies, all the components of the
software are tested as a whole in order to ensure that the overall product meets the requirements
specified.
System testing is a very important step as the software is almost ready to ship and it can be tested
in an environment which is very close to that which the user will experience once it is deployed.
System testing enables testers to ensure that the product meets business requirements, as well as
determine that it runs smoothly within its operating environment. This type of testing is typically
performed by a specialized testing team.
4. Acceptance testing
Finally, acceptance testing is the level in the software testing process where a product is given
the green light or not. The aim of this type of testing is to evaluate whether the system complies
with the end-user requirements and if it is ready for deployment.
The testing team will utilize a variety of methods, such as pre-written scenarios and test cases to
test the software and use the results obtained from these tools to find ways in which the system
can be improved.
The scope of acceptance testing ranges from simply finding spelling mistakes and cosmetic
errors, to uncovering bugs that could cause a major error in the application.
By performing acceptance tests, the testing team can find out how the product will perform when
it is installed on the user’s system. There are also various legal and contractual reasons why
acceptance testing has to be carried out.
17. What is the difference between UAT (User Acceptance Testing) and System testing?
System Testing:
System Testing is done to check whether the software or product meets the specified
requirements or not. It is done by both testers and developers. It contains the Tastings: System
testing, Integration Testing. It is done through more positive and negative teat cases.
Acceptance Testing:
Acceptance Testing is done after the system testing. It is used to check whether the software
meets the customer requirements or not. Acceptance testing is used by testers, stakeholders as
well as clients. It includes only Functional Testing and it contain two testing Alpha
Testing and Beta Testing.
System testing is done before the Acceptance testing is done after the System
5. Acceptance testing. testing.
18. What is the difference between test scenarios, test cases, and test script?
Test Scenarios: A Test Scenario is any functionality that can be tested. It is also called Test
Condition or Test Possibility.
Test Cases: It is a document that contains the steps that has to be executed, it has been planned
earlier.
Test Script: It is written in a programming language and it's a short program used to test part of
functionality of the software system. In other words a written set of steps that should be performed
manually.
20. What all things you should consider before selecting automation tools for the AUT?
Here are some things to consider when selecting an automated testing tool:
1.) Platforms, Technology and Types. Whether you're testing. ...
2.) Tester Skills. ...
3.) Feature-Rich. ...
4.) Manual and Automatic. ...
5.) Change Management. ...
6.) Results Management. ...
7.) Collaboration. ...
8.) Data In, Data Out
Medium: tolerable but not desirable. Company may suffer financially but there is limited
liability or loss of reputation. Should be tested.
Low: tolerable. Little or no external exposure. Little or no financial loss. Company’s reputation
unaffected. Might be tested.
FUNCTIONAL TESTING is a type of software testing that validates the software system
against the functional requirements/specifications. The purpose of Functional tests is to test each
function of the software application, by providing appropriate input, verifying the output against
the Functional requirements.
Functional testing mainly involves black box testing and it is not concerned about the source
code of the application. This testing checks User Interface, APIs, Database, Security,
Client/Server communication and other functionality of the Application Under Test. The testing
can be done either manually or using automation.
The prime objective of Functional testing is checking the functionalities of the software system.
It mainly concentrates on -
Mainline functions: Testing the main functions of an application
Basic Usability: It involves basic usability testing of the system. It checks whether a user
can freely navigate through the screens without any difficulties.
Accessibility: Checks the accessibility of the system for the user
Error Conditions: Usage of testing techniques to check for error conditions. It checks
whether suitable error messages are displayed.
24. Explain the difference between Functional testing and Non-Functional testing.
Functional testing is performed using the Non-Functional testing checks the Performance,
functional specification provided by the client reliability, scalability and other non-functional aspects
and verifies the system against the functional of the software system.
requirements.
Manual Testing or automation tools can be Using tools will be effective for this testing
used for functional testing
Business requirements are the inputs to Performance parameters like speed, scalability are
functional testing inputs to non-functional testing.
Functional testing describes what the product Nonfunctional testing describes how good the product
does works
A build when tested and certified by the test team is given to the customers as “release”. A
“build” can be rejected by test team if any of the tests fail or it does not meet certain
requirements. One release can have several builds associated with it.
26. What are the important points that should be considered while writing Test Cases?
When writing test cases for your project, it’s often easy to forget what is important. This article
is aimed at reminding experienced testers or informing new ones of what the key items are, to
ensure we are being efficient in writing our tests.
The End User is key
Who will be executing the test scripts? Will the scripts form part of a Regression Pack? Will the
scripts be used for anything else (e.g. training manuals)?
These questions are meant to kick start your thought process. Essentially, the person who writes
the test is not always the person who executes it. As such, Test Cases need to be written so that
anyone of any level can read, understand and be able to execute the test case. The aim of this is
that no matter the level of the tester, the outcome will always be the same. When writing your
test, if you approach this with ‘baby-steps’ in mind and make no assumptions that the person
who executes it is has any prior knowledge of the project, and you shouldn’t go far wrong.
Unique, Measurable, Specific (UMS)
Every single test case should be Unique, Measurable and Specific. If you aren’t quite clear what
this means, I’ve defined this below for you.
Unique – There should only be one test with a particular objective in the scenario you are
writing it for.
Measurable – You should be able to say at the end of the test whether it has passed or not.
The objective should be very clear and each Input and Expected Output should marry up
concisely.
Specific – Each test case must be written to test a particular function or action. A good
test case is usually brief and to the point.
Where possible, keep test cases reasonably short. A long number of test steps can add
complexity to the scenario, it can make the tester feel like they’ve been executing the same test
forever and it can affect the accuracy of progress and defect reporting. Break your test scripts
down into smaller scenarios if possible and although this will mean more test cases, they will be
quicker to execute and will produce more accurate statistics of test results.
Data
The inclusion of data in your test steps can be very useful. It saves time and energy sourcing the
test data. It makes test execution more efficient.
Before you do this though, you need to understand a few things. Can the data go out of date? Is a
database refresh likely to occur? If the data is likely to change however it may be easier to create
a database or reference sheet to store your test data in one place. This means that if you need to
change the data, you can do it in one place rather than have to trawl through your test cases to
make the change individually.
Test Case Layout
Test Management tools often cater for the information which should go into a test case by
providing fields for testers to enter the details which need.
Those who have completed their ISTQB Foundation course will know that IEEE829 states that
the following should be included in a Test Case: