Companies / Cognizant

Cognizant practice pack

IT services. 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.

Skills this role is usually tested on

  • Selenium with Java
  • TestNG and Maven
  • API testing
  • SQL
  • Agile

Business areas used for scenarios

  • healthcare
  • BFSI
  • life sciences
  • retail

6 questions

Answer out loud first, then open the guide. Most people read the guide too early.

  1. 1

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

    easyJava

    A strong answer covers

    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. 2

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

    mediumTestNG

    A strong answer covers

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

  3. 3

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

    mediumSelenium

    A strong answer covers

    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. 4

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

    mediumHealthcare

    A strong answer covers

    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. 5

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

    mediumAPI testing

    A strong answer covers

    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. 6

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

    hardStrategy

    A strong answer covers

    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.

Now say it to an interviewer

Reading a guide is not the same as answering under a clock. Run a mock interview and get scored feedback.