CTS Cognizant Interview Questions

Cognizant Technology Solutions Overview

  • Teaneck, NJ (US)
  • 10000+ employees
  • 1994
  • Public (CTSH)
  • Consulting
  • ₹500+ billion
  • Accenture

Cognizant Interview Questions: The most essential part of preparing for a CTS interview is practice. Knowing what job interview questions you might be asked is essential that way, you can craft your answers well in advance and feel confident in your responses when the pressure is on.

Wouldn’t it be great if you knew precisely what interview questions are asked for the Test Engineer QA for Manual & Automation Positions? Unfortunately, we can’t read minds, but we’ll give you the next best thing: a list of previously asked Cognizant interview questions and answers.

Post On:CTS Cognizant Interview Questions
Post Type:Interview Questions
Published On:www.softwaretestingo.com
Applicable For:Freshers & Experience

We have tried to share some of the manual testing interview questions, selenium interview questions & testing interview questions also, but we are recommending spending some quality time to get comfortable with what might be asked when you go for the CTS Interview Questions.

Still, we need your love and support to make this platform more helpful to our fellow testers. So, it would be great if you shared your recent interview questions and experiences with us. You Can share those details by connecting with us at softwaretestingo.com@gmail.com.

Cognizant Automation Testing Interview Questions

Company Name: Cognizant
Position: Automation Test Engineer
Experience: 3 Yrs
Updated on: 01.08.2023

  • Self Introduction
  • What is the final keyword and usage?
  • StringBuilder vs StringBuffer
  • What is a constructor and its usage?
  • What is the wrapper class and its usage?
  • Set vs List.
  • What are collections?
  • What is NullPointerException and how to handle it?
  • WAP to find the common elements from the 2 integer arrays

Company Name: Cognizant
Position: Automation Test Engineer
Experience: 3 Yrs
Updated on: 01.07.2023

  • Introduction
  • Day-to-day activities
  • Comfortable with Manual or Automation Testing
  • Explain the Testing performed in the Manual testing project
  • Explain the Automation Testing framework
  • Explain agile processes and day-to-day activities
  • What Repo did you use in your project
  • How did you push and pull your code to Remote
  • Can we use another Framework instead of just POM?
  • Explain the difference between Implicit and Explicit wait.
  • You have written an automation script. It runs sometimes, and sometimes it gets stuck. What may be the reason, and how do you solve this?
  • Absolute XPath vs Relative XPATH. Which is preferred to be used and why?
  • Different methods in XPath
  • Suppose there are 2 login buttons, one in the header and 2nd on the footer. Both have the same property. How do we access the 2nd login button using XPath?
  • The difference between Method Overload and Overriding
  • How did you utilize the Overload and Override in Automation?
  • When should we use implicit wait, and when should we use explicit wait?

Company Name: Cognizant
Position: Test Engineer
Company Location: Chennai
Experience: 6 Yrs
Shared By: Nathiya
No Of Rounds: 2
Updated on: 30.10.2021

Questions:

  • Self-introduction
  • Alpha and beta testing
  • Agile working experience and related questions
  • Jira and related questions
  • Domain knowledge questions
  • Advantages of TestNG
  • What is POM
  • TestNG annotation hierarchy
  • How to use groups in TestNG and how to use
  • Format of TestNG
  • Xpath in selenium
  • Locators in selenium
  • Other basic selenium questions
  • Diff b/w RPA and automation

Company Name: Cognizant
Position: Programmer Analyst
Company Location: Hyderabad
Experience: 3 Yrs
Shared By: Venkata Kushal
No Of Rounds: 2
Updated on: 30.10.2021

Experience
I was referred by one of the consultants. Once Referred, I received an email from Cognizant within 4 days to prepare for my technical interview. A day before the interview, I received a call from HR about the timing and availability.

The interviewer was very casual and told me about the requirements that they were looking for. The technical interview went on for 25-30 minutes, and at last, he signed off by saying he would speak with HR and get back to me.

I received a call from HR once I submitted all the requested documents regarding salary negotiation and other basic HR questions.

Questions:

  • Tools, domain, and Technologies in which I worked in my experience.
  • Frameworks which I worked on in my previous project.
  • Difference between HP-UFT and selenium.
  • Defect life cycle process – asked for a detailed explanation (this question itself I explained for 5-7 mins)
  • Selenium – what are your actions, and how will you handle the select dropdown? Which is faster, CSS or Xpath?
  • Why TestNG is used in the testing framework?
  • Explain the difference b/w regression, smoke, sanity testing
  • Basic Java Questions.
  • Why are you looking for a job change?

Company Name: Cognizant
Position: Sr. Test Engineer
Company Location: Bangalore
Experience: 6.7 Yrs
Shared By: Narmadha
No Of Rounds: 3
Updated on: 30.10.2021

3 rounds in Capgemini and 2 rounds in Cognizant.

Questions

  • Since I am in the insurance – Guidewire domain, most of the questions were domain-specific.
  • A few questions are about the Agile process and Test management, such as how to give an estimation.
  • How will you manage if you get high-priority defects in the end?
  • What are the test design techniques followed in your company?
  • Explain the high-level documents prepared for your project.
  • How do you handle regression and exploratory testing?
  • How will you handle a team?

Company Name: COGNIZANT
Position: Test engineer
Company Location: Chennai
Experience: 6 Yrs
Shared By: Aditi Kumari
No Of Rounds: 2
Updated on: 30.10.2021

  • Self-introduction
  • Alpha and beta testing
  • Agile working experience and related questions
  • Jira and related questions
  • Domain knowledge questions
  • Advantages of TestNG
  • What is POM
  • TestNg annotation hierarchy
  • How to use groups in TestNG and how to use
  • Format of TestNG
  • Xpath in selenium
  • Locators in selenium
  • Other basic selenium questions
  • Diff b/w RPA and automation

Company Name: COGNIZANT
Position: Automation tester in Capital Market
Company Location: Bangalore
Experience: 8 Yrs
Shared By: Aditi Kumari
No Of Rounds: 2
Updated on: 30.10.2021

Good Experience. Focus on Basics.

It was a good learning experience. Be confident about how much you know and convey how much you know about a certain topic. Be straightforward if you have not worked on something but are open to learning and implementing it if required.

Questions

  • Self-introduction
  • How do you rate yourself in Java
  • Access Modifiers in Java
  • Diff in Interface and Abstraction
  • Constructor
  • Getters & Setters.
  • Exception Hierarchy
  • Will the program run if there is a try and no catch block is there, and can we catch the exception in the final?
  • Project explanation layer by layer.
  • How do you handle exceptions in your project?
  • Collections: HashMap, Lists, ArrayList
  • Other basic selenium questions –
  • Select Class and Usage
  • Waits in Selenium
  • Code: Open Google and search Lovers. When the page proceeds, print all the links on that page.
  • reports on test ng
  • IListener class
  • Maven Life cycle.
  • Management Tool.
  • How do you provide developers with the info regarding the defect you have raised?

Interview Location: Bangalore, India
Interviewed Date: 03/12/2021
Source: SoftwareTestingo Comment Section
Updated Date: 05.12.2021

  • Introduce your experience in Manual Testing.
  • What is SDLC?
  • What is a Defect life cycle?
  • What is the difference between Smoke and Sanity Testing?
  • Explain Hands-on experience on HP-ALM.
  • Can a Test execution have multiple runs? If so, What are the scenarios?
  • What is Risk Assessment?
  • What is Root Cause Analysis and what are the methods/ techniques to do it?
  • What is Fishbone Analysis?
  • What is Risk-based testing?
  • What is the difference between Regression testing and Re-testing?
  • What is a V-model? Explain.

Interview Location: Coimbatore, India
Updated Date: 09.11.2021

  • What test management tools have you used?
  • How do you integrate your tests in ALM?
  • Why do we use breakpoints?
  • Mention some exceptions you faced and how you overcame them.
  • Explain the complete functioning of the page object model.
  • How do you store objects in an object repository?
  • Why did you choose cucumber?
  • What are the prerequisites to automate an application?
  • How do you handle multiple windows?
  • The difference between assert and verify
  • Where did you store data? How do you use that Excel?
  • What metrics do you collect at the end of each sprint?
  • What is WebDriver?
  • Absolute vs Relative XPath. When do you use each of them?
  • Can you run parallel tests in 2 different browsers? If yes, how?
  • Explain scrum ceremonies.
  • Explain your role in CI / CD
  • Can you work alone in a team of functional testers? How comfortable are you with modifying your framework?
  • Team size and do you have direct client interaction?

Interview Location: Bangalore
Experienced: 3-6 Years
Updated Date: 09.11.2021

  • Tell me about the frameworks you use in your project
  • What are collections in Java
  • How do we do parallel execution of a scenario in testNG
  • What are the annotations in TestNG
  • Is constructor overloading possible for static classes?
  • What is the step definition in cucumber?
  • What do you mean by hooks in Java?
  • Difference between throw, throws, throwable
  • Can you declare an abstract class as final?
  • Suppose you have to create a dropdown using selenium WebDriver how would you do (there should be no duplicates)
  • Tell me about the logic for string palindrome
  • How can you split a character having a combination of string, special characters, and numbers?
  • What is XPath?
  • Find elements and elements?
  • What is the difference between the Abstract Class and the interface?
  • Which type of locators are you using for selenium?
  • What is an Abstract class?
  • What is the final keyword?
  • What is a Constructor?

Interview Location: Bangalore
Updated Date: 12.10.2021

  • Difference between page factory and page object
  • ROI
  • What exceptions would be if there is no element when we use findElement() and list of findelElements()?
  • What is the purpose of TestNG?
  • How do you handle window popups?
  • What is collection
  • Difference between list and set
  • How do u use dropdown in selenium
  • If the developer comes and there is no more reproducible defect, what will you do if it is reproducible in your machine? How will you convince the developer?
  • What are the exceptions in selenium webDriver?
  • How do you see reports in TestNG
  • Order of annotations in TestNG
  • Where you use the URL of I want to execute 100 test cases for applications Testng annotation
  • What is the advantage of page factory
  • Feature for cucumber
  • If there are 100 test cases to automate, what is your approach
  • How do you execute tests priority-wise
  • Method overloading and how do you use that
  • How do you use superclass
  • What are all the oops concepts used in your project
  • How do we resolve the element click intercepted exception?
  • You have to write test cases for a scenario that says the website is under maintenance from 12-2 pm. Write test steps.
  • From the list of employee tables, you have to change the salary of the employee to 10000, whose name starts with A.

Company Name: Cognizant
Company Location: Chennai, India
Updated on: 18.03.2020

  • Tell me about yourself
  • Project details
  • Current role
  • What is API?
  • Request method In Postman
  • How do you cover end-to-end API Testing
  • Use of API
  • Why Selenium?
  • Banking domain
  • Retail, corporate, investment banking
  • Agile (Kansan)
  • SIT and Regression Testing
  • Use of it
  • Integration Test, smoke Testing, and sanity testing in your project
  • Defect Lifecycle, SDLC, STLC

Company Name: Cognizant
Company Location: Pune, India
Updated on: 18.03.2020

  • Tell abt urself
  • End-to-end testing
  • Defect cycle
  • How to customize the complexity of testing
  • How to prioritize test case
  • Exception handling types
  • Xpath types
  • Locators
  • Inheritance
  • Class and interface difference
  • Abstract
  • different Wait types
  • Framework use in a project
  • Challenges faced recently in the automation project

Company Name: Cognizant
Company Location: Noida, India
Updated on: 18.03.2020

  • Why the main method is static?
  • What is Run time polymorphism
  • Difference between list and set
  • Method overloading and overriding
  • Use of constructor
  • Difference between static and non-static methods
  • How to write XPath of column ‘B value using column ‘a text
  • How to handle drag and drop
  • How to handle multiple windows
  • What are the TestNG annotations used
  • Which annotation is used for parameterization
  • About Maven – clean build
  • Git workflow
  • What is Jenkins and how to set up it

Company Name: Cognizant
Company Location: Hyderabad, India
Updated on: 18.03.2020

  • Tell me about yourself.
  • Framework?
  • Can we declare many interface object classes inside the interface class
  • Types of the assertion.
  • What is the difference between assert and verify?
  • How do you pass text in the Gmail field?
  • test-NG annotations.
  • J unit annotations.
  • Interface in java
  • Abstraction in java
  • What are the methods in TestNG?
  • Exceptions in automation.
  • SQL where clause, aggregation, group.
  • Integration testing.
  • Unit testing.
  • How will you double-click on a web element?
  • Difference between override and overloading.
  • What is a super keyword in Java?
  • What is git and its use?
  • Difference between break and continue statement.
  • What will you do if, after the release of the software, the particular thing works fine but does not work one day after release? What action will you take?

Company Name: Cognizant
Company Location: Bangalore, India
Updated on: 18.03.2020

  • Abstraction & where it is used in your project?
  • Diff between Abstract class & interface?
  • What is a static keyword in Java?
  • What method is Overloading & Overriding?
  • Wait & Implicit and explicit wait? How to user thread.sleep(time 10000)
  • How do you handle the drop-down list?
  • Have you used the action class, and where is it used?
  • What is Maven Architecture? Can you explain pom.xml?
  • TestNG, what are the annotations used?
  • BDD framework?
  • Explain the cucumber framework.
  • What are locators in selenium?
  • Git Hub Commands? version controlling
  • Absolute and Relative Xpath?
  • What are the exceptions that occurred while using the Selenium web driver?
  • What is the difference between throws and thrown?
  • How do you handle exceptions?
  • How many times can you write catch block?
  • When will the Finally block get executed?
  • What is the difference between POST & PUT?

Company Name: Cognizant
Company Location: Etrade, Menlo Park, CA
Updated on: 16.03.2020

  • Tell me about your experience.
  • How will you design a framework to validate our service?
  • How will you validate dynamic response?
  • What are serialization and deserialization?
  • Is there any specific utility to import to serialize the object?
  • How would you validate the complex JSON response?
  • By sharing your screen, can you write a POJO class?
  • Write a program to reverse a string.
  • What is the difference between checked and unchecked exceptions?
  • What is the difference between close and quit in selenium?
  • Apart from send-keys, are there any different ways to type content onto the editable field?

Company Name: Cognizant
Company Location: Pune, India
Updated on: 16.03.2020

  • Limitations of using Appium?
  • How to find DOM element or xPath in a mobile application
  • What are the possible errors one might encounter using Appium?
  • What are the most difficult scenarios to test with Appium?
  • How to run only 100 test cases

Company Name: Cognizant
Company Location: Coimbatore, India
Updated on: 16.03.2020

  • Defect cycle
  • Difference between relative and absolute
  • RTM
  • Describe INS Testing process experience :
  • How did you automate the screen?
  • What Type of framework did you use? Can you please write the code assuming specific objects – how did you code for the drop-down? What is the benefit of using a framework – describe the components that you used with code examples
  • Did you work on API testing, how did you automate the API validation – explain with code examples
  • Did you work on DB testing, what kind of databases, and how did you automate? explain with code samples
  • Did you work with calculation testing?
  • Do you have experience in Java? talk about the practical application of superclass and sub-class in your code, the similar question on Polymorphism
  • Give an example of a complex SQL query that you developed – talk about the business elements there
  • Have you worked with BDD/AGILE – can you describe the code setups in a BDD environment for your script

Company Name: Cognizant
Interview Location: Bangalore, India
Experience: 1-2 Years

Round 1( Offline round with time limit 16 hours )

Create an automation framework using Appium to automate the process of purchasing 65 65-inch TVs using the Amazon mobile app. The item to be selected has to be random in each run. The code should handle scrolling in the App. The framework should be TDD and(or) Keyword-driven. The code should also have reporting and logging functionality

Round 2( Webex interview )

  • Explain the framework created in detail.
  • You have kept all Xpaths in a properties file; why not keep them in page classes? Explain why this approach was chosen.
  • What is a Regression testing
  • Write a program to print the duplicate characters in a string
  • Which version of Java have you worked on
  • What is a singleton class?
  • What is a lambda expression?
  • How will you configure the project in the CI and CD pipeline?
  • I see you have worked on TOSCA and Selenium. What is the difference between them?

Round 3 ( Client interview )

I will post the question after the interview


Interview Location: Bangalore, India
Experience: 1-2 Years

  • About urself
  • Tell Cucumber options
  • Hooks in cucumber
  • Cucumber reports
  • Why was the Background keyword used
  • About Git –command you can use to write a commit message?
  • How to resolve conflicts while committing code
  • How to get a particular branch code from git
  • Pull, push, fetch, and other commands
  • BitBucket
  • Program to retrieve Excel data
  • Which jar ur using for Excel
  • Properties file – how to retrieve data from property file code syntaxes
  • Collections(HashMap lo put anedi lekapothe em vadatav)
  • Set, List – difference (how you used in selenium)
  • Abstract and encapsulation difference
  • What are the interface and abstract class differences, and what keywords are used for both to inherit?
  • ‘if we don’t want to change the variable value, then what should we use – final keyword
  • This is a class with a parameterized constructor that takes 2 arguments(username and password). How should you call this constructor from the main class?
  • Program: Web table with 3 columns and 4 rows. I need 2nd column rows to be sorted and get the 4th-row value
  • Steps to connect to DB and retrieve data from DB – Code steps
  • API – How to retrieve data for a child from the parent tag
  • What are the exceptions faced during API testing

Company Name: Cognizant
Interview Location: Bangalore, India
Experience: 4 Years

Written Test:

  • Print numeric values from the string
  • Print common elements from two arrays
  • Print possible combinations of a given string
  • Write the XPath based on first name and last name
  • Get all the values from the drop-down and print duplicates

First Round:

  • Swapping of two integers with and without using a third variable
  • About get requests using rest assured framework by providing URL JSON data and authentication and validating the proper response and particular value using key
  • Types of locators
  • Name some of the libraries in Python as I have mentioned python in my resume.
  • Where do u maintain test data?
  • Bug tracking tool
  • Introduction

Second Round:

  • Reverse the string without using loops and without using predefined functions like string buffer or builder
    Ans: told in python
    After I said that we could do that in Python, he asked me to write it in a single line.
  • Print triangle patterns like 1,12112321, etc. He does not remember the exact output, but he asked about triangle patterns.
  • An array consists of the number of elements that may be repeated and not sorted.

The output should be :

  • Pair two elements such that the difference in pair should be 1, and the element, once paired, shouldn’t be paired with other elements.
  • Can we overload and override the main method?
  • Can abstract classes have final private modifiers?
  • Can we extend the interface class?
  • Can we implement two interfaces?
  • What are the constructors and Types of constructors?
  • Explain, oops, concepts.
  • What is the use of a constructor?
  • Can we write a static modifier in an abstract class?

Third Round:

  • Introduction
  • Explain the following and the preceding sibling
  • How do you sort the list without using predefined methods?
  • Explain System.out.println
  • Explain webDriver driver = new chromeDriver()
  • Difference between rest and soap
  • How do u modify JSON data and also provide authentication for an API request?
  • Difference between Python and Java
  • If the rows and columns in a web table change dynamically when you refresh the page, get the particular element from the third row and third column.
  • About SQL queries
  • What is a self-join?
  • What left join
  • How do you automate API test cases?
  • How do you handle Windows authentication popups?

Technical manager round:

  • I have gone through the skills that I have mentioned in my resume.
  • Write the logic for the split function.
  • Sort the string, like India, Japan, Europe, etc., in ascending order.
  • They asked me about status codes 504,204,400 and also some certifications used in security, as I mentioned API testing in my resume.
  • Asked me about project-related questions

Company Name: Cognizant (CTS)
Experience Level: 2 Years
Location:  Bengaluru
Mode: F2F
Rounds: 2 rounds
Date: Sep – 2019

First Round:

  • Features of Java.
  • Explain the four pillars of OOPS.
  • What is static and non-static?
  • What is the final keyword?
  • What is the difference between this and super?
  • What is the difference between length and length() in Java?
  • What is an abstract class?
  • What is the interface?
  • What is the difference between a List and a Set?
  • What is the use of the Map?
  • How do you launch a browser in Selenium?
  • How to delete cookies?
  • Write a program to find the duplicates in an array.
  • There is an array of numbers and a number key. The array contains that key. Rearrange the array in an order where the left side elements of a key are smaller than the key and the right side elements are greater than the key.

Second Round:

  • Annotations in TestNG
  • Which reporting tool did you use in Framework?
  • Explain the flow of your framework.
  • What is your contribution to your framework?
  • What is StaleElementException?
  • What are the waits available in Selenium?
  • Limitations of Selenium?
  • If not Selenium, which tool do you prefer?
  • What is the difference between Actions and Actions?
  • How do you handle keystrokes in Selenium?
  • How do you handle alerts in Selenium?
  • You have a link to the main window. When you click on that link, it opens 3 new windows. One of the windows consists of an iframe. How will you navigate there?
  • A website’s home page has five tabs. You need to navigate to each tab and verify that the page is loaded. Write optimal logic.
  • What is a dry run in Cucumber?
  • Annotations in Cucumber

Interviewers asked questions about Java and Selenium. Both rounds were 45 minutes long. The first round mainly consisted of Java questions, while the second round focused on Selenium.


Interview Location: Bangalore, India
Round: Technical

  • What Different types of locators are available in selenium?
  • What are the severity and priority?
  • Explain your framework
  • Difference between findElement() and findElements().
  • Write sorting program
  • Write Swapping of numbers
  • What is a retrospective meeting?
  • Write dynamic x path
  • Explain the bug life cycle, and if the developer is not accepting that bug, then who to resolve that issue
  • Without having an attribute, write the XPath for text.
  • Why string is immutable
  • Why you are using a file buffer reader

Source: SoftwareTestingo Comment


Interview Location: Bangalore, India
Round: Technical

  • Brief about yourself?
  • Explain the automation cycle.
  • Explain the automation framework.
  • How do you handle multiple windows?
  • How do you handle alert popups?
  • How do you handle frames?
  • Explain about oops concepts.
  • What is the difference between collections and ArrayList?
  • What is the difference between the list and the set?
  • What is the difference between the final and the Finally?
  • Where do you store this framework?
  • Where do you store the script and data regarding the framework?
  • Where do you write the test cases?
  • Where do you create the framework?
  • Automation test life cycle
  • Where do you store the framework-related data?

Interview Location: Bangalore, India
Round: Technical
Updated: May 2023

Thanks To Sagarika for Sharing the interview Questions. She is attending the QA position at Cognizant company [Manyata Tech Park Bangalore]. If you want to share like her, then you can comment in the comment section, or you can use our Contact Us page. The First round is the programming round, and here are the questions:

  • Write a method that returns a boolean to check elements present on a webpage.
  • Program-related to webtable.
  • Write a program using a hashmap to add and retrieve data and print it in the console.
  • Write a program using exception handling to click on a button.
  • Issues faced in ie browser
  • Write code for scrolling horizontally
  • Write a code for handling multiple windows that has an upload option in the second window
  • Have u used an action class? Where you have used the Action class? Write code for the same
  • What is multilevel inheritance? Where do you have used your framework?
  • Difference between JUnit and TestNG
  • How do u perform parallel testing in TestNG?
  • Explain ur role in the current project
  • What about your productivity
  • When will u do regression testing?
  • How will u start work when there is a story assigned to u
  • What is a retrospective meeting?
  • If a sprint is 2 weeks, what about the automation life cycle

