Add office photos
Engaged Employer

Capgemini

3.8
based on 38.8k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

10+ Peacock Engineering Interview Questions and Answers

Updated 4 Dec 2024
Popular Designations

Q1. Wait in selenium and exception in selenium

Ans.

Explanation of wait and exception handling in Selenium

  • Wait in Selenium is used to pause the execution of the script for a certain amount of time

  • There are two types of waits: Implicit and Explicit

  • Exception handling in Selenium is used to handle unexpected errors during the execution of the script

  • Common exceptions in Selenium include NoSuchElementException and TimeoutException

  • Handling exceptions can be done using try-catch blocks or by using TestNG annotations

Add your answer

Q2. What is throw and throws in Java?

Ans.

throw is used to throw an exception in Java, while throws is used to declare exceptions that a method can throw.

  • throw is used to explicitly throw an exception in Java code

  • throws is used in method signature to declare the exceptions that the method can throw

  • Example: throw new Exception("Something went wrong!");

  • Example: public void someMethod() throws IOException {}

Add your answer

Q3. Real time process with selenium examples

Ans.

Real-time process with Selenium involves continuous monitoring and updating of web pages.

  • Use implicit and explicit waits to ensure real-time updates

  • Implement continuous integration and delivery to automate testing

  • Use Selenium Grid to run tests in parallel for faster execution

  • Examples include monitoring stock prices, social media feeds, and live sports scores

Add your answer

Q4. Difference between @BeforeMethod vs @BeforeTest

Ans.

The @BeforeMethod annotation is used to run a method before each test method in a class, while @BeforeTest is used to run a method before any test method in a test tag.

  • The @BeforeMethod annotation is specific to TestNG framework and is used to initialize test data before each test method.

  • @BeforeTest annotation is also specific to TestNG and is used to initialize test data before any test method in a test tag.

  • If a class has multiple test methods, @BeforeMethod will run before ...read more

Add your answer
Discover Peacock Engineering interview dos and don'ts from real experiences

Q5. Array based program: reverse the string

Ans.

Reverse a string using an array of characters.

  • Create an array of characters to store the string.

  • Iterate through the string and store each character in the array.

  • Reverse the array of characters to get the reversed string.

Add your answer

Q6. What is automation testing

Ans.

Automation testing is the use of software tools to execute tests and compare actual outcomes with expected outcomes.

  • Automation testing involves writing scripts or using tools to automate repetitive tasks in testing.

  • It helps in reducing human errors and increasing efficiency.

  • It can be used for various types of testing such as functional, regression, performance, and load testing.

  • Examples of automation testing tools include Selenium, Appium, and JUnit.

Add your answer

Q7. Oops concepts in Java

Ans.

Oops concepts are fundamental to Java programming and include inheritance, polymorphism, encapsulation, and abstraction.

  • Inheritance allows a class to inherit properties and methods from a parent class.

  • Polymorphism allows objects to take on multiple forms and behave differently based on their context.

  • Encapsulation hides the implementation details of a class and only exposes necessary information.

  • Abstraction allows for the creation of abstract classes and interfaces that can be...read more

Add your answer

Q8. Why testng was used

Ans.

TestNG was used for automated testing in order to facilitate easy test case management, parallel execution, and reporting.

  • TestNG allows for easy grouping and prioritization of test cases.

  • It supports parallel execution of test cases, improving efficiency.

  • TestNG provides detailed test reports, making it easier to identify and debug issues.

  • Annotations in TestNG help in defining the test methods and their dependencies.

  • TestNG integrates well with other tools and frameworks like Se...read more

Add your answer

Q9. String Buffer VS Builder

Ans.

String Buffer is synchronized and slower, while StringBuilder is unsynchronized and faster.

  • StringBuffer is thread-safe, while StringBuilder is not.

  • StringBuffer is slower due to synchronization, while StringBuilder is faster.

  • StringBuilder is preferred for single-threaded environments.

  • StringBuffer is preferred for multi-threaded environments.

  • Both classes are used for manipulating strings, but StringBuilder is more efficient.

Add your answer

Q10. explain the framework

Ans.

A framework is a set of guidelines, coding standards, concepts, and practices to help automate testing efficiently.

  • Framework provides a structure for organizing test scripts, data, and reusable components.

  • It helps in maintaining consistency and reusability of test scripts.

  • Frameworks can be data-driven, keyword-driven, or hybrid depending on the requirements.

  • Examples of frameworks include Selenium WebDriver, TestNG, JUnit, etc.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Peacock Engineering

based on 10 interviews in the last 1 year
1 Interview rounds
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Automation Engineer Interview Questions from Similar Companies

3.8
 • 17 Interview Questions
3.8
 • 11 Interview Questions
3.6
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter