Skip to content

IT services

Cognizant

Automation fluency, SDLC, and client-facing QA.

These are our own practice questions for the kind of QA/SDET role this company hires for. They are not the company's real interview questions. Confirm the current process on the company's official careers page.

What they tend to probe

  • Selenium with Java
  • TestNG and Maven
  • API testing
  • SQL
  • Agile
  1. Question 1 · Java · Easy

    What is the difference between an abstract class and an interface, and when do you use each in a test framework?

    Answer guide

    Abstract class: shared state and partial implementation (a base test or base page). Interface: a contract many classes can meet (a reporter, a data provider). Prefer composition over deep inheritance.

  2. Question 2 · TestNG · Medium

    How do groups, dependsOnMethods, and data providers work in TestNG and which would you avoid?

    Answer guide

    Groups for slicing suites, data providers for data-driven runs. Use dependsOnMethods sparingly because chained tests hide the real failure and block parallelism.

  3. Question 3 · Selenium · Medium

    How do you handle a dynamic table where rows load after a filter is applied?

    Answer guide

    Wait on a condition (row count changes or spinner gone), locate by stable column text, avoid index based XPath, re-find elements to avoid stale references.

  4. Question 4 · Healthcare · Medium

    You test a patient-record system. What changes in your approach compared with a shopping site?

    Answer guide

    Privacy and access control first, audit trails, test data that is synthetic, data integrity, regulatory traceability, and careful handling of environments with real data.

  5. Question 5 · API testing · Medium

    A GET endpoint returns 200 but the data is stale. How do you test and report it?

    Answer guide

    Compare with the source of truth, check cache headers and TTL, repeat after a write, record timestamps. Report with request, response, and expected freshness, not just 'wrong data'.

  6. Question 6 · Strategy · Hard

    Design a regression strategy for a monthly release across four teams that share one environment.

    Answer guide

    Risk-based scope, shared smoke gate, ownership per area, environment booking, contract tests between teams, and a freeze rule. Say how you would measure whether it works.