0% found this document useful (0 votes)
49 views10 pages

Intervw Ques

PKM has 5+ years of experience in IT with a focus on QA testing over the last few years. They are experienced in test automation using Selenium and frameworks like Page Object Model, TestNG and BDD. Currently they perform both manual and automated testing as part of a Scrum team and mentor others. They are looking for opportunities to learn new skills and help leverage automation to reduce costs.

Uploaded by

john bolt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views10 pages

Intervw Ques

PKM has 5+ years of experience in IT with a focus on QA testing over the last few years. They are experienced in test automation using Selenium and frameworks like Page Object Model, TestNG and BDD. Currently they perform both manual and automated testing as part of a Scrum team and mentor others. They are looking for opportunities to learn new skills and help leverage automation to reduce costs.

Uploaded by

john bolt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 10

1.tell abt urself - my name is pkm and i have overall IT exp is 5.7yrs.

Initially
about 8 months i was a dev+unit tester and then i totally moved into QA.
doing 70% of manual and 30% of automation testing.
From last yr since the pandemic, i have gained some knowledge on automation and got
involved into automation.
As a TA i am involved into front end automation using seleniumweb driver
pretty much comfortable in testng framework and BDD framework.
Currently i am working in hybrid model there are multiple scrum teams and i am a
part of the scrum team where i am performing as an individual contributor.
As a TA, I am mentoring new team members for Test Planning and Test Scripting and
Execution.
Defect logging and tracking worked in HP QC/IBM CQ.

Scrum is a framework utilizing an agile mindset for developing,


delivering, and sustaining complex products, with an initial emphasis on software
development.

An agile retrospective forces the entire team to pause and reflect on what
transpired and discuss what worked and what didn't during a particular project.

Defect Triaging is a formal meeting where all the defects of the current Sprint are
discussed and triaged i.e. Prioritized. The
QA Developers in the Development Team demonstrates and explains the defects to the
rest of the Scrum Team.

The scrum master helps to facilitate scrum to the larger team by ensuring the scrum
framework is followed. ...
Scrum has a clearly defined set of roles and rituals that should be followed and
the scrum master works with each member of
the scrum team to guide and coach the team through the scrum framework.

Product backlog is a prioritized list of deliverables (such as new features) that


should be implemented as part of a project or product development.
The Product Backlog is specific to the entire goal of the product.
The Sprint Backlog is specific only to the Sprint goal in a particular Sprint.

Capers Jones basic formula − Function Point Estimation technique


Number of Test Cases = (Number of Function Points) × 1.2

Scanner sc= new Scanner(System.in); //System.in is a standard input stream.


int a= sc.nextInt();
String str= sc.nextLine();

2. tools and technologies - much comfortable in designing the existing framework or


from scratch,very good expoosure in page object model,datadriven,
currently working in selenium webdriver componenet.(3.7.0)
very good exposure in junit and testng.
pretty much comforatble in designing the framework,component of framework.

What is the difference between Test matrix and Traceability matrix?


Test Matrix: Test matrix is used to capture actual quality, effort, the plan,
resources and time required to capture all phases of software testing

Traceability Matrix: Mapping between test cases and customer requirements is known
as Traceability Matrix

3.explain current project role- web prtal testing . whre i have used Maven with
POM. Testing the internal and external category depending on some pre-condtns.
API: GetRequest,PutRequest,PostRequest.
Auth used: Bearer Token- HTTP authentication Scheme that involves security tokens
using OAuth2.0-
token failed- then 401 unauthorized user error.
server failewd- 500 internal server error
503 - Service Unavailable(Server is unavailable)
200 - Ok _request is successfully completed)
400 - Bad Request(Invalid request)
url vs uri - url is an address to webpage .

Sanity Testing is performed to check the stability of new functionality or code


changes in the existing build.
Regression testing is performed to check the stability of all areas impacted by any
functionality change or code change.
Smoke testing is executed at the initial stage of SDLC, to check the core
functionalities of an application.
Whereas Sanity & Regression testing are done at the final stage of SDLC, to check
the main functionalities of an application.

GET: Read-only access to the resource.


PUT: Creation of new resource.
DELETE: Removal of a resource.
POST: Update of an existing resource.
OPTIONS: Get supported operations on the resource.
HEAD: Returns HTTP header only, nobody.

StringBuffer and StringBuilder classes are mutable. ... StringBuffer is


synchronized i.e. thread safe.
It means two threads can't call the methods of StringBuffer simultaneously.
StringBuilder is non-synchronized i.e. not thread safe.

NOT NULL - Ensures that a column cannot have a NULL value


UNIQUE - Ensures that all values in a column are different
PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row
in a table
FOREIGN KEY - Prevents actions that would destroy links between tables
CHECK - Ensures that the values in a column satisfies a specific condition
DEFAULT - Sets a default value for a column if no value is specified
CREATE INDEX - Used to create and retrieve data from the database very quickly

5.y do u want to join - i am looking for an env where i can learn new things,i can
share my knowledge.
i can perform some amazing stuff where we can leverage our automation so that we
can save aoyu resources,cost.
yes no doubt its very challenging & this is the exact thing i am looking for.if i
join ur compny it will be grate value addition in my profile.

challenges faced-
image /text overlapping issue,
no facility to deal with captcha
difficult to identify dynamic objects.
working with frames.
cross browser tetsing issues.

API Testing:
Initial setting up of Environment
Parameter Validation/Assertions
Updation of API requests testing scheme
SOAP: Soap stands for Simple Object Access Protocol and it is a protocol used for
receiving and sending data over HTTP as XML
Properties in SOAPUI is used to retrieve and store data. The data is stored as
key, value or format.uses XML to interact with web applications.
It uses XML based content to communicate between two client machines across any
network
REST: It is a way of designing a web services.

