Softskills
Java
Selenium
Cucumber
API
100

What is the difference between Unit Testing and Functional Testing?

Unit Tests are written from a programmer's perspective. They are made to ensure that a particular method (or a unit) of a class performs a set of specific tasks. Functional Tests are written from the user's perspective. They ensure that the system is functioning as users are expecting it to.

100

What is a constructor?

A constructor in java is a block of code similar to a method. Constructor called when an instance of a class is created. A constructor is a special method whose task is to initialize the object of its class. Constructors cannot be abstract, final, static.

100

What are the Locators available in Selenium? Which locator do you prefer?

ClassName – A ClassName operator uses a class attribute to identify an object. • CSS selector – CSS is used to create style rules for web pages and can be used to identify any web element. 

Id – Similar to class, we can also identify elements by using the ‘id’ attribute.

link text – Text used in hyperlinks can also locate element 

name – Name attribute can also identify an element 

partialLinkText – Part of the text in the link can also identify an element

tagName – We can also use a tag to locate elements 

xpath – Xpath is the language used to query the XML document. The same can uniquely identify the web element on any page. 

100

What is Gherkin language?

Gherkin is a plain-text language used to write cucumber scenarios in a feature file. Gherkin is a  business-readable, domain-specific language used to describe the behavior of software applications from  the user’s perspective so that it's easy for non-programmers to read and collaborate. Gherkin is not  necessarily used to write automated tests. Gherkin is primarily used to write structured tests which can  later be used as project documentation.

100

Most Commonly Used HTTP Methods supported by REST

Post, Get, Put, Delete

200

What would you do if you end up with unclear requirements or requirements are not available?

I would start to do some random testing to understand what is being asked or what is at least attempted, basically discovering to get an idea, so I can start writing scripts. Then I will also check out our meeting notes, emails and discussion. Also if BA is available ask for clarifacation with them as well.

200

Explain OOPS concepts?

OOP concepts in Java are the main idea behind Java’s Object Oriented Programming. They are an abstraction, inheritance, polymorphism and encapsulation.

200

What is the difference between driver.close() and driver.quit() methods?

close() - It is used to close the browser or page currently which is having the focus. 

quit() - It is used to shut down the webdriver instance or destroy the web driver instance(Close all the windows). 



200

What is DryRun?

You can use dryrun to generate undefined steps without running the whole feature file.  Feature: We use feature properties to provide the file path of feature file. 

200

What is 200, 401, 403, 405, 500, and 503 status code?

200 ---> Ok

401---> Unauthorized

403---->forebidden

405----> method not allowed

500-----> Internal server error

503----> Service unavailable

300

Bug priority vs Bug severity?

Priority represents the importance of fixing a bug, and reflects a business decision as to how soon that bug should be fixed: all priority 1 bugs should be fixed before priority 2 bugs, etc.

Severity represents “how bad a bug is.” For example, a bug that causes the program to crash would be considered high severity, while a small spelling error might be low severity.

300

Difference between ArrayList vs LinkedList?

ArrayList and LinkedList, both implement List interface and provide capability to store and get objects as in ordered collections. Both are non-synchronized classes and both allow duplicate elements.

ArrayList

● ArrayList internally uses a dynamic array to store the elements.

● Manipulation with ArrayList is slow because it internally uses an array. If any element is removed from the array, all the bits are shifted in memory. 

● ArrayList is better for storing and accessing data.

LinkedList

● LinkedList internally uses a doubly linked list to store the elements (consist on value + pointer to previous node and pointer to the next node)

● Manipulation with LinkedList is faster than ArrayList because it uses a doubly linked list, so no bit shifting is required in memory.

● LinkedList is better for manipulating data.

300

What is the alternative to the driver.get() method to open a URL using Selenium WebDriver?  

driver.navigate().to

300

DataTable vs Scenario Outline

Scenario Outline: 

● uses Example keyword to define the test data for the Scenario 

● works for the whole test/scenario 

● Cucumber automatically run the complete test the number of times equal to the number of data in the Test Set 

Data Table: 

● no keyword is used to define the test data 

● works only for the single step, below which it is defined 

● A separate code is needed to understand the test data and then it can be run single or multiple times but  again just for the single step, not for the complete test 

300

What API documentations do you know?

● Swagger ● FlatDoc ● RestDoc ● API blueprint

400

What is the difference between bug release and bug leakage?

