0% found this document useful (0 votes)
28 views7 pages

SDET Interview Questions and Answers

Uploaded by

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

SDET Interview Questions and Answers

Uploaded by

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

AJITH KUMAR M

[email protected]

SDET Interview Questions and Answers:


Round 1:

1. Test Scenarios for Lift (Elevators) Testing

UI Testing:

Verify that all floor buttons are displayed and functional.

Check the display panel shows the correct floor number.

Validate the emergency button and alarm indicator are visually clear.

Confirm proper illumination of floor buttons when pressed.


Ensure the direction indicators (up/down arrows) are working correctly.

Security Testing:

Test emergency stop functionality during operation.

Validate restricted access to certain floors using authentication methods (e.g.,


keycards).

Check if the lift stops in case of fire or earthquake using safety protocols.

Verify the overload indicator prevents operation when the lift is overloaded.

Performance Testing:
Measure the lift's response time for button presses.

Test the lift’s maximum capacity and operational efficiency.

Analyze the time taken to move between floors under normal and peak loads.

Verify operation under different power conditions, including backups.

Accessibility Testing:

Check if floor buttons are reachable for wheelchair users.


Validate that the lift provides audio notifications for visually impaired users.
Ensure proper functioning of braille on the buttons.

Confirm the door sensors respond quickly to obstacles.

2. Convert String to Integer Without Using Integer.parseInt

public class StringToInteger {


public static int convertStringToInt(String str) {

int result = 0;

int sign = 1;

int i = 0;

if (str.charAt(0) == '-') {

sign = -1;
i++;
}

for (; i < str.length(); i++) {

result = result * 10 + (str.charAt(i) - '0');

return result * sign;

public static void main(String[] args) {

System.out.println(convertStringToInt("123")); // Output: 123

System.out.println(convertStringToInt("-456")); // Output: -456

3. Rotate Array Right Shift


import java.util.Arrays;

public class RotateArray {


public static void rotateRight(int[] arr, int n) {

int length = arr.length;

n = n % length; // To handle shifts greater than array length

reverse(arr, 0, length - 1);


reverse(arr, 0, n - 1);

reverse(arr, n, length - 1);

private static void reverse(int[] arr, int start, int end) {

while (start < end) {

int temp = arr[start];


arr[start] = arr[end];
arr[end] = temp;

start++;

end--;

public static void main(String[] args) {


int[] arr = {1, 2, 3, 4, 5, 6, 7};

int n = 3;

rotateRight(arr, n);

System.out.println(Arrays.toString(arr)); // Output: [5, 6, 7, 1, 2, 3, 4]

}
Round 2

1. Print All Tab Names Using Selenium Java

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import org.openqa.selenium.chrome.ChromeDriver;

import java.util.List;

public class GetTabNames {

public static void main(String[] args) {

WebDriver driver = new ChromeDriver();


driver.get("https://www.icicilombard.com");

List<WebElement> tabs = driver.findElements(By.xpath("//nav//a"));

for (WebElement tab : tabs) {

System.out.println(tab.getText());

driver.quit();
}

2. Reverse Words at Same Place

public class ReverseWords {

public static String reverseWords(String str) {

String[] words = str.split(" ");

StringBuilder result = new StringBuilder();

for (String word : words) {


result.append(new StringBuilder(word).reverse().toString()).append(" ");
}

return result.toString().trim();

public static void main(String[] args) {

System.out.println(reverseWords("Test Automation")); // Output: tseT


noitamotuA
}

3. Get Max and Min Occurrences

import java.util.HashMap;

public class MaxMinOccurrences {

public static void main(String[] args) {

String str = "Teeeessst Autoooooomationn";

HashMap<Character, Integer> map = new HashMap<>();

for (char c : str.toCharArray()) {

map.put(c, map.getOrDefault(c, 0) + 1);

char maxChar = ' ';


char minChar = ' ';

int maxCount = Integer.MIN_VALUE;

int minCount = Integer.MAX_VALUE;

for (char c : map.keySet()) {

int count = map.get(c);

if (count > maxCount) {


maxCount = count;
maxChar = c;

if (count < minCount) {

minCount = count;
minChar = c;

System.out.println("Max: " + maxChar + "-" + maxCount);

System.out.println("Min: " + minChar + "-" + minCount);

}
}
Round 3

1. Describe Your Last Project

Discuss the project's objective, technology stack, role, and contributions in a


structured way.

2. Challenges and Resolutions

Challenge: Complex business logic leading to integration issues.

Resolution: Collaborated with SMEs and conducted extensive integration testing.

Challenge: Time constraints for delivery.

Resolution: Used Agile methodology and prioritized features using MoSCoW


analysis.

3. XPath for Sponsored Items on Amazon

//span[contains(text(),'Sponsored')]
4. Test Scenarios for Amazon Search Box

Functional: Verify the search results match the query.

Boundary: Test with maximum and minimum input length.

Performance: Measure search response time.

Negative: Input invalid data or special characters.


5. Authentication Request Method: POST or GET?
Use POST for secure authentication requests as it does not expose credentials in
the URL.

6. Common API Status Codes

200: OK

400: Bad Request

401: Unauthorized

403: Forbidden
404: Not Found

500: Internal Server Error

7. Accessibility Testing Examples

Screen readers for visually impaired users.

Keyboard navigation for mobility-challenged users.

High-contrast mode for users with low vision.

You might also like