Interview Location: Bangalore, India
Updated: 03.03.2019

  • What is the test design you have used to write test cases?
  • Explain SDLC.
  • What are your roles and responsibilities for automation?
  • Why Set<Iterator> you have used for handling window Handles
  • What kind of dependencies you have added in the Maven, and for what
  • Explain driver.getWindowHandles() in detail how it will function.
  • what is the glue in BDD cucumber?
  • How do you do parallel testing in BDD cucumber?
  • Explain the Maven Install command in Maven

Interview Location: Bangalore, India
Round: Technical
Experience: 1-3 Years

Selenium Questions

  • Tell me about your roles and responsibilities.
  • What framework u use. (We use DataDriven, told the same).
  • Explain your framework.
  • What jars do you use for data-driven? (We use Apache POI to read and write in Excel.)
  • What is @DataProviders
  • Tell me some more annotations in TestNG
  • What is Maven, and how u use it in your project?
  • How u use Jenkins in your project?
  • Questions about XPath.
    Scenario: When we have many identical Xpaths and need to select a particular one, what do we do?
  • Questions about window handles and Iframe.
  • Questions about JS executor
  • How you can scroll using JS.
  • What is the Page Object Model? How are you using it in your project?
  • How do you take a screenshot of the failed test case?

Java Questions

  • What is Abstraction? How to achieve abstraction.
  • Explain public static void main()
  • Difference b/w List & set, HashSet & Hashtable,throw & throws,checked & unchecked exceptions
  • How do you customize sorting in HashSet?
  • Final vs finally vs finalize
  • What are the different types of polymorphism?
  • What is the diff b/w WebDriver Listener and TestNG Listener
    Ans: Both are an interface, but the WebDriver listener is triggered when you call webdriver methods like findElement, click, etc, example-afterClickOn; beforeFindBy. TestNG Listener is triggered when TestNG methods are executed, such as onTestFailure and onFinish.
  • Explain API restful automation.
  • What is get, post in rest API?
  • Framework and advantage of PageFactory classes

Interview Location: Hyderabad, India
Round: Technical & HR Round
Updated: Aug 2021

1st technical round:

  • Tell me about yourself
  • What are the selenium components, and which components are you using?
  • How do you inspect elements?
  • What are those locators?
  • Write syntax for XPath?
  • Write a syntax to initialize the webDriver.
  • Explain absolute and relative XPath with an example
  • Explain your project and framework
  • How do you get the data from the Excel sheet?
  • Where do you use Java in Selenium webDriver?
  • What is oops?
  • Explain the abstraction concept with an example
  • Explain the inheritance concept with an example
  • Explain method overloading and overriding with an example
  • Example inheritance with an example
  • What is an interface? Explain with a live example
  • Write a basic selenium script
  • Explain the defect life cycle
  • Write a syntax to select a value from the drop-down
  • Write syntax to get the text from the table
  • What are hashmap and HashSet? Explain?
  • Where do you use a hashmap?
  • What is the exception you get in selenium?
  • What is implicitly wait, explicitly wait, webdriver wait, Thread.sleep
  • Write syntax for the webdriver wait
  • The difference between implicitly, explicitly, webdriver wait and thread sleep
  • Which framework are you using in your project?
  • Are you using any integration tools?
  • What is Jenkins?
  • Where do you upload test results?
  • What are retesting and regression testing?
  • What is smoke testing?
  • How do you get to know if the developer has fixed the issues or not?
  • What are the roles and responsibilities?
  • Which Java & and Selenium versions are you using?
  • How do you handle if XPath is changing dynamically?
  • Have you ever written test cases in your projects?
  • Asked Some selenium questions

Cleared the first round and qualified for the 2nd technical round

2nd technical round:

  • Tell me about yourself
  • What is performance testing? ( I have mentioned in my resume )
  • For which functionality did you do performance testing in your project?
  • What is the response time?
  • Which language do you use for Appium testing? ( I have mentioned in my resume)
  • Did you write test scripts for mobile automation?
  • Can we use the same code developed for the web app in Appium?
  • What is Jenkins?
  • What is the layout in Jenkins?
  • What is GIT & SVN?
  • Difference between GIT & SVN
  • Does Jenkins require a local system for CI?
  • Asked some basic Java questions

Cleared 2nd round and qualified for HR round

Filled out application form which contains education details, current employment details, CTC details, Address, PAN, Aadhar number, phone number & email

3rd round: HR

  • Can you introduce yourself?
  • What are the tools you know except selenium?
  • Where is your company located?
  • Where do you live?
  • Where are you from?
  • Graduation details, when did you join your current organization? Notice period?
  • You are expecting CTC ** Okay, fine.

Interview Location: Bangalore, India
Round: Technical
Experience: 3 Years

  • Core Java concepts with examples in your framework? like interface, abstraction method overloading and overriding
  • Why ArrayList instead of an array?
  • WAP to find out the second minimum and second maximum numbers from an array without sorting the array?
  • How do you debug your code manually or use automation for that?
  • Duplicate elements in a string program?
  • Which type is used in collections to add all the primitive data types?
  • Manual testing concepts like bug life cycle, an agile methodology which is following in your organization?
  • Explain the architecture of your framework and why that approach was taken instead of others.
  • What u implemented in Ur framework (native selenium API methods or page classes or reporting like questions)
  • What is the future of selenium?
  • Why cucumber and concepts from BDD framework basics
  • Questions on version controlling (SVN or git) basics

Interview Location: Bangalore, India
Round: Technical
Experience: 2-5 Years

FACE-to-FACE Interview Questions

  • Super most class for error and exception
  • How to fetch data last row from webtable. (webtable is Dynamically changing)
  • Difference between hashmap and hash table
  • How to configure proxy explicitly.
  • What do you do daily?
  • How to validate the colors in selenium
  • How to handle Ajax UI.
  • How do you manage both manual and automation?
  • How do you handle dynamic web elements?
  • Upload file using Auto-It.
  • More questions on BDD cucumber-like Datatable vs scenario outline.
  • Hooks and tags
  • Explain the project framework

The Client Round Interview Questions

  • How to handle merge conflict in GiT
  • Selenium grid
  • Oops concept
  • Pom
  • BDD
  • Data table vs scenario outline with example keyword
  • Normal scenario vs scenario outline
  • Parallel execution
  • Agile concepts.
  • Story estimation.
  • How to handle Duplicate feature file