File SrcFile=((TakesScreenshot)webdriver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(SrcFile, new File(fileWithPath)

OOPS concept in project - webdriver itself is an interface.,


Webelement,WebdriverWait,JavaScriptExecutor is an interface.
Polymorphism - 2 types of it:
method overloading and method overriding.
(implicitly Waits)/multiple frames and (Webdriver returning Browser(chrome or IE)
taking it from Excel file)

Encapsulation - All the POM classes in any frmaework is an example. @FindBy and
initialization of data members will be done using
constuctor to utilize those mthods. We set all the instance variables as private so
that these variables can't be accessed directly by other tesng classes.
then we generate public getter and setter methods corresponding to this private
variable.
As we set the variavle as private and hide their implementation from other classes.

Abstraction - in POM we write locators such as id,name,xpath in each page class,We


utilize these locators in POM class
but we can't see these locators implementation in the tests.

Background in Cucumber is used to define a step or series of steps that are common
to all the tests in the feature file.
It allows you to add some context to the scenarios for a feature where it is
defined. A Background is much like a scenario containing a number of steps.

How do I pass a command line argument in Maven?


You could run: mvn exec:exec -Dexec. args="arg1". This will pass the argument arg1
to your program.
By using the -f parameter, you can also run it from other directories.

6.POM -
Page Object Model or POM is a design pattern or a framework that we use in Selenium
using which one can create an object repository
of the different web elements across the application. To simplify, in the Page
Object Model framework, we create a class file for each web page.

7.Page Factory in Selenium is an inbuilt Page Object Model framework concept for
Selenium WebDriver but it is very optimized.
It is used for initialization of Page objects or to instantiate the Page object
itself.
It is also used to initialize Page class elements without using "FindElement/s."

8.Using the @FindBy annotation– Unlike the regular approach of initializing web
page elements using FindElement or FindElements,
the Page Factory uses the @FindBy annotation. The annotations used in Page Factory
are descriptive.
Moreover, they help improve code readability.

9.Initializing the elements using initElements()– This is a static method used to


initialize the web elements that we locate using the @FindBy or other
annotation(s),
thereby instantiating the page class.
PageFactory.initElements(WebDriver driver, java.lang.Class.pageObjectClass);

Question: What is Maven? What is the benefit of integrating maven with Jenkins?
Answer: Maven is a build management tool. Using a simple pom.xml, one can configure
all the dependencies
needed to build, test and run the code.
Maven manages the full lifecycle of a test project. Once integrated with Jenkins,
the maven Webdriver will build the project and execute all tests efficiently.

Question: Have you run automated tests on Jenkins? How is it done?


Answer: Yes. Automated tests can be run through tools like Selenium or maven.
Developers can schedule the test runs. Jenkins displays the test results and sends
a report to the developers.

Question: How do you define parameters in Jenkins?


Answer: A build can take several input parameters to execute. For example, if you
have multiple test suites, but you want to run only one.
You can set a parameter to decide which one should be run.
To have parameters in a job, you need to specify the same while defining the
parameter. The parameter can be a string, file or custom.

Question: Explain the process of setting up a Jenkins job?


Answer: Jenkins handles project builds through jobs. To set up a job, you should
follow a few steps:

Select a new item, and enter the name of the job.


Select freestyle project and press OK.
Enter the job description and configure the number of builds and time for which
they should be retained.
Configure the repository (Example Git). Enter the URL and credentials.
Specify the build triggers.
Save the job.
Validate the job by clicking on ‘Build Now’.

Question: Explain the difference between Maven, Ant, and Jenkins?


Answer: Jenkins is a CI tool, whereas Ant and Maven are build tools. Jenkins
provides a trigger for the build to be executed.
Maven and Ant can only perform build operations;
however, Jenkins can run unit tests, deploy applications automatically.

Question: Explain the process to integrate Git with Jenkins?


Answer: Here are the steps to integrate Git with Jenkins:

Create a new Jenkins job and open the Jenkins dashboard.


Enter the project name (in the item name) and select the job type. Click on OK.
Enter the project information. Go to the ‘Source Code Management’ tab. If the Git
plugin is already installed in Jenkins, you will see the option ‘Git’.
If you cannot see it, then you should reinstall the plugins – GitHub plugin, GitHub
Branch Source plugin, GitHub API plugin, Gitclient plugin etc.
After installing the plugins, restart Jenkins to reflect the changes.
To pull the code from GitHub, enter the repository URL. If you do not have Git
installed in your machine, install it. To check if Git is installed,
type Git in cmd (command prompt) and you should see various options like usage,
version, help etc.
Q. Roman to Integer Conversion-------------------

public class RomanToDecimal {


public static void main (String[] args) {

int result = 0;
int[] decimal = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1};
String[] roman = {"M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V",
"IV", "I"};

// Test string, the number 895


String test = "DCCCXCV";

for (int i = 0; i < decimal.length; i++ ) {


while (test.indexOf(roman[i]) == 0) {
result += decimal[i];
test = test.replace(roman[i], ""); //replaces all occurrences of "C"
with "", so after you find the
first "C" and add 100 to the total,
you eliminate all the remaining "C"s, and never
count them.
Therefore you actually compute the value of
"DCXV", which is 615
test.substring(roman[i].length()); ////////
}
}
System.out.println(result);
}

Q. Largest Sum Contiguous Subarray--------------------

import java.io.*;
// Java program to print largest contiguous array sum
import java.util.*;

class Kadane
{
public static void main (String[] args)
{
int [] a = {-2, -3, 4, -1, -2, 1, 5, -3};
System.out.println("Maximum contiguous sum is " +
maxSubArraySum(a));
}

static int maxSubArraySum(int a[])


{
int size = a.length;
int max_so_far = Integer.MIN_VALUE, max_ending_here = 0;

for (int i = 0; i < size; i++)


{
max_ending_here = max_ending_here + a[i];
if (max_so_far < max_ending_here)
max_so_far = max_ending_here;
if (max_ending_here < 0)
max_ending_here = 0;
}
return max_so_far;
}
}

****************************************************OR*****************************
**********

public class MaximumSubarray {


public static void main(String[] args) {
// Input array
int nums[] = {-2, 1, -3, 4, -1, 2, 1, -5, 4};

// Find the maximum subarray using Kadane's algorithm


int maxSum = findMaxSubarray(nums);

// Print the answer


System.out.println(maxSum);
}

private static int findMaxSubarray(int[] nums) {


// Initialise max and maxTillNow as nums[0]
int max = nums[0];
int maxTillNow = nums[0];

// Loop through the array


for (int i = 1; i < nums.length; i++) {
// maxTillNow is max of curr element or maxTillNow + curr element
maxTillNow = Math.max(nums[i], maxTillNow + nums[i]);
// max is maximum of max and maxTillNow
max = Math.max(max, maxTillNow);
}

// Return the result


return max;
}
}

Q. Closest Number divisible by 10-----------------------------------------

public class close_to_n_divisible_m {

// function to find the number closest to n


// and divisible by 10
static int closestNumber(int n)
{
// find the quotient
int q = n / 10;

// 1st possible closest number


int n1 = 10 * q;

// 2nd possible closest number


int n2 = (n * 10) > 0 ? (10 * (q + 1)) : (10 * (q - 1));

// if true, then n1 is the required closest number


if (Math.abs(n - n1) < Math.abs(n - n2))
return n1;

// else n2 is the required closest number


return n2;
}

// Driver program to test above


public static void main(String args[])
{
int n = 5;
System.out.println(closestNumber(n));

n = -15;
System.out.println(closestNumber(n));

n = 0;
System.out.println(closestNumber(n));

n = 18;
System.out.println(closestNumber(n));
}
}

Q.Print Matrix diagonally--------------------------

class GFG {
static final int MAX = 100;

static void printMatrixDiagonal(int mat[][], int n)


{
// Initialize indexes of element to be printed next
int i = 0, j = 0;

// Direction is initially from down to up


boolean isUp = true;

// Traverse the matrix till all elements get traversed


for (int k = 0; k < n * n;) {
// If isUp = true then traverse from downward
// to upward
if (isUp) {
for (; i >= 0 && j < n; j++, i--) {
System.out.print(mat[i][j] + " ");
k++;
}

// Set i and j according to direction


if (i < 0 && j <= n - 1)
i = 0;
if (j == n) {
i = i + 2;
j--;
}
}

// If isUp = 0 then traverse up to down


else {
for (; j >= 0 && i < n; i++, j--) {
System.out.print(mat[i][j] + " ");
k++;
}
// Set i and j according to direction
if (j < 0 && i <= n - 1)
j = 0;
if (i == n) {
j = j + 2;
i--;
}
}

// Revert the isUp to change the direction


isUp = !isUp;
}
}

// Driver code
public static void main(String[] args)
{
int mat[][] = { { 1, 2, 3 },
{ 4, 5, 6 },
{ 7, 8, 9 } };

int n = 3;
printMatrixDiagonal(mat, n);
}
}
o/p - 1 2 4 7 5 3 6 8 9

Duplicate elements in 2 arrays:-------------------------------

import java.io.*;
import java.util.*;
import java.lang.*;

class Solution {

static int[] findDuplicates(int[] arr1, int[] arr2) {


// your code goes here
int i = 0, j = 0, k = 0;
ArrayList<Integer> ans = new ArrayList<>();
while(( i < arr1.length) && (j < arr2.length))
{
if(arr1[i] < arr2[j])
i++;
else if(arr1[i] == arr2[j])
{
ans.add(arr1[i]);
k++;
i++;
j++;
}
else
j++;
}
int[] arr = new int[ans.size()];

for(int l = 0; l < ans.size(); l++) {


if (ans.get(l) != null) {
arr[l] = ans.get(l);
}
}
return arr;
}

Q. No of occurences of char in a string----------------------------

// Java program for the above approach


class NoOfOccurenceOfCharacters {
static final int MAX_CHAR = 256;

static void getOccuringChar(String str)


{

// Create an array of size 256


// i.e. ASCII_SIZE
int count[] = new int[MAX_CHAR];

int len = str.length();

// Initialize count array index


for (int i = 0; i < len; i++)
count[str.charAt(i)]++;

// Create an array of given String size


char ch[] = new char[str.length()];
for (int i = 0; i < len; i++) {
ch[i] = str.charAt(i);
int find = 0;
for (int j = 0; j <= i; j++) {

// If any matches found


if (str.charAt(i) == ch[j])
find++;
}

if (find == 1)
System.out.println(
"Number of Occurrence of "
+ str.charAt(i)
+ " is:" + count[str.charAt(i)]);
}
}

// Driver Code
public static void main(String[] args)
{
String str = "geeksforgeeks";
getOccuringChar(str);
}
}

Q. Sort character in a String:------------------------

public class GFG


{
// Method to sort a string alphabetically
public static String sortString(String inputString)
{
// convert input string to char array
char tempArray[] = inputString.toCharArray();

// sort tempArray
Arrays.sort(tempArray);

// return new sorted string


return new String(tempArray);
}

// Driver method
public static void main(String[] args)
{
String inputString = "geeksforgeeks";
String outputString = sortString(inputString);

System.out.println("Input String : " + inputString);


System.out.println("Output String : " + outputString);
}
}

Q. Reverse a String------------------------
class ReverseString {
public static void main(String[] args)
{
String input = "Geeks for Geeks";

StringBuilder input1 = new StringBuilder();

// append a string into StringBuilder input1


input1.append(input);

// reverse StringBuilder input1


input1.reverse();

// print reversed String


System.out.println(input1);
}
}

You might also like