Automation_Manual_FM_Solutions_c1ae8e1c-a9ed-42d1-a33c-99c957f2178b
Automation_Manual_FM_Solutions_c1ae8e1c-a9ed-42d1-a33c-99c957f2178b
---------------------------------------------------------------------------------------------------------------------------------------
1. What is Interface?
An Interface is a complete abstract class where all the methods does not have any
implementations/method body.
---------------------------------------------------------------------------------------------------------------------------------------
2. Oops concept?
Inheritance: It is the mechanism in java by which one class is allows inheriting the features (fields and
methods) of another class. Here the class whose features are inherited is known as super class (or a
base class or a parent class) and the class that inherits the other class is known as subclass (or a
derived class, extended class, or Child class). The subclass can add its own fields and methods in
addition to the super class fields and methods. The main advantage of inheritance is reusability.
Polymorphism: Polymorphism in Java is the ability of an object to take many forms. To simply put,
polymorphism in java allows us to perform the same action in many different ways.
There are two different types of polymorphism are there, one is Method overloading or Static
polymorphism and other one is Method overriding or dynamic polymorphism.
Overloading allows different methods to have the same name, but different signatures
where the signature can differ by the number of input parameters or type of input
Parameters or both. Overloading is related to compile-time (or static) polymorphism.
Overriding is a feature that allows a subclass or child class to provide a specific
implementation of a method that is already provided by one of its super-classes or parent
Classes. When a method in a subclass has the same name, same parameters or signature, and same
return type (or sub-type) as a method in its super-class, then the method in the Subclass is said to
override the method in the super-class.
Data abstraction is the process of hiding certain details and showing only essential information to the
user. Abstraction can be achieved with either abstract classes or Interfaces. We can achieve 100%
abstraction by using interfaces.
Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that
binds together code and the data it manipulates. Another way to think about Encapsulation is, it is a
protective shield that prevents the data from being accessed by the code outside this shield, in
encapsulation, the variables or data of a class is hidden from any other class and can be accessed only
through any member function of own class in which they are declared.
---------------------------------------------------------------------------------------------------------------------------------------
Method overloading and method overriding are two different types of polymorphisms in java, where
as overloading allows different methods to have the same name, but different signatures where the
signature can differ by the number of input parameters or type of input parameters or both. Method
overloading is also known as static polymorphism or compile time polymorphism and method
overriding is a feature that allows a subclass or child class to provide a specific implementation of a
method that is already provided by one of its super-classes or parent classes. When a method in a
subclass has the same name, same parameters or signature, and same return type (or sub-type) as a
method in its super-class, then the method in the subclass is said to override the method in the super-
class. Method overriding is also known as Dynamic polymorphism or run time polymorphism.
---------------------------------------------------------------------------------------------------------------------------------------
They may ask on a scale of 10 where as 10 being the best. Answer accordingly.
---------------------------------------------------------------------------------------------------------------------------------------
5. What is abstract class? Can we create an object for abstract class? Give reasons
A class in which all/few methods were abstract then that class is known as abstract class. No we can
not create object for abstract class as it does not have complete implementation.
We can make an abstract class as subclass and in that we can provide implementation for all the
abstract methods and then we can create an object for subclass.
---------------------------------------------------------------------------------------------------------------------------------------
We can declare an empty string and by using string length function we can find the length of the given
input string. By considering these two we can create a for loop and we can reverse the string as
follows,
class ReverseString
{
public static void main(String args[])
{
String original, reverse = "";
Scanner in = new Scanner(System.in);
Output :
Enter a string to reverse
Java programming language
Reverse of the string: egaugnal gnimmargorp avaJ
---------------------------------------------------------------------------------------------------------------------------------------
Static variable in Java is variable which belongs to the class and initialized only once at the start of the
execution. It is a variable which belongs to the class and not to object (instance). It is declared with
the 'static' keyword and are initialized only once, at the start of the execution. They can be accessed
directly by class name without creating object of the class.
---------------------------------------------------------------------------------------------------------------------------------------
Method of a static class can be called by used class name, there is no need to create an object
reference for calling methods of a static class.(https://www.geeksforgeeks.org/static-class-in-java/)
---------------------------------------------------------------------------------------------------------------------------------------
If both static methods are in same class then we can call one method into another method by giving
method name directly. If both static methods are in different class then we can
Call one static method into another by using their classname as reference.
---------------------------------------------------------------------------------------------------------------------------------------
10. How we can access a static method or static class in another class?
We can access a static method or a static class into another class by using the class name where static
method/static variable has declared as reference
---------------------------------------------------------------------------------------------------------------------------------------
11. Suppose there is a base class and Test class, and we want to access the method of base class in a
test class. How we can do that?
By using inheritance concept we can extend base class to test class, so that base class will become
parent/sub class and test class will become child/derived class. Now as both the Classes were related
by inheritance we can access method of base class in test class by creating object of test class.
---------------------------------------------------------------------------------------------------------------------------------------
Inheritance is one of the most important pillars of OOPs concepts. Inheritance can be defined as the
process where one class acquires the properties (methods and variables) of another.
The class which inherits the properties of other is known as subclass (derived class, child class) and
the class whose properties are inherited is known as super class (base class, parent class).'Extends' is
the keyword used to inherit the properties of a class.
Types of Inheritance:
1. Single Inheritance - In single inheritance, subclasses inherit the features of one super class.
Class A extends B
2. Multilevel Inheritance - In Multilevel Inheritance, a derived class will be inheriting a base class and
as well as the derived class also act as the base class to other class.
Class A extends B
Class B extends C
3. Hierarchical Inheritance - In Hierarchical Inheritance, one class serves as a super class (base class)
for more than one subclass.
Class B extends A
Class C extends A
Class D extends A
4. Hybrid Inheritance (Through Interfaces) - It is a mix of two or more of the above types of
inheritance. Since java doesn’t support multiple inheritances with classes, hybrid inheritance is also
not possible with classes.
Class B extends A
Class C extends A
Class D extends C
5. Multiple Inheritances (Through Interfaces) - In Multiple inheritances, one class can have more than
one super class and inherit features from all parent classes. Java does not support multiple
inheritances through classes.
Java does not support multiple inheritance is to prevent ambiguity. Onsider a case where class B
extends class A and Class C and both class A and C have the same method display ().
Now java compiler cannot decide which display method it should inherit. To prevent such situation,
multiple inheritance is not allowed in java.
---------------------------------------------------------------------------------------------------------------------------------------
The "diamond problem" (sometimes referred to as the "Deadly Diamond of Death") is an ambiguity
that arises when two classes B and C inherit from A, and class D inherits from both B and C.
We can resolve this by using interfaces and default methods.
---------------------------------------------------------------------------------------------------------------------------------------
Abstraction is a process of hiding the implementation details and showing only functionality to the
user. In another way, it shows only essential things to the user and hides the internal details. It lets
you focus on what the object does instead of how it does it. There are two ways to achieve
abstraction in java one is thru Abstract class (0 to 100% is possible) and other one is thru Interface
(100% abstraction is possible).An abstract class must be declared with an 'abstract' keyword, it can
have abstract and non-abstract methods and it cannot be instantiated. It can have constructors and
static methods also. It can have final methods which will force the subclass not to change the body of
the method.
---------------------------------------------------------------------------------------------------------------------------------------
Polymorphism in Java is the ability of an object to take many forms. To simply put, polymorphism in
java allows us to perform the same action in many different ways.
There are two different types of polymorphism are there, one is Method overloading or Static
polymorphism and other one is Method overriding or dynamic polymorphism.
Overloading allows different methods to have the same name, but different signatures
where the signature can differ by the number of input parameters or type of input
Parameters or both. Overloading is related to compile-time (or static) polymorphism.
Overriding is a feature that allows a subclass or child class to provide a specific
implementation of a method that is already provided by one of its super-classes or parent
Classes. When a method in a subclass has the same name, same parameters or signature, and same
return type(or sub-type) as a method in its super-class, then the method in the
Subclass is said to override the method in the super-class.
---------------------------------------------------------------------------------------------------------------------------------------
Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds
together code and the data it manipulates. Another way to think about Encapsulation is, it is a
protective shield that prevents the data from being accessed by the code outside this shield, in
encapsulation, the variables or data of a class is hidden from any other class and can be accessed only
through any member function of own class in which they are declared.
---------------------------------------------------------------------------------------------------------------------------------------
Access Modifiers/Access Specifiers are the entities provided by java hat help us to restrict the scope
or visibility of a package, class, constructor, methods, variables, or other data members. Java provides
four types of access modifiers or visibility specifiers i.e. default, public, private, and protected.
Default: When no access modifier is specified for a class, method, or data member – It is said to be
having the default access modifier by default. The data members, class or Methods which are not
declared using any access modifiers i.e. having default access modifier are accessible only within the
same package.
Private: The private access modifier is specified using the keyword private. The methods or data
members declared as private are accessible only within the class in which they are declared.
Protected: The protected access modifier is specified using the keyword protected. The methods or
data members declared as protected are accessible within the same package or subclasses in different
packages.
Public: The public access modifier is specified using the keyword public. The public access modifier has
the widest scope among all other access modifiers. Classes, methods, or data members that are
declared as public are accessible from everywhere in the program. There is no restriction on the scope
of public data members
---------------------------------------------------------------------------------------------------------------------------------------
The Collection in Java is a framework that provides architecture to store and manipulate the group of
objects. Java Collections can achieve all the operations that you perform on a data such as searching,
sorting, insertion, manipulation, and deletion. In collections we have 3 different interfaces; they are
List, set and Queue. List interface has been implemented as array List, Linked List, Vector and Stack.
Set has been implemented as Hashset and linkedHashset.Queue has been implemented as Priority
Queue. In List type we can store ordered collection of objects and it can have duplicate
items.ArrayList class implements the List interface. It uses a dynamic array to store the duplicate
element of different data types.
The ArrayList class maintains the insertion order and is non synchronized. The elements stored in the
ArrayList class can be randomly accessed.
Linked List implements the Collection interface. It uses a doubly linked list internally to store the
elements. It can store the duplicate elements. It maintains the insertion order
And is not synchronized. In Linked List, the manipulation is fast because no shifting is required. Vector
uses a dynamic array to store the data elements. It is similar to ArrayList.
However, it is synchronized and contains many methods that are not the part of Collection
framework. The stack is the subclass of Vector. It implements the last-in-first-out data
Structure, i.e., Stack. The stack contains all of the methods of Vector class and also provides its
methods like Boolean push (), Boolean peek (), Boolean push (object o), which defines
Its properties. Set is an interface which extends collection interface. It represents the unordered set of
elements which doesn't allow us to store the duplicate items. We can store at
Most one null value in Set. Set is implemented by HashSet, LinkedHashSet, and TreeSet.HashSet class
implements Set Interface. It represents the collection that uses a hash table for
Storage. Hashing is used to store the elements in the HashSet. It contains unique items.HashMap
stores the data in (Key, Value) pairs and you can access them by an index of another
type (e.g. an Integer).One object is used as a key (index) to another object (value). If you try to insert
the duplicate key, it will replace the element of the corresponding key.
---------------------------------------------------------------------------------------------------------------------------------------
JDK is a software development kit whereas JRE is a software bundle that allows Java program to run,
whereas JVM is an environment for executing byte code.
The full form of JDK is Java Development Kit, while the full form of JRE is Java Runtime Environment,
while the full form of JVM is Java Virtual Machine.JVM is the heart of Java programming language and
provides platform independence.
---------------------------------------------------------------------------------------------------------------------------------------
A variable is a container which holds the value while the Java program is executed. A variable is
assigned with a data type. Variable is a name of memory location.
There are three types of variables in java: local, instance and static.
Local Variables: Variables that are declared inside methods are called as Local variables. These are
created when the method is entered and the variable will be destroyed once it Exits the method.
These are visible only within the declared method.
Instance Variables: Variables that are declared inside class but outside method are referred as
Instance variables. These are created when an object is created with the use of the keyword 'new' and
destroyed when the object is destroyed. The instance variables are visible for all methods in the class.
Static Variables: Class variables also known as static variables that are declared with the static
keyword in a class, but outside a method. Static variables are created when the program starts and
destroyed when the program stops.
---------------------------------------------------------------------------------------------------------------------------------------
Protected keyword in Java refers to one of its access modifiers. Protected means that the member
can be accessed by any class in the same package and by subclasses even if they are in another
packages.
In Java, static keyword is mainly used for memory management. It can be used with variables,
methods, blocks and nested classes. It is a keyword which is used to share the same variable or
method of a given class. Basically, static is used for a constant variable or a method that is same for
every instance of a class. There is no need to create class object to access static variable/methods. We
can directly access them by taking class name as reference.
---------------------------------------------------------------------------------------------------------------------------------------
Static variable in Java is variable which belongs to the class and initialized only once at the start of the
execution. It is a variable which belongs to the class and not to object (instance). Static variables are
initialized only once, at the start of the execution.
---------------------------------------------------------------------------------------------------------------------------------------
In Java, the final keyword is used to denote constants means that the value can't be modified in the
future. It can be used with variables, methods, and classes. Once any entity (variable, method or class)
is declared final, it can be assigned only once.
---------------------------------------------------------------------------------------------------------------------------------------
The string is Immutable in Java because String objects are cached in the String pool. Since cached
String literals are shared between multiple clients there is always a risk, where one client's action
would affect all another client. For example, if one client changes the value of the String "Test" to
"TEST", all other clients will also see that value as Explained in the first example. Since caching of
String objects was important from performance reason this risk was avoided by making String class
Immutable
---------------------------------------------------------------------------------------------------------------------------------------
The Exception Handling in Java is one of the powerful mechanisms to handle the runtime errors so
that the normal flow of the application can be maintained. Suppose there are 10 statements in a Java
program and an exception occurs at statement 5; the rest of the code will not be executed, i.e.,
statements 6 to 10 will not be executed. However, when we perform exception handling, the rest of
the statements will be executed. In java we can use try catch blocks to handle exceptions. The "try"
keyword is used to specify a block where we should place an exception code. It means we can't use
try block alone. The try block must be followed by either catch or finally. The "catch" block is used to
handle the exception. It must be preceded by try block which means we can't use catch block alone. It
can be followed by finally block later. The "finally" block is used to execute the necessary code of the
program. It is executed whether an exception is handled or not.
Multithreading enables us to run multiple threads concurrently. For example in a web browser, we
can have one thread which handles the user interface, and in parallel we can have another thread
which fetches the data to be displayed. So multithreading improves the responsiveness of a system.
The current exception-handling implementation is safe for multithreading; exceptions in one thread
do not interfere with exceptions in other threads. However, you cannot use exceptions to
communicate across threads; an exception thrown from one thread cannot be caught in another.
---------------------------------------------------------------------------------------------------------------------------------------
28.WAP for Given a string, return true if the first instance of "x" in the string is immediately followed
by another "x".
boolean doubleX(String str) {
int len = str.length();
for(int i =0;i<len-1;i++)
{
if(str.substring(i,i+2).equals("xx"))
return true;
}
return false;
}
---------------------------------------------------------------------------------------------------------------------------------------
A collection represents a group of objects, known as its elements. Some collections allow duplicate
elements and others do not. Some are ordered and others are unordered.
---------------------------------------------------------------------------------------------------------------------------------------
Though both Hashtable and HashMap are data-structure based upon hashing and implementation of
Map interface, the main difference between them is that HashMap is not thread-safe
But Hash table is thread-safe. Another difference is HashMap allows one null key and null values but
Hashtable doesn't allow null key or values.
---------------------------------------------------------------------------------------------------------------------------------------
31.WAP to check the occurrence of 10 and 20 in an array. Return true if occurrence of 10 is greater
than 20.
public class Occuranceof10and20 {
output :
false
---------------------------------------------------------------------------------------------------------------------------------------
output :
Enter a string to reverse
Automation
Reverse of the string: noitamotuA
---------------------------------------------------------------------------------------------------------------------------------------
Answer accordingly.
---------------------------------------------------------------------------------------------------------------------------------------
A CI/CD pipeline automates your software delivery process. The pipeline builds code, runs tests (CI),
and safely deploys a new version of the application (CD). Automated pipelines remove manual errors,
provide standardized feedback loops to developers, and enable fast product iterations. Continuous
Integration (CI) allows you to continuously integrate code into a single shared and easy to access
repository. CI/CD creates a fast and effective process of getting your product to market before your
competition as well as releasing new features and bug fixes to keep your current customers happy.
---------------------------------------------------------------------------------------------------------------------------------------
output :
Enter a number till which you want to print Fibonacci series
10
Fibonacci series till 10 are
0
1
1
2
3
5
8
13
21
34
55
89
---------------------------------------------------------------------------------------------------------------------------------------
Ouput :
Enter a number to be checked whether it is a palindrome or not
232
palindrome number
Enter a number to be checked whether it is a palindorme or not
133
not palindrome
---------------------------------------------------------------------------------------------------------------------------------------
Output:
Enter any number:
24
24 is not a Prime Number
Enter any number:
37
37 is a Prime Number
---------------------------------------------------------------------------------------------------------------------------------------
Output :
Enter any number to get its factorial
5
Factorial of 5 is: 120
Enter any number to get its factorial
15
Factorial of 15 is: 2004310016
}
}
Output :
*
**
***
****
*****
---------------------------------------------------------------------------------------------------------------------------------------
Output :
*
**
***
****
*****
******
---------------------------------------------------------------------------------------------------------------------------------------
41.WAP to print pyramid star pattern
output :
*
**
***
****
*****
******
---------------------------------------------------------------------------------------------------------------------------------------
I have worked on the Application Denso Diagnostic tool. It is used to diagnose the vehicle ECU
condition and trouble codes that were produced during glitches raised in vehicles such
as Cars, Buses and Trucks which were manufactured by Ashok Leyland and Nissan. The Technicians or
the user needs to logon to the web or desktop application after connecting the
Vehicles OBD to the Laptop/Tablet and then Diagnose the vehicle condition as per the flow according
to the DTCs (Trouble codes) detected. The process can be performed remotely as well.
The features included in the tool were
• Generic Vehicular Feature
• Session Management
• User Profile
• DTC monitoring
• Data Recording
• Report Generation
• Vehicle Detection and Identification
• Authentication and License Validation
For automation we have used Data driven testing framework and selenium along with Java was used
for scripting purpose.We have used GIT repository to maintain the project code and TestNG
unit testing framework was used for better representation and report generation. For bug reporting
and tracking purpose we used JIRA.
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
I have hands-on Experience on Selenium Web driver and I have knowledge on remaining selenium
components as well such as Selenium IDE, Selenium Grid and Selenium RC.
---------------------------------------------------------------------------------------------------------------------------------------
A framework is a set of guidelines like coding standards, test-data handling, and object repository
treatment etc.which when followed during automation scripting produces beneficial
Outcomes like increased code re-usage, higher portability, Improved Test efficiency, reduced script
maintenance cost etc.These are just guidelines and not rules, they are not mandatory
And you can still script without following the guidelines. To create a framework first we need to
select type of framework which we are going to use whether it is keyword driven,
Data driven or hybrid framework. and then on prerequisites that are required for building an
automation framework like Property files in which we can store constants like
application url, chromedriverpath, Excel test data file path and file name and also excel sheet names
and report folders names and screenshot path etc.,a separate folder for storing
our test cases and Utilities in which we can store all our data in Excel utilities and common utilities.
Logs folder for logging purpose and screenshot folder for storing Screenshots
if taken any during execution of the script. Report folder for storing all the reports which were
generated after executing the script.
---------------------------------------------------------------------------------------------------------------------------------------
5. How will you write selenium script for a login page and verify that it’s a correct homepage after
successful login.
First of all we need to create an web driver instance and then by using driver object reference we
need to navigate to the required webpage by providing the url as parameter
to the get command and the locate the username and password by using any of the available locators
preferably xpath and then pass the values for username and password by using
sendkeys method. Then locate Login button by using any of the locators and perform click action.
Once we logged on try to get the page title by using get Title() method and compare
it with actual page title, if both expected and actual titles match then we have logged onto correct
homepage or else we haven't.
If they have asked to write code then you can write the following script,
if(actualTitle.equals(expectedTitle))
syso("Valid homepage has been launched");
else
syso("Invalid homepage");
driver.close();
---------------------------------------------------------------------------------------------------------------------------------------
TestNG is a unit testing framework having multiple classes’ interfaces and methods which will make
tester task easy. Few advantages of testNG are Default reporting, annotations, supports data driven
testing, support for parameters, Easyway to execute test suite, Grouping and many more.
Annotations available in TestNG are
@Test: this will make a java method as a test case,
@Before Method: This will be executed before every @test annotated method.
@After Method: This will be executed after every @test annotated method.
@Before Class: This will be executed before first @Test method execution. It will be executed one
only time throughout the test case.
@After Class: This will be executed after all test methods in the current class have been run
@Before Test: This will be executed before the first @Test annotated method. It can be executed
multiple times before the test case.
@After Test: A method with this annotation will be executed when all @Test annotated methods
complete the execution of those classes inside the <test> tag in the TestNG.xml file.
@Before Suite: It will run only once, before all tests in the suite are executed.
@After Suite: A method with this annotation will run once after the execution of all tests in the suite
is complete.
@Before Groups: This method will run before the first test run of that specific group.
@After Groups: This method will run after all test methods of that group complete their execution
---------------------------------------------------------------------------------------------------------------------------------------
7. How will you pass parameters for a test using TestNG? Name the methods.
We can add @parameter annotation to the method for which we want to pass parameters. Then in
xml file we will add parameter inside method tag and its values as follows,
<parameter name = "variable name" value="value"/>
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
TestNG. Xml file is a configuration file that helps in organizing our tests. It allows testers to create and
handle multiple test classes, define test suites and tests.
We can create xml file by right clicking on the project and click on the Convert to TestNG-->click on
finish button on the window appeared.
The format of testng.xml includes suitename, test name, classes tag, and parallel execution command
if any, include and exclude tags which were used to include/exclude any tests respectively.
---------------------------------------------------------------------------------------------------------------------------------------
10. How will you handle the pop-up appearing with username/password? (Or) How do you handle
alerts in selenium?
We have Alert interface in selenium which provide few methods like dismiss(), accept(), getText(),
send Keys() to handle popups . By using switchTo () method we can switch to the pop up and
And by using send keys method we can send we can send username and password.
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
By using different types of locators which are available in selenium we can locate any element in
DOM. Available locators are className,name,xpath(Absolute,Relative),CSS selector,
ID,tagName,linkText, partialLinkText.
---------------------------------------------------------------------------------------------------------------------------------------
13.Tell me about the Xpath types and different ways to write Xpath
XPath is an XML path used for navigation through the HTML structure of the page. It is syntax for
finding any element on a web page using XML path expression.
We have two types of xpath, one is Absolute xpath and other is Relative xpath. Absolute xpath is the
direct way to find the element which starts from the starting node but the disadvantage of the
absolute XPath is that if there are any changes made in the path of the element then that XPath gets
failed. So to overcome this disadvantage we can use
Relative xpath starts from the middle of HTML DOM structure. It starts with double forward slash (//).
It can search elements anywhere on the webpage, means no need to write a long xpath and you can
start from the middle of HTML DOM structure. Relative Xpath is always preferred as it is not a
complete path from the root element.
We can write xpaths by using different methods, by using basic xpath as Xpath=//input[@name='uid']
and by using contains() method as Xpath=//*[contains(@type,'sub')],
By using and/or method as Xpath=//*[@type='submit' or @name='btnReset'], In OR expression, two
conditions are used, whether 1st condition OR 2nd condition should be true.
It is also applicable if any one condition is true or maybe both. Means any one condition should be
true to find the element.
---------------------------------------------------------------------------------------------------------------------------------------
Page object model is a design pattern in selenium that creates an object repository for storing all web
elements. It is useful in reducing code duplication and improves test case maintenance. In Page
Object Model, we will consider each web page of an application as a class file.
---------------------------------------------------------------------------------------------------------------------------------------
Basically axes represent a relationship to the context (current) node, and are used to locate nodes
relative to that node on the tree. By using xpath axes we can locate the child Elements, ancestor,
parent, preceding, sibling elements.
---------------------------------------------------------------------------------------------------------------------------------------
Asserts are basically validations or checkpoints for an application. By using assertions we can define
whether an application is working as expected or not.
We have two types of Assertions Hard Assertions and Soft assertions (Verify method).
Hard Assertions are ones in which test execution is aborted if the test does not meet the assertion
Condition. The test case is marked as failed. In case of an assertion error, it will throw the exception.
We have different types of assertion method available in hard assertions like
assertEquals() is a method that takes a minimum of 2 arguments and compares actual results with
expected results. If both match, then the assertion is passed and the test case is marked as passed.
assertEquals() can compare Strings, Integers, Doubles and many more variables
assertNotEquals() is a method that does the opposite of the assert Equals() method. In this case, the
method compares the actual and expected result.
But if the assertion condition is met if the two are not identical. If actual and expected results are not
the same.
assertTrue(): This Assertion verifies the Boolean value returned by the condition. If the Boolean value
is true, then the assertion passes the test case.
assert False(): This method works opposite of that of assertTrue(). The Assertion verifies the Boolean
value returned by the condition.
If the Boolean value is false, then the assertion passes the test case.
assertNull(): This method verifies if the expected output is null. If not, the value returned is false.
assertNotNull(): This method works opposite to that of the assert Null() method. The assertion
condition is met when the method validates the expected output to be not null.
In soft assertions the Test execution will continue till the end of the test case even if asserts condition
is not met means failed. Verify or Soft Asserts will report the errors at the end of the test.
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Yes. Selenium Web driver is an open-source collection of APIs which is used for testing web
applications. The Selenium Web driver tool is used for automating web application testing
to verify that it works as expected or not. It mainly supports browsers like Firefox, Chrome, Safari and
Internet Explorer. It also permits you to execute cross-browser testing.
WebDriver also enables you to use a programming language in creating your test scripts Selenium
WebDriver allows you to choose a programming language to create test scripts.
Available programming languages are, java,python,C#,ruby,.net,PHP.
---------------------------------------------------------------------------------------------------------------------------------------
20.Write a script to login gmail using selenium webdriver.
System.setProperty("webdriver.chrome.driver", "D:\\chromedriver_win32\\
chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.gmail.com");
driver.manage().window().maximize();
driver.findElement(By.xpath("mention xpath of usernme
here")).sendKeys("usernamevalue");
driver.findElement(By.xpath("menton xpath of password
here")).sendKeys("passwordvalue");
driver.findElement(By.xpath("mention xpath of login button")).click();
---------------------------------------------------------------------------------------------------------------------------------------
Breakpoints are used to tell the Selenium IDE where to pass the test or stop the execution of the test
script. This is done to verify that your code is working as expected or not. Breakpoints, in other words,
helps in debugging the test script. To define a breakpoint in your source code, right-click in the left
margin in the Java editor and select Toggle Breakpoint. Alternatively, you can double-click on this
position where we need to give breakpoints.
---------------------------------------------------------------------------------------------------------------------------------------
22. Give me an example of one selenium IDE process?
Selenium IDE is primarily a record/run tool that a test case developer uses to develop Selenium Test
cases. Selenium IDE is an easy-to-use tool from the Selenium Test Suite and can even be used by
someone new to developing automated test cases for their web applications. First of all we need to
launch Selenium IDE and then click on Record button available on Tool bar then open the required
website and perform the actions that you were mentioned in Test steps to record and stop the
recording once you are done with all the test steps. Then save the recording and play back.
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
24. What language we use for Selenium IDE?
---------------------------------------------------------------------------------------------------------------------------------------
25.If sendkeys() methods are not working then how we will write in a text box.
By using Java Script executor we can write data into the text box. Selenium executes JavaScript
commands with the help of the execute Script method.
The JavaScript command to be run is passed as parameter to the method.
Syntax :
JavascriptExecutor j = (JavascriptExecutor)driver;
j.executeScript ("document.getElementById('gsc-i-id1').value='Selenium'");
---------------------------------------------------------------------------------------------------------------------------------------
Selenium WebDriver is a browser automation framework that accepts commands and sends them to
a browser. It is implemented through a browser-specific driver. It controls the Browser by directly
communicating with it, for each Selenium command, a HTTP request is created and sent to the
browser driver. The browser driver uses a HTTP server for getting the HTTP requests; the HTTP server
determines the steps needed for implementing the Selenium command. the implementation steps
are executed on the browser
---------------------------------------------------------------------------------------------------------------------------------------
TestNg provides an option to include or exclude Groups, Test Methods, Classes and Packages using
include and exclude tags by defining in testng. xml.
---------------------------------------------------------------------------------------------------------------------------------------
Broken links are links or URLs that are not reachable. They may be down or not functioning due to
some server error. For checking the broken links first we need to collect all the links in the webpage
with <a> tag and then Send HTTP request for the link and read HTTP response code , find out whether
the link is valid or broken based on HTTP response code.
Repeat this for all the links captured.Responsecode for valid link is 2xx and invalid is 4xx or 5xx.
---------------------------------------------------------------------------------------------------------------------------------------
We have few methods in selenium which helps us to switch among multiple windows, they are
get.windowhandle(),this method helps to get the window handle of the current window.
next method is get.windowhandles(), this method helps to get the handles of all the windows opened
---------------------------------------------------------------------------------------------------------------------------------------
Selenium provides three different waits they are, implicit wait, explicit wait and fluent wait. The
Implicit Wait in Selenium is used to tell the web driver to wait for a certain amount of time before it
throws a "No Such Element Exception". The default setting is 0. Once we set the time, the web driver
will wait for the element for that time before throwing an exception.
Implicit Wait syntax:
driver. Manage().timeouts().implicitly Wait(Timeout, TimeUnit.SECONDS);
The Explicit Wait in Selenium is used to tell the Web Driver to wait for certain conditions (Expected
Conditions) or maximum time exceeded before throwing "ElementNotVisibleException" exception. It
is an intelligent kind of wait, but it can be applied only for specified elements. It gives better options
than implicit wait as it waits for dynamically loaded elements.
Explicit Wait syntax:
WebDriverWait wait = new WebDriverWait(WebDriverRefrence,TimeOut);
The Fluent Wait in Selenium is used to define maximum time for the web driver to wait for a
condition, as well as the frequency with which we want to check the condition before throwing an
"ElementNotVisibleException" exception. It checks for the web element at regular intervals until the
object is found or timeout happens.
Fluent Wait syntax:
Wait wait = new FluentWait(WebDriver reference)
.withTimeout(timeout, SECONDS)
.pollingEvery(timeout, SECONDS)
.ignoring(Exception.class);
---------------------------------------------------------------------------------------------------------------------------------------
Browser drivers play a significant role in the Selenium WebDriver Architecture. We know that
Selenium runs in multiple browsers. Browser drivers help to run selenium scripts on the browser.
They act as a bridge that interprets the selenium commands to execute it in the browser. Without
that, it is not possible to execute Selenium test scripts in browsers as well as automate any web
application.
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Synchronization means when two or more components involved to perform any action, we expect
these components to work together with the same pace. The co-ordination between these
Components to run parallel are called Synchronization.
---------------------------------------------------------------------------------------------------------------------------------------
34. Why we use appium?
Appium is the most popular open-source framework for mobile app automation testing. It allows us
to automate tests for popular mobile platforms like Android, iOS, and Windows.
---------------------------------------------------------------------------------------------------------------------------------------
When the script is not developed to handle certain alert and the same has appeared while executing
the script then selenium will throw unexpected alert exception.
---------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
37. If alert which you are trying to handle is not there then what exception will occur, if alert is there
but not handled what exception you get?
If Alert which was handled in the script has not accured in the browser while executing then selenium
will throw NoAlertFoundException and if alert was occurred in the application while executing the
code but was not handles then selenium will throw UnexpectedAlertException.
---------------------------------------------------------------------------------------------------------------------------------------
Listener is defined as interface that modifies the default TestNG's behavior. As the name suggests
Listeners "listen" to the event defined in the selenium script and behave accordingly.
It is used in selenium by implementing Listeners Interface. It allows customizing TestNG reports or
logs. There are many types of TestNG listeners available. ITestListener is one of those available
listeners. It has few methods such as,
OnStart- On Start method is called when any Test starts.
OnTestSuccess- onTestSuccess method is called on the success of any Test.
OnTestFailure- onTestFailure method is called on the failure of any Test.
OnTestSkipped- onTestSkipped method is called on skipped of any Test.
OnTestFailedButWithinSuccessPercentage- method is called each time Test fails but is within success
percentage.
On Finish- on Finish method is called after all Tests are executed.
---------------------------------------------------------------------------------------------------------------------------------------
39. What is Absolute xpath vs relative xpath?
Absolute Xpath: It uses complete path from the Root Element to the desire element.
Relative Xpath: You can simply start by referencing the element you want and go from there.
Relative Xpaths are always preferred as they are not the complete paths from the root element so
when any of the element o DOM has been changed or modified or deleted it does not
Effect the script.
syntax for Basic xpath is : Xpath=//tagname[@attribute='value'], where
// represents Select current node.
Tagname represents Tagname of the particular node.
@ Represents Select attribute.
Attribute represents Attribute name of the node.
Value represents Value of the attribute.
---------------------------------------------------------------------------------------------------------------------------------------
40. What is the difference between FindElement vs FindElements?
FindElement method is used to access a single web element on a page. It returns the first matching
element. It throws a NoSuchElementException exception when it fails to find If the element whereas
find Elements method returns the list of all matching elements. The findElement method throws a
NoSuchElementException exception when the element is not available on the page. Whereas, the find
Elements method returns an empty list when the element is not available or doesn’t exist on the
page. It doesn’t throw NoSuchElementException.
---------------------------------------------------------------------------------------------------------------------------------------
41. What is the difference between Assert vs. Verify?
In the case of assertions, if the assert condition is not met; test case execution will be aborted. In case
of verify, tests will continue to run until the last test is executed even if assert conditions are not met.
---------------------------------------------------------------------------------------------------------------------------------------
Files uploading in Selenium can be done with the below methods, one is by using send Keys method
and by using AutoIT tool and with the help of Robot Class.
The most basic way of uploading files in Selenium is using the sendKeys method. It is an inbuilt feature
for file upload in Selenium.
The syntax is as below:
WebElement upload file = driver.findElement(By.xpath("//input[@id='file_up']"));
upload_file.sendKeys("C:/Users/Sonali/Desktop/upload.png");
AutoIT is a open source tool which can be integrated in selenium to upload files.
By using robot class also we can upload file, first we have to create an object of robot class and then
by using the robot class object and few available methods in the robot class
we can upload files.
For example,
// creating object of Robot class
Robot rb = new Robot();
---------------------------------------------------------------------------------------------------------------------------------------
When you upload a file on web page, there is text box hidden in an application which stores the file
path that you select from your local machine and when you execute send keys() command to enter
file path into that hidden text box, selenium might throw ElementNotInteractableException. To
overcome this we can use JavaScript Executor to upload files.
Before executing sendkeys () method, make that hidden text box visible using JavaScript Executor.
For example,
WebElement element = driver.findElement(locator);
JavascriptExecutor js = (JavascriptExecutor) driver;
// Setting value for "style" attribute to make textbox visible
js.executeScript("arguments[0].style.display='block';", element);
driver.findElement(locator).sendKeys("D:\\testImage.png");
Above code will make the hidden text box visible for selenium and then sendkeys() command will
enter the file path into that text box.
---------------------------------------------------------------------------------------------------------------------------------------
44. How to enter data to login page 10 times from excel sheet?
There are various libraries in JAVA which helps in reading/writing data from Excel files. But, Apache
POI is one of the most used libraries, which provides various classes and methods to read/write data
from various formats of Excel files (xls, xlsx etc).Apache POI, where POI stands for (Poor Obfuscation
Implementation) is an API that offers a collection of Java libraries that helps us to read, write, and
manipulate different Microsoft files such as excel sheets, power-point, and word files. By using
methods available in apache POI we can read data from excel to the Login page.
For Example,
File file = new File ("E:\\TestData\\TestData.xls");
---------------------------------------------------------------------------------------------------------------------------------------
45. How to enter one particular value from Excel sheet in text box?
By using getSheet, getRow,getCell methods available in apache POI we can navigate to a particular
row and column of the cell from which we want to fetch the data and then we read the data by using
getString method.
---------------------------------------------------------------------------------------------------------------------------------------
46.If you have a webpage, where you need to type a name or display a name, how will you automate
that, starting from opening the browser, giving the link, writing/reading the name, mention every line
of the code?
System.setProperty("webdriver.chrome.driver", "D:\\chromedriver_win32\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("Website link goes here");
driver.manage().window().maximize();
String Name = driver.findElement(By.xpath("give xpath from where you need to read the
name")).getText();
driver.findElement(By.xpath("give the xpath of the text box for which you want to write
name")).sendKeys("name value");
driver.close();
---------------------------------------------------------------------------------------------------------------------------------------
47. If you have 3 links in the web page , you have to click on every link and go to next window, come
back to click on next link, how will you automate mention every line of the code?
driver.manage().window().maximize();
Set<String>s=driver.getWindowHandles();
while(I1.hasNext())
{
String child window=I1.next();
if(!parent.equals(child_window))
{
driver.switchTo().window(child_window);
System.out.println(driver.switchTo().window(child_window).getTitle());
---------------------------------------------------------------------------------------------------------------------------------------
48.If you have a drop down in a page, you have to select one and go to next page, how will you
automate mention every line of the code
System.setProperty("webdriver.gecko.driver","C:\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("URL of the application goes here");
Select drpCountry = new Select(driver.findElement(By.name("country")));
drpCountry.selectByVisibleText("value in the drop down goes here");
String parent=driver.getWindowHandle();
Set<String>s=driver.getWindowHandles();
Iterator<String> I1= s.iterator();
while(I1.hasNext())
{
String child_window=I1.next();
if(!parent.equals(child_window))
{
driver.switchTo().window(child_window);
System.out.println(driver.switchTo().window(child_window)
}
driver.close();
49. If you have to check an element in displayed or not in a webpage, how will you automate mention
every line of the code
We can use isdisplayed () method to check whether an element is present in a webpage or not.
System.setProperty("webdriver.gecko.driver","C:\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("URL of the application goes here");
Webelement ele = driver.findElement(By.xpath("Xpath of the element which needs to be validated
whether it is displayed or not goes here"));
Boolean result = ele.isDisplayed();
if(isDisplayed)
syso("Element got displayed);
else
syso("Emenet not displayed");
driver.close();
---------------------------------------------------------------------------------------------------------------------------------------
We can run selenium scripts in many ways. We can give right click on the class where we have added
our script and click on run or by using testng.xml also we can run our scripts in selenium.
---------------------------------------------------------------------------------------------------------------------------------------
We will add all the smoke test cases in one suite let's say Smoke and we can execute the whole suite
so that all test cases will run at once and give the result and report accordingly.
---------------------------------------------------------------------------------------------------------------------------------------
52. How will extract reports in Testng
The TestNG will generate the default report. When you execute testng. xml file, and refresh the
project. You will get test-output folder in that folder for reporting in TestNG.
Right click on the emailable-report, html and select the option and Open with the web browser.
---------------------------------------------------------------------------------------------------------------------------------------
There were few challenges that I have faced in automation such as Captcha reading, OTP handling,
Identifying dynamically loading elements, Timeout and sync issues.
---------------------------------------------------------------------------------------------------------------------------------------
I have worked on Selenium web driver along with TestNG and Apache POI libraries’ so far.
1. Tell me about the end to end testing process that you follow in current project/earlier project.
First explain about your project briefly and then tell them which Testing model you have followed
whether it is waterfall, V&v model or Agile model. Then explain about the pre-requisites you have
chosen like FW, Scripting Language, Automation tool, and Third party tools if any used. How planning
went and Test case creation, Test case development. After receiving the build how you did
smoke/sanity testing and once build got passed for smoke/sanity how you executed test cases and
report generation. Explain them what you have done if you found any bugs and which bug tracking
tool you have used like JIRA,TFS etc.,Once bug got fixed what have you done. Explain them about
regression testing if you have done any.
Explain them briefly about you project and then tell them about your roles and responsibilities.
3. Which test management tool you had worked and how you used it?
I have used JIRA as a test management Tool, We used to create bugs if found any and used to track
the status of the bug in JIRA.
---------------------------------------------------------------------------------------------------------------------------------------
4. If you find Buy button instead of Purchase button of a web application, what will you do?
Explain accordingly.
5. How will you do root cause analysis that the issue that you found is from the application or from
middleware or from database?
Root Cause Analysis (RCA) is a technique used to find answers as to why a problem has happened. ...
It effectively shows a root cause or several causes of problems. RCA identifies whether a defect was
caused by a testing mistake, a development mistake, or maybe a requirement or design mistake. By
following few techniques available in RCA we can find out what is the main cause of the
defect/bug/issue, so that we can find out from where the issue is either form application or form
middleware or form Database.
This fishbone diagram variation is most commonly used in manufacturing and allows you to
organize potential causes of a problem into these categories: Man, Materials, Machine, Methods,
Measurements and Environment. In some cases, two additional categories are included:
Management/Money and Maintenance.
Let’s try an example where the problem that needs our attention is wrong/delayed/damaged delivery.
The possible reasons can be many like the faulty packaging was used that led to damage during
transit, the wrong product was released for delivery, or the address label on the product wasn’t
correct. We can classify the same in main causes and present it in the fishbone diagram like below:
6. Difference between Waterfall and Agile models?
Waterfall is the oldest and most straight forward model of SDLC methodologies. It works as, finish one
phase and move to next phase. No going back. It is easy to understand and simple to manage. But
delays can throw off the entire project timeline and hence there is little room for change of
requirements. Problems can’t be fixed until you get to the maintenance phase .this model doesn’t
work well if flexibility is needed or if the project is long term and ongoing. Whereas Agile model works
by breaking the product into cycles, the agile model quickly delivers a working product and is
considered very realistic development approach. The model produces ongoing releases, each with
small and incremental changes from the previous releases. At each iteration the product is tested.
Thus model emphasizes the interactions as the customers, developers and testers work together
throughout the project. Agile methodology is a practice which promotes Continuous iteration for
development and testing.In agile both development and testing activities are concurrent unlike in
waterfall model. It involves in contiguous planning, learning, improvement, team collaboration. It
encourages flexible changes in the requirement at any stage.
Regression testing is defined as a type of software testing performed to confirm that a recent code
change has not adversely affected the existing features. It is done to ensure that the new code
changes should not have side effects on existing functionalities behavior.
Where as retesting means testing the code again to ensure that the bug got fixed.
Basically estimation process allows to estimate how long a Task would take to complete, how many
resources we would be needed to complete a particular task and how much it will cost.
I have followed Work Breakdown structure, three point estimation and Functional point method.
By using these processes we can estimate Resources, time,cost,human skill required to finish a task.
Resources: Resources are required to carry out any project tasks. They can be people, equipment,
facilities, funding, or anything else capable of definition required for the completion of a project
activity.
Times: Time is the most valuable resource in a project. Every project has a deadline to delivery.
Human Skills : Human skills mean the knowledge and the experience of the Team members. They
affect to your estimation. For example, a team, whose members have low testing skills, will take more
time to finish the project than the one which has high testing skills.
Cost: Cost is the project budget. Generally speaking, it means how much money it takes to finish the
project.
By using simple 4 step process we can efficiently estimate the above mentioned requirements,
Step1) Divide the whole project task into subtasks: Task is a piece of work that has been given to
someone. To do this, you can use the Work Breakdown Structure technique.
In this technique, a complex project is divided into modules. The modules are divided into sub-
modules. Each sub-module is further divided into functionality. It means divide the whole project task
into the smallest tasks. We can achieve this by using work breakdown structure.
Step 2) Allocate each task to team member : In this step, each task is assigned to the appropriate
member in the project team.
Step 3) Effort Estimation For Tasks : There are 2 techniques which you can apply to estimate the effort
for tasks
In Step 1, we already have broken the whole project task into small task by using WBS method. Now
you estimate the size of those tasks.
The size of this task depends on the functional size of the system under test. The functional size
reflects the amount of functionality that is relevant to the user. The more number of functionality, the
more complex system is.
Prior to start actual estimating tasks effort, functional points are divided into three groups like
Complex, Medium Simple
Based on the complex of software functions, the Test Manger has to give enough weight age to each
functional point. For example,
Complex task holds 5 weightage, Medium task holds 3 weightage, Simple task holds weightage as 1
After classifying the complexity of the function points, you have to estimate the duration to test them.
Duration means how much time needs to finish the task.
Total effort = Total function point * Estimate defined per function points
Total Effort: The effort to completely test all the functions of the website
Total Function Points: Total modules of the website
Estimate defined per Function Points: The average effort to complete one function points. This value
depends on the productivity of the member who will take in charge this task.
Complex 5 3 15
Medium 3 5 15
Simple 1 4 4
Once you understand the effort that is required, you can assign resources to determine how long the
task will take (duration), and then you can estimate labor and non-labor costs.
This step helps you to answer the last question of customer “How much does it cost?”
Suppose, on average your team salary is $5 per hour. The time required for “Create Test Specs” task is
170 hours. Accordingly, the cost for the task is 5*170= $850. Now you can calculate budget for other
activities in WBS and arrive at overall budget for the project.
When estimating a task, the Test Manager needs to provide three values, as specified above. The
three values identified, estimate what happens in an optimal state, what is the most likely, or what
we think it would be the worst case scenario
For example let is consider the following scenario
The best case to complete this task is 120 man-hours (around 15 days). In this case, you have a
talented team, they can finish the task in smallest time.
The most likely case to complete this task is 170 man-hours (around 21 days). This is a normal case,
you have enough resource and ability to complete the task
The worst case to complete this task is 200 man-hours (around 25 days). You need to perform much
more work because your team members are not experienced.
Now, assign the value to each parameter as below
The effort to complete the task can be calculated using double-triangular distribution formula as
follows,
E = (a+4m+b)/6
E = (120+4*170+200)/6
E = 166.6(man-hours)
In the above formula, parameter E is known as Weighted Average
Add some buffer time: Many unpredictable things may happen to your project, such as a talented
team member quits his job suddenly, the testing takes more time than estimated to complete… etc.
That why you need include some buffer in your estimation. Having a buffer in the estimation enables
to cope for any delays that may occur.
Account Resource planning in estimation: What should you do if some members in your team take
long leaves? It may delay the project. Resource planning in estimation plays a key role. The availability
of resources will help to make sure that the estimations are realistic. Here you have to consider the
leaves for your team member, generally long leaves.
Use the past experience as reference: Experiences from past projects play a vital role while preparing
the time estimates. Because some project may be some similarity, you can reuse the past estimation.
For example, if you use to do a project like testing a website, you can learn from that experience, try
to avoid all the difficulties or issues that were faced in past projects.
Stick to your estimation: Estimation is just estimate because it may go wrong. In early stages of the
project, you should frequently re-check the test estimations and make modification if needed. We
should not extend the estimation after we fix it, unless there are major changes in requirement, or
you have to negotiate with customer about the re-estimation.
Note : I have added the Test estimation techniques fully for your understanding. You can modify the
answer accordingly.
Priority is the order in which the developer should resolve a defect whereas Severity is the degree of
impact that a defect has on the operation of the product. ... Priority indicates how soon the bug
should be fixed whereas Severity indicates the seriousness of the defect on the product functionality.
Types of Severity
In Software Testing, Types of Severity of bug/defect can be categorized into four parts,
Critical: This defect indicates complete shut-down of the process, nothing can proceed further
Major: It is a highly severe defect and collapses the system. However, certain parts of the system
remain functional
Medium: It causes some undesirable behavior, but the system is still functional
Low: It won't cause any major break-down of the system
Low: The Defect is an irritant but repair can be done once the more serious Defect has been fixed
Medium: During the normal course of the development activities defect should be resolved. It can
wait until a new version is created
High: The defect must be resolved as soon as possible as it affects the system severely and cannot be
used until it is fixed.
Let see an example of low severity and high priority and vice versa
A very low severity with a high priority: A logo error for any shipment website can be of low severity
as it not going to affect the functionality of the website but can be of high priority as you don't want
any further shipment to proceed with the wrong logo.
A very high severity with a low priority: Likewise, for flight operating website, a defect in reservation
functionality may be of high severity but can be a low priority as it can be scheduled to release in a
next cycle.
A logo error for any shipment website, can be of low severity as it not going to affect the functionality
of the website but can be of high priority as you don't want any further shipment to proceed with the
wrong logo.
First of all will have a discussion/meeting scheduled with him to discuss why he/she is rejecting the
bug. After that will check whether both of our environments are same or not. If both developer and
tester environment is different then I will ask developer to try reproducing the bug on the same
environment on which it was found. But if both the environments are same then will check the builds.
If build were also same then I will try to reproduce the bug on my side and some other QA machine. If
still bug was not reproducible then will mark the bug either as inconsistent or invalid depending on
the results.
12. What will be your steps if already tested feature gets failed in UAT?
OR
How do you deal with production issues? What will be your approach for a production issue?
First of all I will check the SRS document and compare whether the feature got developed as per
client need or not. Then I will try to reproduce the bug at once. It may be user’s error or a
configuration issue sometimes. After bug reproduction, I will try to get all possible information on this
issue, whether it happened in a previous build, whether it’s reproduced on a test board, if it appears
in a certain browser (operating system), if I need certain configurations for its reproduction and so on.
The more information we get, the faster the bug can be fixed by developers. Then find the cause of
the defect and will inform developer accordingly about the timeline by which the defect should get
fixed as this is a production issue and then check the defect has been fixed in prescribed time or not.
--------------------------------------------------------------------------------------------------------------------------------------
13. How will you finish up with your day if at the very beginning of your day you faced a blocker issue
and you are working with onsite team?
OR
What will you do in overloaded work situation and under-loaded work situation?
OR
How you will manage your time if you have too much work load or very less work?
First I will check whether any of team members needs any help as I have band width. Then I will check
with remaining team mates whether I can extend my hand. If they don’t need any help then I will go
thru remaining modules in my project and will try to do exploratory testing. Once done and still have
bandwidth then will try to learn new automation tools or concepts.
I will include the overall summary of how the project and the task assigned to me was going on. If I
have any bottlenecks and would need help from any particular person then I will mention the same. If
the task assigned to me was completed then will share the Reports to him/her. If I would require
more time than scheduled then will explain him the reason why it was taking extra time and all.
15. What different aspects you will look while testing a web application?
I will consider quality, reliability, accessibility, usability, adaptability and functionality of the web
application while testing. Also check whether the application is user friendly or not.Whether it can
bear higher volumes of users or sudden fall of users.
I have used JIRA to raise new bugs and to track the status of those bugs.
Yes, our project has user management where Dealer Engineer will have all the access throughout the
Application, he can add new user or delete the existing user and also can update details of any
existing user. Technician on the other hand will be having restricted access when compared to
engineer.
18. How many team members are there in your current project?
When working onsite, employees can motivate one another, Teammates can help each other at times
when one is stuck and can’t find out the solution to a certain problem. We will have someone working
anytime around the clock and we can help each other. Coming to cons is time constraint, as time
zones are different we need to conduct meetings at odd times. Except that everything was good.
20. How do you usually work when you get a requirement? Explain what you do from start to end?
I will first go thru the SRS document provided by the client if any and will try to understand the whole
requirement. If I have any doubts then I will contact developer or client accordingly. Then will
estimate the time required to create test cases and develop test scripts and execution of test scripts
and report generation. Then will discuss the timelines with my manager and once that is finalized I
will start creating test cases, test data as per the requirement need. Once I got the build I will do
smoke testing and if everything got passed will accept the build and execute the test cases and
generate the Reports. If any bugs were found then I will raise the bugs in any bug tracking tool like
JIRA and will assign it to respective developer. Once developer fixes the bug and provided fixed build
again will do smoke testing followed by Retesting. If bug got fixed will close the bug and if still bug is
existing then will reopen the bug.
---------------------------------------------------------------------------------------------------------------------------------------
I have divided my complete project into different functionalities based on the features. Then further
divided each function into small Test scenario and each scenario into a single test case. Then I have
estimated the human skill and resources required to complete each test case. Depending on the
human skill and resources I have estimated cost and working hours required.
23. Can you share experience of handing the worst condition of delivery till now?
24. What is the normal working hours that you have been supporting on your on site coordination?
25. If you don’t have any proper requirement and you have to start your test planning what will you
do?
I will go thru the documents provided by the client regarding the application if anything was there.
Then will go thru previous versions of the application (If present). Then will consider generic features
in the requirement by using my previous Application testing experience and will start my test
planning.
26. Can you explain defect life cycle and what management tools have you used?
Defect life cycle is a cycle which a defect goes through during its lifetime. It starts when defect is
found and ends when a defect is closed, after ensuring it's not reproduced. Defect life cycle is related
to the bug found during testing. When a bug is found we should create a new bug and that bug should
be given an unique bug number and description then we have to give all the required information
such as in which feature of the Application the bug got created, what is the environment, what are
the steps required to reproduce the bug, what is the priority if the bug. Also we have to attach the
Logs and screenshots related to the bug. Once done giving all the information tester needs to assign
the bug to the developer. Once developer gets the bug he will go thru the description of the bug and
if he thinks the bug is appropriate then he will accept the bug.If developer think the bug is invalid then
he will reject the bug and will have to mention proper reason to reject the bug. If developer thinks the
bug was already raised then he will mark the bug as Duplicate.If the bug is acceptable but it can be
fixed in later build then developer will mark the bug as Deferred.Once developer accepts the bug he
will change the status as Active.Once the bug got fixed then developer will reassign the bug to the QA
who raised the bug and will change the status as Resolved/Fixed.Once tester gets the fixed build he
will retest the bug and if the bug got fixed tester will change the status of the bug as Closed. If tester
is still able to reproduce the bug then he will reassign the bug to the developer who fixed it and then
will change the status of the bug as Reopened.I have used JIRA test management tool in my previous
projects.
27. Explain any one challenge you had faced and what contribution you have made in those
challenges?
Yes, I have created traceability matrix in my previous project. Traceability matrix or Requirement
Traceability matrix or RTM is a document used to ensure that the requirements defined for a system
are linked at every point during the verification process. It also ensures that they are duly tested with
respect to test parameters and protocols. The main purpose of Requirement Traceability Matrix is to
validate that all requirements are checked via test cases such that no functionality is unchecked
during Software testing.RTM consists of different fields such as Requirement ID, Requirement type
and description, tests cases with status. We have three different types of RTMs available,
Forward traceability: This matrix is used to check whether the project progresses in the desired
direction and for the right product. It makes sure that each requirement is applied to the product and
that each requirement is tested thoroughly. It maps requirements to test cases.
Backward or reverse traceability: It is used to ensure whether the current product remains on the
right track. The purpose behind this type of traceability is to verify that we are not expanding the
scope of the project by adding code, design elements, test or other work that is not specified in the
requirements. It maps test cases to requirements.
Bi-directional traceability (Forward Backward): This traceability matrix ensures that all requirements
are covered by test cases. It analyzes the impact of a change in requirements affected by the Defect in
a work product and vice versa.
29. Do you know any FM team members, have you worked with them?
No, I don’t know anyone from FM.
31. Challenges faced in working with the clients on shore related to time zone and how did you
managed it?
Time zone is the only major challenge I have faced with my clients so far and to overcome that
challenge I used to be clear on work expectations from each of my team mates both on site and
offshore. I used to communicate with them very frequently. I used to schedule meetings in such a
manner the time of the meeting should be feasible for everyone regardless of time zone difference.
32. what you do when you are executing written test cases and you find out something on the screen
which is not related to the requirement/It doesn't match to your test case?
First of all I will check the requirement document provided by the client and check whether the
application was developed as per the client requirement or not. If the feature in the screen got
matched with the document then I will recheck my test case document why it is different from the
actual requirement as we may have that particular requirement may get updated/modified after
creating the test case sheet. If so I will update test case and execute it. If the requirement on the
screen is not matching with the feature mentioned in the SRS document then I will raise the bug
accordingly.
To the developer we generally assign defects. But in some projects all the bugs were assigned to the
QA manager and he will segregate the bugs and will assign accordingly.
34. Difference between Android and IOS devices. Which one better?
Google's Android and Apple's iOS are operating systems used primarily in mobile technology, such as
smart phones and tablets. Android, which is Linux-based and partly open source, is more PC-like than
iOS, in that its interface and basic features are generally more customizable from top to bottom.
Android handily beats the iPhone because it provides a lot more flexibility, functionality and freedom
of choice. ... But even though iPhones are the best that they've ever been, Android handsets still offer
a far better combination of value and features than Apple's limited lineup.I think Android are much
more flexible when compared to iphone.
The key difference between individual contribution and leadership lies in where you put your focus. ...
As a leader, you need to focus on how other people will achieve success, what development they
need to improve and what methods they can best use to achieve results.
As a Individual contributors we have to maintain cooperative work relationships with others. We need
to complete our own tasks for group projects in a timely and responsible manner and directly
contribute to reaching the group goal. I will be happy to be anything. I can be a good leader as well as
a wonderful team-player.
36. What if you don't get automation work for 1 year and get only manual work?
I don’t think automation would be possible without manual testing. I would be happy to work as a
manual tester also but I would like to spend some personal time in improving my Automation skills as
well.
The SQL UPDATE Query is used to modify the existing records in a table. You can use the WHERE
clause with the UPDATE query to update the selected rows, otherwise all the rows would be affected.
The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
Syntax is,
ALTER TABLE table_name
ADD column_name datatype;
Example is,
ALTER TABLE Customers
ADD Email varchar(255);
---------------------------------------------------------------------------------------------------------------------------------------
One of the problem might be the website I wish to access just might not be up right now, if that’s the
problem I will try again after sometime. Also, I will check whether the website is not working in
particular browser or it is not working in all browsers. If it is not working in particular browser will
change the version of the browser and check. If it is not working in all browsers then I will check in
other machine.If still the problem persists I will check if the URL got changed. If so will use the new url
to access the application.
Can try navigating to the browser and access any URL, if the application has opened successfully then
internet is up and connected and if we got any error code with 5XX as response then internet is not
connected.
41. Since agile is a 2week sprint, how will you test as well automate in a 2 weeks time?
As agile works on small iteration basis, both development and testing were also considered to be
done on small part of the application but not on entire application, when we get the feature that
needs to be delivered in particular sprint on the first day of the sprint during sprint planning meeting,
as a tester I will start going thru the requirement document provided by the client and will start
writing test cases accordingly. Once done, I will start selecting test cases that were suitable for
automation and will develop the test scripts. Once I got the build will start actual testing and
degenerate reports.
Answer accordingly.
43. What is sprint planning and sprint retrospective?
Sprint planning is an event in scrum that kicks off the sprint. The purpose of sprint planning is to
define what can be delivered in the sprint and how that work will be achieved. Sprint planning is done
in collaboration with the whole scrum team. In scrum, the sprint is a set period of time where all the
work is done. Whereas Sprint retrospective held after completion of each sprint and the Sprint
Retrospective concludes the Sprint. During the Sprint Retrospective, the team discusses,
What went well in the Sprint, What could be improved, what we will commit to improve in the next
Sprint.
Backlog Grooming: Backlog grooming is a regular session where backlog items are discussed,
reviewed, and prioritized by product managers, product owners, and the rest of the team. The
primary goal of backlog grooming is to keep the backlog up-to-date and ensure that backlog items are
prepared for upcoming sprints.
Velocity: Velocity in Agile is a simple calculation measuring units of work completed in a given time
frame. Once this is measured based on a few sprints, the team can then predict how many user points
they should plan to complete per sprint.
45/46.What if one issue is not fixed in the sprint/What if some user stories of a sprint are not
completed
If for instance, all the items of a Sprint are not completed, the Sprint is still marked over and the
remaining item(s) is moved to the Product Backlog from where it can be scheduled to any of the
subsequent sprint based on the revised priority.
While raising a bug, a unique bug ID should be given along with Description of the bug, Steps to
reproduce the bug and in which environment the bug got found, Priority of the bug, Screenshot and
logs files of the bug, Name of the QA who raised the bug to get contacted by the developer in case of
any queries, in which version the bug got found and timeline to fix the bug.
An error is the slip in the code and a defect is, if that error is identified by the tester then it will be
considered as a defect where as if the developer accepts the defect then it will become bug.
It is a type of testing metric. It indicates the effectiveness of a testing process by measuring the ratio
of defects discovered before the release and defects reported after the release by the customer.
It is something, when the bug is discovered by the end customer/user and is missed by the testing
team to detect during s/w testing.
A bug release can be defined as; when a particular version of software got released with a set of
known bug(s).These bugs are usually of lower priority/severity. It is done when the customer can
afford the existence of bug in the released s/w but not the time/cost for fixing it in that particular
release.
It is an testing approach in software testing, where in testers learn simultaneously about the test
design and test execution. In other words it is a hand-on approach where testers are more involved in
the test execution part than in planning.
It is a black box testing technique in which an authorized attempt is made to violate specific
constraints stated in the form of a security (or) integration policy of the system/Application.
It is the simplest form of testing conducted to understand the behavior of the application under a
specific load.
It is performed to find out the upper limit capacity of the system and also to determine how the
system performs if the current load goes well above the expected maximum.
It is also known as Endurance testing. It is performed to determine the system parameters under
continuous expected load. During soak testing the parameters such as memory utilization is
monitored to detect memory leaks or any performance issues.
Spike testing can be performed by increasing the number of users suddenly by very large amount and
measuring the performance of the system. The main aim is to determine whether the system will be
able to sustain the workload.
1. What is URI?
A URL or Uniform Resource Locator is used to find the location of
the resource on the web. It is a reference for a resource and a way
to access that resource. A URL always shows a unique resource, and
it can be an HTML page, a CSS document, an image, etc.
To send your first API request, open Postman. Click the + plus
button to open a new tab.
Click Send. You will see the JSON data response from the server
in the lower pane.
What is endpoint?
An endpoint is one end of a communication channel. When an API
interacts with another system, the touch points of this
communication are considered endpoints. For APIs, an endpoint can
include a URL of a server or service.
AUTHORIZATIONBearer Token
Token
<token>
HEADERS
Content-Type
application/json
BODYraw
{
"component_type": "text",
"order": 1,
"type_data": {
"data": "example text"
}
}
Example Request
curl --location --request POST
'http://34.209.230.231:8000/components/' \
--header 'Content-Type: application/json' \
--data-raw '{
"component_type": "text",
"order": 1,
"type_data": {
"data": "example text"
}
}'
Example Response
201 Created
Body
Header(7)
{
"id": 1,
"component_type": "text",
"order": 1,
"type_data": {
"id": 1,
"data": "example text"
}
}
GET
get component
http://34.209.230.231:8000/components/
AUTHORIZATION Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
BODYraw
{
"component_type": "text",
"order": 1,
"type_data": {
"data": "example text"
}
}
get component
Example Request
curl --location --request GET
'http://34.209.230.231:8000/components/2' \
--header 'Content-Type: application/json' \
--data-raw '{
"component_type": "text",
"order": 1,
"type_data": {
"data": "example text"
}
}'
Example Response
200 OK
Body
Header(7)
{
"id": 2,
"component_type": "longtext",
"order": 1,
"type_data": {
"id": 1,
"data": "example longtext"
}
}
PUT
Update component
http://34.209.230.231:8000/components/1/
AUTHORIZATIONBearer Token
Token
<token>
HEADERS
Content-Type
application/json
BODYraw
{
"component_type": "text",
"order": 1,
"type_data": {
"data": "example text more"
}
}
Example Request
update component
curl --location --request PUT
'http://34.209.230.231:8000/components/1/' \
--header 'Content-Type: application/json' \
--data-raw '{
"component_type": "text",
"order": 1,
"type_data": {
"data": "example text more"
}
}'
Example Response
200 OK
Body
Header(7)
{
"id": 1,
"component_type": "text",
"order": 1,
"type_data": {
"id": 1,
"data": "example text more"
}
}
DEL
Delete component
http://34.209.230.231:8000/components/2/
AUTHORIZATION Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
BODY
raw
{
"component_type": "text",
"order": 1,
"type_data": {
"data": "example text more"
}
}
http://127.0.0.1:8000/component/1/
Example Request
curl --location --request DELETE 'http://127.0.0.1:8000/component/1/'
\
--header 'Content-Type: application/json' \
--data-raw '{
"component_type": "text",
"order": 1,
"type_data": {
"data": "example text more"
}
}'
Example Response
204 No Content
Body
Header(6)
No response body
This request doesn't return a response body
POST
Upload image to a component
http://34.209.230.231:8000/upload_image/63/
Note: This part may be some tricky!!!
In order to add some image to a component, first of all you need to create a content
which has image component with empty type data. Therefore, data field in your image
component will be null. You need to send a request with image to component with the
id of primary key which is denoted in the url.
In order to upload an image you need to send a POST request with body of form-data.
This form data need to have a field file with the value of uploaded image.
SOAP stands for Simple Object Access Protocol whereas REST stands for
Representational State Transfer.
SOAP is a protocol whereas REST is an architectural pattern.
SOAP uses service interfaces to expose its functionality to client
applications while REST uses Uniform Service locators to access to the
components on the hardware device.
SOAP needs more bandwidth for its usage whereas REST doesn’t need
much bandwidth.
Comparing SOAP vs. REST API, SOAP only works with XML formats
whereas REST work with plain text, XML, HTML and JSON.
SOAP cannot make use of REST whereas REST can make use of SOAP.