Interview Location: Bangalore, India
Round: Technical
Updated: Aug 2021

  • What are the class and objects?
  • How to call a function of a class without creating an object?
  • What is Encapsulation, Abstraction?
  • What are Abstract classes and Interfaces? Difference b/w them?
  • what is polymorphism?
  • Diff b/w list and set?
  • what is HashMap?
  • Diff b/w Array and ArrayList?
  • How to synchronize collection classes?
  • How to reverse a string? write code
  • How to Verify palindrome or not?
  • what is inheritance?
  • what is overloading and overriding?
  • Diff b/w normal method and a static method?
  • Diff b/w String and StringBuffer?
  • Why is main() declared static?
  • Diff b/w while and do-while?
  • what is the use of sleep()?
  • what is an Exception? How to handle Exceptions?
  • How to find duplicate characters from a given string?

IMP concepts in JAVA for the interview:

  • String class and its functions
  • Collections

Interview Location: Bangalore, India
Round: Technical
Experience: 5+ Years
Updated: June 2020

  • How to read data from Excel? asked to write sample code
  • Diff b/w selenium RC and web driver?
  • which selenium web driver version you have used in your project?
  • what is JavascriptExecuter?
  • How to find Invisible elements on a web page? write sample code
  • How to verify whether an element is present or not on a web page? write code
  • How will you generate reports for your project?
  • How to generate logs?
  • what is POM?
  • How do you handle dynamically changing IDs/elements?
  • Diff b/w Assert and Verify?
  • What are XPath and its types?
  • what are the methods you have seen in XPath?
  • How to generate dynamic XPath?
  • What are the types of waits in selenium webdriver?
  • How do you handle multiple windows/frames(switching b/w windows and frames)?
  • What is Automation? Why is it important? When should Automation be started? How can we identify which scenarios to automate?
  • How to select a value in the DropDown list? what are the different ways to select?
  • what is a Select class? when to use?
  • what is the Alert interface? when to use?
  • what are click(),sendKeys(),findElements() methods?
  • How to read the Properties file in Selenium?
  • How do you upload files in Selenium?
  • How to handle popup windows?
  • How to handle Mouse hover?
  • How to handle duplicate elements?
  • What are the Actions class and its methods?
  • How do you perform the drag-and-drop operation?
  • How to capture screenshots in Webdriver? write code?
  • Tell me some Exceptions you have faced in selenium. How do you handle them?
  • What are the Framework and its advantages?
  • what is the Hybrid framework, Data-Driven framework, KeyBoard Driven framework?
  • what is the Selenium Grid?
  • What is TestNG?and its annotations?
  • what is @dataProvider annotation? what is the return type of this annotation?
  • Explain your project framework architecture.
  • What are the difficulties/challenges you have faced while in Automation?
  • Have integrated selenium with other tools like Maven, Jenkins, etc..?
  • Have you conducted cross-browser testing using TestNG?
  • How do you conduct cross-browser testing parallel in TestNG?
  • What is parameterization in TestNG?
  • Have you been involved in the development of your project framework?
  • How to handle internationalization using Selenium WebDriver?
  • what are SDLC and STLC?
  • What are the defects you found while automating your application?
  • what is the Defect life cycle?
  • What are your Roles in the Project?
  • write a code to open an application in the Firefox browser?
  • write a code to read data from Excel?
  • what is a maven?
  • Which framework have you used in your project?

IMP concepts in selenium WebDriver for an interview:

  • XPath’s
  • Your project framework
  • TestNG

Interview Location: Chennai, India
Experience: 4+ Years
Updated: Oct 2019

1st Round

  • About yourself
  • Write down your project framework structure
  • What is POM.xml
  • What are the annotations in TestNG, and it’s the sequence
  • When your @BeforeSuite will execute?
  • How to do grouping in TestNG?
  • Difference between ImpliciteWait and Explicit wait.
  • Suppose one element is there, which will appear after 20 sec. We have given that element an explicit wait of 10 sec and an implicit wait of 20 sec in that class, so what will happen? Will it show an exception or what?
  • How to prioritize the TestNG classes using testng.xml? How many ways to do it?
  • Write down any test script that you are currently working on in your company.
  • Difference between Abstract class and Interface
  • What are the Access specifiers in Java?
  • The difference between Default and Protected
  • Write down the hierarchy of collection
  • Difference between Map and Set. Additional questions related to Map and Set
  • What are the Testing levels, and in which role are you currently?
  • Do you know about BDD?

2nd Round:

  • Given one String like “My name is ABC” and asked to reverse “ABC is named My”
  • Given 3-4 scenarios, like a password should accept 6-10 characters, only one Alphabet asked to write down the Regular Expression
  • How to find the broken links on the web page, asked to write it on paper
  • What is encapsulation?
  • What is Abstraction?
  • Where did you use the Abstract class in your project, and why didn’t you go for Interface?
  • Difference between Abstract class and Interface
  • Difference between Access specifier and Access modifier
  • Can we write only concrete methods in the Abstract class?
  • If we can write only concrete methods, why declare them as abstract?
  • Can we have a Constructor in the Abstract class?

Cognizant Selenium Interview Questions & Answers

  • Explain ur framework
  • Difference between interface and abstract
  • Write a program to print a pyramid
  • Write selenium script to login
  • What is assert
  • Assert vs verify
  • Iframe
  • Switch between frame

