0% found this document useful (0 votes)
54 views5 pages

TCS Recently Asked Interview Questions and Answers-1

Uploaded by

roshan
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)
54 views5 pages

TCS Recently Asked Interview Questions and Answers-1

Uploaded by

roshan
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/ 5

AJITH KUMAR M

[email protected]

TCS Recently Asked Interview Questions and Answers for QA Automation Testing Role for
3+ years of Experience:

Round 1:

1.Tell me something about yourself?

2.What is the difference between regression and sanity?

Regression Testing: Ensures new changes do not affect the existing functionalities.

Sanity Testing: A quick check to verify specific functionalities after a bug fix or minor
changes.

3.What is defect lifecycle?

It's the process a defect goes through, from identification to closure, involving statuses like
New, Assigned, Open, Fixed, Retested, Verified, and Closed.

4.What is traceability matrix?

A document mapping requirement to test cases to ensure complete coverage.

5.How many test cases can you write in a day?

It depends on the complexity, but typically I can write around 5-10 detailed test cases for
complex functionalities or 15-20 for straightforward scenarios.

6.How can you define regression testing and when is it used?

Regression testing rechecks existing functionality after changes or enhancements to ensure


everything works as expected.

7.Difference between relative XPath and absolute XPath?

Absolute XPath: Specifies the complete path from the root node (e.g., /html/body/div).

Relative XPath: Begins from any element in the DOM (e.g., //div[@id='example']).

8.Which framework are you using and explain it?

I use a hybrid framework combining data-driven and keyword-driven approaches. It’s built
with TestNG and Maven, with clear folder structures for test cases, utilities, and reports.

9.How to take a screenshot in Selenium and code for it?


File srcFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(srcFile, new File("path/to/screenshot.png"));

10.What are the different types of agile meetings?

Sprint Planning

Daily Standup

Sprint Review

Sprint Retrospective

11.What are the benefits of using the TestNG framework?

Annotations for better control

Parallel test execution

Test reports

Supports parameterization

12.Can you explain POM.XML & where you use it?

pom.xml is a Maven configuration file where dependencies, plugins, and build configurations
are defined.

13.Code to swap two numbers without using a third variable?

a = a + b;

b = a - b;

a = a - b;

14.Difference between List and Set?

List: Allows duplicates, maintains order.

Set: No duplicates, no guaranteed order.

15.In a webpage, how would you ensure it has loaded completely?

Use JavaScript Executor: new WebDriverWait(driver, Duration.ofSeconds(30))


.until(webDriver -> ((JavascriptExecutor) webDriver) .executeScript("return
document.readyState").equals("complete"));

16.What is a constructor, and what is super in it?

A constructor initializes an object. super is used to call the parent class constructor.
17.Difference between private and protected?

Private: Accessible only within the class.

Protected: Accessible within the package and by subclasses.

18.How will you achieve dynamic polymorphism?

Through method overriding at runtime.

19.Can you override static methods?

No, static methods are class-level and cannot be overridden.

20.Can the main method be overloaded?

Yes, you can overload the main method, but only the standard main (String[] args) gets
called.

Round 2:

1.Can you explain your project with your role and responsibility?

2.How do you perform API testing?

Using tools like Postman and JMeter, I validate endpoints, HTTP methods, status codes, and
data integrity. For automation, I use RestAssured with Java.

3.Common API errors?

Incorrect response codes

Unauthorized access

Data validation issues

4.Major challenges in API testing?

Dynamic token generation

Managing test data

Testing under high load

5.What is mocking in API testing?

Mocking simulates API responses when the actual API is unavailable.

6.Difference between POST and PUT?

POST: Creates a new resource.

PUT: Updates an existing resource.

7.What is singleton design pattern?


Ensures only one instance of a class is created.

8.What is the difference between final, finally, and finalize?

Final: Prevents modification.

Finally: Executes cleanup code.

Finalize: Called before garbage collection.

9.How to handle alerts in Selenium?

Alert alert = driver.switchTo().alert(); alert.accept(); // To accept alert.dismiss(); // To dismiss

10.How to handle dynamic elements in XPath?

Use functions like contains(), starts-with(), or text().

11.How to refresh a page in Selenium?

driver.navigate().refresh();

12.Explain Page Factory?

It’s a design pattern in Selenium that uses @FindBy annotations for locating elements.

13.What is Maven used for?

Maven manages dependencies and automates builds.

14.Primary key vs. Unique key?

Primary key: Uniquely identifies a record, no nulls allowed.

Unique key: Ensures uniqueness but allows one null.

15.Types of joins?

Inner, Left, Right, Full Outer

16.Differences lie in how unmatched rows are treated.

17.SQL query for top 3 max salaries by department?

SELECT department, employee, salary FROM (SELECT department, employee, salary, OVER
(PARTITION BY department ORDER BY salary DESC) AS rank FROM employees) AS ranked
WHERE rank <= 3;

18.What do you achieve by Git?

Version control, collaboration, and history tracking.

19.Are you aware of CI/CD pipelines?

Yes, CI/CD automates build, testing, and deployment processes, ensuring quick delivery.
Round 3:

1.Why are you looking for a change?

To grow professionally, explore new challenges, and work in an environment that aligns with
my career goals.

2.3 best things about your previous organization?

Collaborative work culture

Learning opportunities

Recognition for contributions

3.2 points you didn’t like about your manager?

Occasionally unrealistic deadlines.

Limited one-on-one feedback sessions.

4.Where do you see yourself in 5 years?

As a lead or manager in testing, mentoring teams and contributing to strategic projects.

5.Salary expectation?

Based on industry standards and the role, I expect [insert amount here], negotiable based
on other benefits.

You might also like