Bug release is when a version of the software is released with a set of known bugs. These bugs are usually of low severity/priority. It is done when a software company can afford the existence of a bug in the released software rather than the time/cost for fixing it in that version.

Bug leakage is something when the bug is discovered by the end users or customers and missed by the testing team to detect while testing the software.

400

What is singleton?

A singleton class is a class that can have only one object (an instance of the class) at a time. After the first time, if we try to instantiate the Singleton class, the new variable also points to the first instance created. So whatever modifications we do to any variable inside the class through any instance, it affects the variable of the single instance created.

● Singleton pattern restricts the instantiation of a class and ensures that only one instance of the class exists in the Java virtual machine.

● The singleton class must provide a global access point to get the instance of the class.

● Singleton pattern is used for logging, drivers objects

400

What is the difference between driver.findElement() and driver.findElements() commands?

findElements() returns List of WebElements – It returns empty list, when element is not found on current page as per the given element locator mechanism. It doesn't throw NoSuchElementException.

findElement() returns only single WebElement and if that element is not located or we use some  wrong selector then it throws NoSuchElementexception.  

400

How do you do achieve parallel testing in cucumber framework? 

To be able to run the tests in parallel in cucumber we need to use additional plugin which is called  maven-failsafe-plugin. We need to add this plugin to the pom.xml file.  

400

What is authorization and Authentication in API?

In Authorization, a user or application is granted access to an API after the API determines the extent of the permissions that it should assign. Usually, authorization occurs after identity is successfully validated through authentication so that the API has some idea of what sort of access it should grant.

Authentication is the verification of the credentials of the connection attempt. This process consists of sending the credentials from the remote access client to the remote access server in an either plaintext or encrypted form by using an authentication protocol.

500

What are ALL the scrum meetings? Explain each one. 

1. Sprint Planning Meeting-At the beginning of every Sprint, Sprint planning meeting is held. Usually, the entire team is expected to be present during this meeting, including the product owner and the Scrum master. The goal of this meeting is to develop a realistic Sprint backlog and define the highest priority tasks which need to be done during the length of each Sprint. The product owner is responsible for explaining the backlog items to the development team and open discussion is expected from both ends to clear all kinds of ambiguities.

2. Daily Scrum Meeting-Daily Scrum meeting, or daily standups – as many people call them, are short 15 minutes meetings which occur on a daily basis. They are typically held at the same time and same place every day and are strictly time boxed to no longer than 15 minutes. This ensures the discussion to stay light, relevant, and quick.

3. Sprint Review Meeting-At the end of each Sprint, a Sprint Review meeting is held. The core objective of this meeting is to demonstrate the functionality of the product and what has been achieved during a particular Sprint. Generally, the product owner, Scrum Master, and other stakeholders are present to review the product.

4. Sprint Retrospective Meeting - Sprint retrospective meeting- as the name suggests- is solely held with a fundamental purpose of reviewing what went right and wrong during a Sprint. The meeting brings forth a great opportunity for the entire team to reflect back on the work and what improvements are needed to be made.

5. Backlog Refinement Meeting-The last type of Scrum meetings is the backlog refinement meeting, also known as the product backlog grooming. Mostly, product backlog items need refinement for the next Sprint, to make the team understand them better for successful execution.

500

what is a Garbage Collector?

Garbage collection is the process of looking at heap memory and identifying which objects are in use and which are not and deleting unused objects. Once an object is created it uses some memory and the memory remains allocated until there are references for the use of the object.

500

How do you handle the multiple windows/tabs in selenium?

We can handle multiple windows/tabs in selenium webdriver using Switch To methods which will allow us to switch control from one window to another window. 

getWindowHandle() This method helps to get the window handle of the current window. The return type of this method is the current window id in the String data type.  

• String handle= driver.getWindowHandle(); 

getWindowHandles() method or commands returns all handles from all opened browsers by Selenium WebDriver during execution. Return a set of the window handle. It returns the set of unique window ids from the windows.  

• Set<String> allWindowHandles= driver.getWindowHandles();

500

What are the keywords used in the feature file?

Feature, Scenario, Scenarios, Rule, Example, Examples, Background, Scenario Outline, Given, When, And, But, and Then.

500

What are parameters in API? Types of Parameters?  


Parameters are options you can pass with the endpoint to influence the  response. In REST we 2 types of Parameters:  

● Path Parameters 

As part of the URL-path (i.e. /api/resource/parameter value)  

● Query Parameters 

As a query argument (i.e. /api/resource?parameter=value) 

M
e
n
u