Interview Location: Bangalore, India
Round: Technical
Experience: 4.6 Years

  • What is a string? Write code to reverse the string as mentioned in the output.
    Given String: Selenium Web driver is an open-source tool
    Output String: tool source-open an is driver Web Selenium
  • Write code to print the given pattern.
    1 2 3 4 5 6 7
    1 2 3 4 5 6
    1 2 3 4 5
    1 2 3 4
    1 2 3
    1 2
    1
  • Write code to print “A1B2C3D4E5………..Z26”?
  • Why is string immutable in nature?
  • What is the difference between Final, Finally & Finalize?
  • Write a code to print the missing numbers between five inputs provided by the user at runtime using the scanner class.
    Example: With the help of Scanner class, we have to take five inputs(u can take any random number) Like 5, 45, 50, 52, 91
    Now you have to print the missing numbers between all the numbers. Like 6 to 44, then 46 to 49, then 51, then 53 to 90.
    But if the user entered the number not in any order, Like 5, 2, 98, 50, 16
    so first, you have to sort it in some order & then print the missing numbers
  • What is the difference between the array & array list?
  • What is the difference between a hashmap & linked hash map?
  • What is the difference between String, String buffer & String Builder?
  • What is the difference between interface, class & abstract class?
  • Can an interface have a concrete class?
  • What is a Checked & Unchecked exception?
  • How to handle checked exceptions?

Interview Location: Bangalore, India
Experience: 1-2 Years
Updated: May 2018

  • How to launch browsers(IE,  Chrome & Mozilla). write code?
  • Write code to establish a JDBC connection.
  • How to read a .txt file? Write code?
  • How to read a property file & excel file? Write code?
  • What is a TestNG framework? what are the features of the TestNG framework?
  • What is the listener in TestNG? List the listeners that you use in your company.
  • Write code to take the screenshot.
  • How to perform parameterization?
  • Explain your last company project framework.
  • What is the Page Object Model(POM)? what are the advantages and disadvantages of POM?
  • What is the Page factory? How can I create an object of the class using the Page Factory class? How can I write code?
  • What is Alert, frame in selenium web driver? Write code?
  • How to refresh the web page?
  • What is the difference between get() & navigate().to() method?
  • What is Maven?
  • What are the dependencies in Maven? Tags in the POM.xml file for adding dependencies?
  • What is a repository in Maven? Types?
  • What is the Cucumber framework?
  • What is the feature file & step definition in Cucumber?
  • What are tags & hooks in cucumber?
  • What are the keywords used in the feature file? What is the use of the keyword “background” in a feature file?
  • How can I run a test case for multiple data in Cucumber? How can I pass multiple data for a test case in a step definition?
  • How do you run test cases for more than one tag name in Cucumber?

Manual Questions:

  • What is the difference between regression & retesting?
  • If you have 500 test cases to execute, and in a week, you can execute only 100 test cases, and you have only 3 weeks to execute all the test cases, and all are critical, what will be the approach?
  • What is agile?

General Question:

  • Introduce yourself.

Interview Location: Bangalore, India
Updated: May 2018

  • What is the string buffer class?
  • Write code to read data from Excel?
  • What is the difference between findElements and findElement?
  • Will findElements throw an error when the element is not found?
  • What is an explicit wait?
  • What is a fluent wait?
  • Different explicit wait conditions in selenium?
  • Can we write our own conditions for explicit wait?
  • What is the difference between smoke and sanity testing?
  • What is Kanban?
  • Which agile methodology do you use?
  • Who is the one who leads the agile team?
  • What is the difference between product backlog and sprint backlog?
  • What do the product owner and scrum master do?
  • What is web services testing?
  • Which testing have you performed?
  • Soap and UI testing?
  • Different types of HTTPS code?
  • What does 1 series stand for similarly 2,3, and 4 series in HTTPS code stand for?
  • Write a program for factorial?
  • Write a program to find prime no. Or not?
  • All string-related programs are asked.
  • What is the difference between smoke and sanity testing?
  • What is regression testing?
  • What is exploratory testing?
  • What have you used JIRA for only logging defects or other tasks to have performed?
  • Explain the framework you have used.
  • What is your role in this framework? Explain it in detail.
  • What is build.xml?
  • What is the port no? We use and why is it used?
  • Appium related queries?
  • TestNG related questions
  • Data providers?
  • 3 Scenarios are given we need to write code to automate it?
  • Where did u use the collection in your project?
  • Where did u use the hashmap in ur project?
  • Where did u use multithreading in ur project?

Interview Location: Hyderabad, India
Experience: NA

  • What annotations are used in TestNG in ur project?
  • If we wanna do data-driven with TestNG, what are annotations required?
  • Is it possible to pass test data through a testng.xml file? If yes, how?
  • How to run specific kinds of test cases using TestNG?
  • How to prioritize test cases in TestNG?
  • What are all interfaces available in Selenium?
  • Actions are class or interface?
  • Why are we using TestNG? What are the benefits? Can we execute test cases in order without using TestNG?
  • Explain polymorphism in Java.
  • Scenario: There are two methods in the same class with the same name, different arguments, and different access modifiers. like
    public void m1(int a){}
    private void m1(string b){}
    is it overloading or not?
  • What are the types of inheritance in Java?
  • Are multiple inheritances possible in Java? Tell reasons.
  • Is multi-level inheritance possible in Java? give reason.
  • Scenario: There are 10 pages in the same window; an image is present on any page of the 10 pages in the same window.
    how will you validate this scenario?
  • How to check if the image is loaded correctly or not on the page?
  • Scenario: The same image is present on ten pages. How do you check whether the image is present on each page? How will you validate this scenario?
  • What is the purpose of sikuli?
  • Is it possible to compare two images with sikuli?
  • How do you compare the image in some path of the drive and the image on the page?
  • Tell syntax for the sikuli code.
  • How do you handle the file upload window in Selenium?
  • Scenario: The page with the same name has ten dropdowns. In one of the dropdowns, I have an option called its employee. How do I select that particular option out of ten dropdowns on a page? What is your approach?
  • Write code for the DB connection.
  • Explain ur project structure and flow.
  • How do u handle exception handling in selenium?
  • Explain runtime and compile-time polymorphism.
  • Write a code for multiple handling windows.
  • Scenario: der is grid table 1st column contains links to the same names in all rows.
    The second column contains the different names for the links present in the first column. Based on the second column, click on the required link in the first column. How will you do it?
  • How do you handle synchronization in selenium?
  • How to generate user-defined exceptions and write syntax.
  • Difference between throw and throws keyword.
  •  Scenario:
    <table>
    <tr>
    <td>
    <td>
    now, based on the 2nd td tag, find the tr tag element. write XPath for it.
  • What is auto-it? how will you execute auto-it codes in Selenium?
  • How to handle elements like Ajax?
  • How do you handle elements that have no attribute inside the tag?
  • What is a protractor?
  • What are the locators present in the protractor?
  • Explain Oops concepts.
  • Difference b/w sikuli and auto it.

