Sdet (Software Development Engineer in Test)
40+ Sdet (Software Development Engineer in Test) Interview Questions and Answers
Q1. 4) How to send the values without using sendkeys method?
Values can be sent without using sendkeys method by directly manipulating the DOM or using JavaScriptExecutor.
Use JavaScriptExecutor to execute JavaScript code to set values of input fields.
Find the element using appropriate locators and then use JavaScriptExecutor to set the value.
Example: driver.executeScript("document.getElementById('elementId').value='text'");
Q2. 13) What is requestSpecification? What is serialization and how to achieve this?
requestSpecification is a class in RestAssured library used to define the request details for API testing.
It is used to set the base URI, path, headers, query parameters, etc. for the API request.
It allows customization of the request before sending it.
Serialization is the process of converting an object into a format that can be stored or transmitted.
In API testing, serialization is used to convert Java objects into JSON or XML format for API request or response.
To achieve s...read more
Sdet (Software Development Engineer in Test) Interview Questions and Answers for Freshers
Q3. 15) What are the things need to post a value in server?
To post a value in a server, you need to consider the endpoint, request method, headers, body, and authentication.
Identify the endpoint where the value needs to be posted
Choose the appropriate request method (e.g., POST)
Set the necessary headers (e.g., Content-Type)
Construct the body payload with the value to be posted
Handle authentication if required (e.g., API key, token)
Q4. 16) What are the exception you are facing in selenium automation?
Common exceptions in Selenium automation include NoSuchElementException, TimeoutException, and StaleElementReferenceException.
NoSuchElementException occurs when an element cannot be found in the DOM.
TimeoutException occurs when a command takes longer than the timeout value to complete.
StaleElementReferenceException occurs when an element is no longer attached to the DOM.
Other exceptions include ElementNotVisibleException, ElementNotSelectableException, and WebDriverException.
Q5. Coding 1. Sort an array 2. Count number of times each user logged in from a log file. 3. Print the name and length of each name from the same log file.
Coding questions for SDET interview
1. Use built-in sorting functions like Array.sort()
2. Read log file line by line and count occurrences of each user
3. Parse log file to extract names and use string.length to get length
Q6. 12) What is rest-assured? How to handle the certificate issues in rest-assured?
Rest-assured is a Java-based library used for testing RESTful APIs.
Rest-assured simplifies the testing of RESTful APIs by providing a domain-specific language (DSL) for writing tests.
To handle certificate issues in rest-assured, we can use the relaxedHTTPSValidation() method to bypass SSL certificate validation.
We can also import the certificate into the truststore and use it for SSL validation.
Share interview questions and help millions of jobseekers 🌟
Q7. How do you ensure a file has been transferred from one client to another over a server without any corruption?
To ensure file transfer without corruption, use checksums, error detection codes, and data validation techniques.
Calculate and compare checksums before and after transfer
Use error detection codes like CRC or MD5
Implement data validation techniques like parity checks or hash functions
Verify file integrity using digital signatures or secure hash algorithms
Q8. 1. Find triplet in an array to sum up to a given number?
Find triplet in an array to sum up to a given number.
Sort the array in ascending order.
Iterate through the array and fix the first element.
Use two pointers approach to find the other two elements that sum up to the given number.
Sdet (Software Development Engineer in Test) Jobs
Q9. 10) How to implement the test automation framework?
Test automation framework can be implemented by following these steps:
Identify the testing requirements
Choose the appropriate tools and technologies
Design the framework architecture
Develop and integrate the framework components
Create test scripts and execute them
Integrate with CI/CD pipeline
Maintain and update the framework regularly
Q10. 6) Why windowHandles method return type is set?
The windowHandles method returns a set of window handles as a set of strings.
The windowHandles method is used to retrieve all the window handles of the current session.
The return type is set because it ensures that each window handle is unique and there are no duplicates.
The set data structure allows for efficient retrieval and manipulation of window handles.
Example: Set
handles = driver.getWindowHandles();
Q11. 17) Where did you faced arrayIndexOutOfBoundary exception in your project?
I faced arrayIndexOutOfBoundary exception while accessing an array element beyond its size.
The exception occurred when trying to access an array element at an index greater than or equal to its size.
To fix it, I checked the array size before accessing its elements.
I also made sure to properly initialize the array with the correct size.
Example: String[] arr = new String[5]; arr[5] = "hello"; // throws exception
Q12. Coding: 1. Remove the duplicate characters from a string. 2. Sort an array 3. Find the indices of resulting sum. 4. Find the equilibrium point of a list/array
Coding questions related to string manipulation, array sorting, and finding indices and equilibrium point.
To remove duplicate characters from a string, use a hash set to keep track of seen characters and remove duplicates.
To sort an array, use built-in sorting functions or implement a sorting algorithm like quicksort or mergesort.
To find the indices of resulting sum, use a hash map to store the complement of each element and check if it exists in the map.
To find the equilibri...read more
Q13. Given a String encrypt it with defined Encrypt it bases on rows and column defined. Input String - One Does not simply walk Into mordor. , rows = 6, col = 6
Encrypt a given string based on rows and columns defined.
Create a 2D array with given rows and columns
Traverse the string and fill the array row-wise
Read the array column-wise to get the encrypted string
Q14. What if a reported bug is rejected by developer and not considered a bug?
Discuss with the developer and provide evidence to support the bug report.
Communicate with the developer to understand their perspective
Provide evidence to support the bug report
Collaborate with the developer to find a solution
If necessary, escalate the issue to a higher authority
Q15. 9) How to rerun the failed cases in testng?
Failed test cases can be rerun in TestNG using the 'rerun-failed.xml' file.
Create a new XML file named 'rerun-failed.xml'
Add the failed test cases to the XML file using the 'include' tag
Run the 'rerun-failed.xml' file using TestNG
Q16. IPL tournament with n teams, n >= 4, each team play with other teams twice, top four teams qualify for the playoffs, top two teams play the first playoff, 3rd and 4th teams play the second playoff, winner of 2n...
read moreFunction to determine winner of IPL tournament with n teams following given rules.
Create a matrix to store the results of each match played between teams
Calculate the total points of each team based on the results of their matches
Sort the teams based on their total points and select the top four teams
Determine the winners of the playoffs based on the given rules
Return the winner of the tournament
Example: input n=6, output 'Team X'
Q17. 18) What is jenkins? Explain the git pipeline?
Jenkins is an open-source automation server that helps to automate parts of the software development process.
Jenkins is used for continuous integration and continuous delivery (CI/CD) of software projects.
It can be integrated with Git to create a pipeline for building, testing, and deploying code.
The Git pipeline in Jenkins involves creating a Jenkinsfile that defines the stages of the pipeline, such as checkout, build, test, and deploy.
Jenkins can also be used to automate ta...read more
Q18. 7) How to priority our test cases in testng?
Test cases can be prioritized in TestNG using priority attribute.
Add priority attribute to @Test annotation
Test cases with lower priority value will be executed first
Priority can be any integer value, default is 0
Q19. How do you filter all the files in a directory that end with amazon.txt in a Unix based shell?
Filter files ending with amazon.txt in Unix shell
Use the 'ls' command to list all files in the directory
Use the 'grep' command to filter files ending with 'amazon.txt'
Combine the two commands using a pipe '|' symbol
Q20. Given two strings, find out the sub-strings that are common between both the strings and print them in nature alphabetic order.
Find common sub-strings in two strings and print them in alphabetical order.
Use a nested loop to compare each character of both strings.
Store common sub-strings in an array.
Sort the array in alphabetical order.
Print the sorted array.
Q21. What is Abstract Class and Interface? Difference between both.
Abstract class is a class that cannot be instantiated and Interface is a blueprint of a class.
Abstract class can have both abstract and non-abstract methods while Interface can only have abstract methods.
A class can implement multiple interfaces but can only inherit from one abstract class.
Abstract class can have constructors while Interface cannot.
Abstract class can have instance variables while Interface cannot.
Abstract class is used for code reusability while Interface is ...read more
Q22. SQL query to get second largest salary of an employee from employee table
SQL query to get second largest salary of an employee from employee table
Use ORDER BY and LIMIT to get the second highest salary
SELECT MAX(salary) FROM employee WHERE salary < (SELECT MAX(salary) FROM employee)
Use subquery to get the highest salary and then exclude it to get the second highest salary
Q23. 8) How to achieve the parallel testing?
Parallel testing can be achieved by dividing test cases into smaller chunks and running them simultaneously on multiple machines.
Divide test cases into smaller chunks
Use a test framework that supports parallel testing
Run tests on multiple machines or virtual machines
Ensure tests do not interfere with each other
Aggregate test results from all machines
Q24. SQL query of finding aggregate salary for the division
SQL query to find aggregate salary for a division
Use the GROUP BY clause to group the employees by division
Use the SUM function to calculate the total salary for each division
Include the division column in the SELECT statement
Example: SELECT division, SUM(salary) AS total_salary FROM employees GROUP BY division
Q25. List out all the test scenarios that needs to be covered to ensure a mobile application is ready for release.
List of test scenarios for mobile app release
Functional testing of all features
Usability testing for ease of use
Compatibility testing on different devices and OS versions
Performance testing for speed and responsiveness
Security testing for data protection
Localization testing for language and cultural differences
Regression testing to ensure no new bugs introduced
Accessibility testing for users with disabilities
Q26. 19) Explain the git flow in your project?
Git flow is a branching model for software development.
Git flow consists of two main branches: master and develop.
Feature branches are created off of develop and merged back into it.
Release branches are created off of develop for preparing a new release.
Hotfix branches are created off of master to fix critical issues in production.
Git flow helps to maintain a structured and organized workflow for development.
Example: git flow init, git flow feature start
, git flow release st...read more
Q27. 11) Difference between http and https?
HTTP is a protocol for transmitting data over the internet, while HTTPS is a secure version of HTTP that encrypts the data.
HTTP stands for Hypertext Transfer Protocol, while HTTPS stands for Hypertext Transfer Protocol Secure.
HTTP operates on port 80, while HTTPS operates on port 443.
HTTP is not secure and data is transmitted in plain text, while HTTPS uses SSL/TLS encryption to secure the data transmission.
HTTPS is commonly used for secure transactions, such as online bankin...read more
Q28. how to reverse the link list? find all possible sub sequences in a given array
Reverse a linked list and find all possible subsequences in a given array.
To reverse a linked list, iterate through the list and change the next pointers of each node to the previous node.
To find all possible subsequences in an array, use recursion and generate all possible combinations of elements.
For example, given the array [1, 2, 3], the possible subsequences are [], [1], [2], [3], [1, 2], [1, 3], [2, 3], [1, 2, 3].
Q29. Find sub sudoko in given multi dimensional int. array
Finding sub sudoko in a multi-dimensional integer array.
Iterate through each row and column to find sub-sudoku
Check if each sub-grid contains all numbers from 1 to 9
If yes, then it is a sub-sudoku
If no, then move to the next sub-grid
Q30. 21) Explain the extent reports config?
Extent Reports Config is a Java library used for generating interactive HTML reports for test automation results.
Extent Reports Config is used to customize the look and feel of the generated reports.
It allows users to add or remove report sections, change report themes, and configure report settings.
Users can also add custom logos, CSS, and JavaScript to the reports.
Extent Reports Config can be integrated with various testing frameworks like TestNG, JUnit, and Cucumber.
It pro...read more
Q31. Difference between Abstract class vs Interface?
Abstract class is a class that can have both abstract and non-abstract methods while Interface only has abstract methods.
Abstract class can have constructors while Interface cannot.
A class can implement multiple interfaces but can only inherit from one abstract class.
Abstract class can have instance variables while Interface cannot.
Abstract class can provide default implementation for some methods while Interface cannot.
Example of Abstract class: Animal class with abstract me...read more
Q32. Give an example of operator overloading in protactor
Operator overloading is not applicable in Protractor as it is a JavaScript testing framework.
Protractor is a JavaScript testing framework and JavaScript does not support operator overloading.
Operator overloading is a feature of object-oriented programming languages like C++ and Java.
In languages that support operator overloading, operators like +, -, *, / can be overloaded to work with custom objects.
However, in JavaScript, these operators work only with primitive data types ...read more
Q33. What are mutable and immutable objects?
Mutable objects can be changed after creation, while immutable objects cannot be changed.
Mutable objects: lists, dictionaries, sets, byte arrays, etc.
Immutable objects: numbers, strings, tuples, etc.
Changing a mutable object affects all references to it, while changing an immutable object creates a new object.
Immutable objects are often used for keys in dictionaries and elements in sets.
Q34. 5) Collections used in selenium
Collections used in Selenium include List, Set, and Map.
List is used to store a collection of elements in a specific order.
Set is used to store a collection of unique elements.
Map is used to store a collection of key-value pairs.
Examples include List
, Set , and Map .
Q35. Tell the output of given code
Cannot answer without the code provided.
Need to see the code to determine the output.
Output may vary depending on the code.
Cannot provide an answer without more information.
Q36. Difference between isDisplayed and isPresent?
isDisplayed checks if element is visible on the page while isPresent checks if element is present in the DOM.
isDisplayed returns true only if the element is visible on the page and has a height and width greater than 0.
isPresent returns true if the element is present in the DOM, regardless of whether it is visible or not.
isDisplayed throws an exception if the element is not present on the page while isPresent does not.
isDisplayed is a method of WebElement interface while isPr...read more
Q37. Write code to find number of duplicate characters
Code to find number of duplicate characters in an array of strings
Loop through each string in the array
Loop through each character in the string and count its occurrence
If occurrence is greater than 1, increment the count of duplicate characters
Q38. 14) Status codes in API's?
Status codes are used in API's to indicate the outcome of a request.
Status codes are three-digit numbers that are returned by the server in response to a client's request.
They indicate whether the request was successful or not, and if not, what went wrong.
Some common status codes include 200 (OK), 404 (Not Found), and 500 (Internal Server Error).
Q39. 20) Explain the excel reading?
Excel reading involves extracting data from an Excel file using programming languages.
Excel files can be read using libraries like Apache POI, OpenPyXL, and xlrd.
Data can be extracted from specific cells or entire sheets.
Excel files can be read in various formats like .xls, .xlsx, and .csv.
Q40. Test cases for image upload feature
Test cases for image upload feature
Verify that the image upload button is functional
Test uploading different file formats (jpg, png, gif)
Test uploading large files and verify that they are uploaded successfully
Test uploading files with special characters in the file name
Test uploading multiple images at once
Verify that the uploaded image is displayed correctly on the page
Q41. Sort a array and maintain order
Sort an array of strings while maintaining the original order.
Create a map of each string to its original index in the array.
Sort the array of strings.
Use the map to reorder the sorted array based on the original order.
Q42. Test cases for buying a pen
Test cases to ensure successful purchase of a pen
Verify that the pen is added to the cart
Check that the correct quantity of pens is added
Ensure that the correct price is displayed
Test the payment process
Verify that the order confirmation page is displayed
Q43. Define the parameters in protractor.conf.js
Parameters in protractor.conf.js are used to configure Protractor for running tests.
The 'specs' parameter specifies the location of the test files.
The 'capabilities' parameter defines the browser and platform to run the tests on.
The 'baseUrl' parameter specifies the base URL for the application being tested.
The 'onPrepare' parameter is used to set up the test environment.
The 'framework' parameter specifies the testing framework to use.
The 'jasmineNodeOpts' parameter is used t...read more
Q44. Print second largest element in an array
Print the second largest element in an array of strings
Sort the array in descending order and print the second element
Iterate through the array and keep track of the two largest elements
Use a priority queue to find the second largest element
Q45. 2. Print a star pattern?
Printing a star pattern using loops in programming.
Use nested loops to print the pattern
The outer loop controls the number of rows
The inner loop controls the number of stars to be printed in each row
Use string concatenation to build the pattern
Example: for a pattern with 5 rows, the first row will have 1 star, the second row will have 2 stars, and so on
Q46. Explain Software Testing Lifecycle?
Software Testing Lifecycle is a process of verifying and validating software applications before release.
STLC involves planning, designing, executing, and reporting of tests.
It includes test case creation, test execution, and defect tracking.
STLC ensures that the software meets the specified requirements and is of high quality.
It consists of various phases such as requirement analysis, test planning, test design, test execution, and test closure.
STLC is an iterative process t...read more
Q47. Test cases for a login page
Test cases for a login page
Verify successful login with valid credentials
Verify error message displayed with invalid credentials
Verify password field is masked
Verify 'forgot password' link redirects to password reset page
Verify 'create account' link redirects to registration page
Q48. Find the max element in the array
Find the max element in the array
Iterate through the array and compare each element with a variable storing the current max value
Use built-in functions like Math.max() or spread operator to find the max value
Consider edge cases like empty array or array with negative values
Q49. Kth element in list from back
Find the Kth element from the end of a linked list.
Traverse the linked list to find its length.
Subtract K from the length to get the index of the Kth element from the end.
Traverse the linked list again to find the Kth element from the end.
Top Interview Questions for Sdet (Software Development Engineer in Test) Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month