Interview Location: Bangalore, India
Round: Technical
Experience: 1-2 Years

Core Java

  • Tell me the internal flow of the Set implementation class with one example
  • In HashMap, if a hashing collision occurs, then how to resolve it?
  • Can we add a duplicate in a set and map? If yes, why write one code?
  • Read data from the file, find the duplicate words count them, and sort them in descending order
  • Where to use Comparable and Where to use Comparator Have you ever used it in your project?
  • What is bubble sort can you write one program. .?
  • Can I write try to block single means without using try-catch or try-finally
  • What is the Executor framework?
  • How many ways we can create a thread which one is the best approach, and why
  • JDK version you are using in your project, and why (be careful on that question coz they indirectly ask u the advantages of the version or latest features added in the New version )

JDBC

  • Difference between Statement and PreparedStatement
  • They give one DB schema and ask me to retrieve data from DB bypassing id

JSP

  • Life cycle
  • List down the implicit object
  • What is the use of the c tag library?

Spring

  • What is RowMapper when we have to use it to write sample code, not completely just give sm hints with flow
  • What is ResultSet Extractor where exactly do we have to use
  • If in my Spring bean configuration file, I configure the same bean with the same ID 2 times, then what is the problem and how to resolve it (contender)
  • Spring MVC Flow as per your Project
  • Spring transaction, why and how to work on it
  • How u handle Exception in your Project, just give some brief idea on it with annotation

Web services

  • WSDL, what are the elements, and just explain the role of each section verbally
  • What is Rest,
  • Difference between Soap and Rest
  • Write one Resource method using the HTTP method Post
  • Which Response u provide to the presentation layer, and how to bind JSON Response
  • What is the difference between @QuerryParm and @PathPatm? Which one is best, and where should you use it?

HR Round

  • Tell me about u. Not professional details, just tell me personal details?
  • Tell me about your payroll company.
  • Expected CTC
  • Why that much any reason?
  • Notice Period, is it negotiable?

Avatar for Softwaretestingo Editorial Board

I love open-source technologies and am very passionate about software development. I like to share my knowledge with others, especially on technology that's why I have given all the examples as simple as possible to understand for beginners. All the code posted on my blog is developed, compiled, and tested in my development environment. If you find any mistakes or bugs, Please drop an email to softwaretestingo.com@gmail.com, or You can join me on Linkedin.

10 thoughts on “CTS Cognizant Interview Questions”

  1. Mphasis Limited Selenium Java Interview – Interviewed on 26th July 2018

    1. Where you can use List, where you can use Map.
    2. How to iterate in an Array List.
    3. What is method overloading / Method overriding, Where you have implemented in Selenium Code.
    4. Tell the structure of the Framework.
    5. Have you involved in framework from scratch or just modifying the existing framework.
    6. Where you are keeping the project code locally or some other repository.
    7. What are the dependencies you have added while set up for your framework.
    8. What are the different annotations present in testNG.
    9. What is Polymorphism. Explain where you have implemented in your project.
    10. How to do re-execute the failed test-cases.
    11. Interface- how to achieve 100% multiple inheritance.
    12. What is the AutoIT & Sikuli.

    Reply
  2. Nokia – Interview on 24th July 2018
    1. What is WebDriver.
    2. What is single slash , double slash difference.
    3. Dif. between Implicit wait and Explicit wait.
    4. For right Click which method to be used.
    5. Kinds of locators, most preferred , why?
    6. What is Test Plan
    7. What are Abstraction, Inheritance, and Polymorphism.
    8. What is Method overriding?
    9. Have you involved in Test Estimation.
    10. Risk Mitigation Plan. Why it is necessary.
    11. What all types of testing a QA tester do?
    12. How to exclude a class from execution.
    13. If one test is not given with priority tag, and two others have given with priority tag then
    Tell the sequence of execution.
    14. If no priority is not there, the sequence of Execution if three methods are there.
    15. How many WebDriver to be instantiated for Cross browser testing.
    16. How much you rate in SQL- 2nd Highest Salary, Dif. bet del/drop/truncate.
    17. Framework Explanation.
    18. Given 1 minute – told me to think -different scenarios to be taken into consideration for testing.
    19. What is the Sanity Test & how do you do that. and how frequently.
    20. What are the types testing are there.
    21. If can skip a test method.
    22. Worked in any other automation tool.
    23. What purpose ALM you have used in your project.
    24. Dif. between String ,StringBuffer. Out of String Buffer & builder which one is thread safe.

    Reply
  3. 1.what is Different types of locators are available in selenium
    2.what is severity and priority
    3.Explain about your frame work
    4.Difference between find element and find elements
    6.Write sorting program
    7.Write Swapping of numbers
    9.whats retrospective meeting
    10.write dynamic x path
    11.explain about bug life cycle and if developer is not accept that bug then who to resolve that issue
    12.with out having attribute write the xpath for text
    13.y string is immutable
    14. y you are using file buffer reader

    Reply
  4. Cognizant Interview Questions on Manual Testing – Interviewed on December 3rd 2021
    Location: Bangalore
    1. Introduce your experience on Manual Testing?
    2. What is SDLC?
    3. What is Defect life cycle?
    4. What is the difference between Smoke and Sanity Testing?
    5. Explain Hands-on experience on HP-ALM?
    6. Can a Test execution have multiple runs? If so, What are the scenarios?
    7. What is Risk Assessment?
    8. What is Root Cause Analysis and what are the methods/ techniques to do it?
    9. What is Fish bone Analysis?
    10. What is Risk-based testing?
    11. Difference between Regression testing and Re-testing?
    12. What is V-model? Explain.

    Reply

Leave a Comment