type of testing

Search

Total Views

Total Views:

interview question and answer

1. Basic & HR Questions

Q1. Tell me about yourself.

I am a [your profession/role] with experience in [industry/field]. I have worked on [type of projects or tasks] that helped me develop [skills/strengths]. I am passionate about [your interest or area of growth] and enjoy [a soft skill or quality, e.g., collaborating with teams, solving problems]. Currently, I am looking for an opportunity where I can contribute [what you want to contribute] and continue to grow professionally.


Q2. Why do you want to join this company?

Answer:
I am impressed with your focus on continuous quality and innovation. This role aligns with my experience in automation and manual testing and gives me a platform to grow in areas like security and API testing. I’m also eager to work in a collaborative, full-stack team environment as described in the job profile.


Q3. What are your strengths?

Answer:

  • Strong understanding of manual and automation testing

  • Proficient with Selenium, Java, TestNG

  • Quick learner and good in debugging and identifying root causes

  • Good collaboration in Agile teams


2. Manual Testing Questions

Q4. What is the difference between severity and priority?

Answer:

  • Severity is the impact of the defect on the application.

  • Priority is how soon the defect needs to be fixed.

Example: A spelling mistake on a homepage has low severity but high priority.


Q5. What are different types of testing you have performed?

Answer:

  • Smoke Testing

  • Regression Testing

  • Functional Testing

  • Integration Testing

  • UI Testing

  • API Testing (Basic)

  • Cross-browser Testing


Q6. How do you write test cases?

Answer:
I write test cases based on requirement documents, use cases, and user stories. Each test case includes test steps, expected results, preconditions, and postconditions. I follow the traceability matrix to ensure full coverage.


3. Automation Testing (Selenium + Java + TestNG)

Q7. What is your automation framework?

Answer:
I use a hybrid framework with Page Object Model and Data-Driven Testing. It includes Selenium WebDriver, Java, TestNG, Maven, and Extent Reports. Test scripts are modular, reusable, and maintainable. The test data is read from Excel using Apache POI.


Q8. How do you handle dynamic elements in Selenium?

Answer:
I use XPath with functions like contains(), starts-with(), or normalize-space() to handle dynamic elements. I also use WebDriverWait with ExpectedConditions to wait for elements.


Q9. How do you manage test execution using TestNG?

Answer:
I use testng.xml to organize and run test classes. I group tests, run tests in parallel, and use TestNG annotations like @BeforeClass, @AfterTest, and @DataProvider.


Q10. How do you handle exceptions in Selenium?

Answer:
I use try-catch blocks to handle exceptions and also use custom exception handling. I also use WebDriverWait to avoid ElementNotVisibleException or NoSuchElementException.


4. API Testing (Beginner)

Q11. What is API testing?

Answer:
API testing is verifying that APIs return correct responses for various requests. It includes checking status codes, response times, headers, and data. Tools like Postman or REST Assured are used for API automation.


Q12. What status codes do you commonly validate?

Answer:

  • 200 OK – Success

  • 201 Created – Resource created

  • 400 Bad Request – Client-side error

  • 401 Unauthorized – Auth required

  • 403 Forbidden – Permission denied

  • 404 Not Found – Resource not found

  • 500 Internal Server Error – Server issue


Q13. How do you validate API response in Postman?

Answer:
I use assertions in the Tests tab. Example:

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

5. Agile & Process

Q14. What is your role in Agile?

Answer:
I attend daily stand-ups, sprint planning, and retrospectives. I collaborate with developers and BAs, write and execute test cases for each story, raise bugs, and ensure the story meets the Definition of Done before closure.


Q15. What is a regression suite and how do you maintain it?

Answer:
A regression suite is a set of test cases to verify that existing functionalities work after code changes. I regularly update the suite to include new test cases and automate critical flows to ensure fast feedback.


6. CI/CD, Jenkins, Git

Q16. Have you worked with CI tools like Jenkins?

Answer:
Yes, I have configured Jenkins jobs to trigger automated test runs after code commits. I’ve used Jenkins pipelines to integrate Maven and TestNG, and to generate reports.


Q17. How do you use Git in your project?

Answer:
I use Git for version control. I commit changes to feature branches, pull from the main branch, resolve conflicts, and raise merge/pull requests. I also maintain clean commit messages.


7. Coding (Java – Basic)

Q18. Write a Java program to reverse a string.

Answer:

public class ReverseString {
    public static void main(String[] args) {
        String input = "Swami";
        StringBuilder reversed = new StringBuilder(input).reverse();
        System.out.println("Reversed: " + reversed);
    }
}

Q19. How do you read data from Excel using Apache POI?

Answer:
I use XSSFWorkbook, XSSFSheet, and XSSFRow classes to open the Excel file and loop through rows and cells.


8. Scenario-Based Questions

Q20. What will you do if a defect is not accepted by the developer?

Answer:
I would first revalidate the issue with proper steps and screenshots. If it’s reproducible, I’d discuss it with the developer and BA, show evidence, and escalate to the lead if unresolved.


Q21. How do you decide what to automate?

Answer:
I automate stable, frequently executed, high-priority test cases like smoke tests and regression tests. I avoid automating UI elements that change often or one-time test cases.


9. Code Review & Communication

Q22. Do you participate in code reviews?

Answer:
Yes. I review automated scripts for naming conventions, logic clarity, reusability, and proper exception handling. I give feedback for improvements and maintain coding standards.


10. Continuous Testing & Quality

Q23. What is continuous testing?

Answer:
Continuous testing is the process of executing automated tests as part of the CI/CD pipeline to get fast feedback. It helps catch defects early and ensures high quality in every build.


Extras (If Asked)

Q24. What are some challenges you’ve faced?

Answer:

  • Handling unstable test environments

  • Managing flaky test cases due to dynamic elements

  • Getting late requirements changes during a sprint

I addressed these by using waits, stable locators, and maintaining clear communication with the team.


Q25. How do you ensure high-quality delivery?

Answer:
By writing clear test cases, using traceability matrices, automating regression, continuous testing with CI tools, and actively participating in Agile ceremonies.


You said:
please help me out to selection for interview this is my content please plan for me to this Project Role: Quality Engineer (Tester) Project Role Description: Enables full stack solutions through multi-disciplinary team planning and ecosystem integration to accelerate delivery and drive quality across the application lifecycle. Performs continuous testing for security, API, and regression suite. Creates automation strategy, automated scripts and supports data and environment configuration. Participates in code reviews, monitors, and reports defects to support continuous improvement activities for the end-to-end testing process. Must have skills: Automated Testing Good to have skills: NA Minimum 3 year(s) of experience is required Educational Qualification: 15 years full time education Summary: As a Quality Engineer, you will enable full stack solutions through multi-disciplinary team planning and ecosystem integration to accelerate delivery and drive quality across the application lifecycle. Your typical day will involve performing continuous testing for security, API, and regression suites, creating automation strategies, and developing automated scripts. You will also support data and environment configuration, participate in code reviews, and monitor and report defects to facilitate continuous improvement activities for the end-to-end testing process. Your role is crucial in ensuring that the quality of applications meets the highest standards throughout their lifecycle.
ChatGPT said:

Thanks for sharing the details, Swami. Based on your experience and the job role, I’ll create a personalized preparation plan to help you crack the interview for this Quality Engineer (Tester) position.


Your Current Strengths

  • 2.7 years of experience in software testing (manual + automation).

  • Working on Selenium with Java and TestNG.

  • Using Maven and following Agile methodology.

  • Starting to learn API testing.


🎯 Goal: Crack Interview for "Quality Engineer (Tester)" Role

📅 7-Day Rapid Preparation Plan


🔹 Day 1: Understand the Role & Brush Up Basics

  • Read the JD again, underline keywords (e.g., API, regression suite, automation strategy).

  • Revisit Software Testing Life Cycle (STLC), SDLC, Agile Scrum.

  • Prepare crisp answers to:

    • Tell me about yourself.

    • What’s your current project?

    • What’s your role in the team?

    • Why do you want this role?


🔹 Day 2: Automation Testing Deep Dive

  • Revise:

    • Selenium WebDriver basics

    • Locators and Waits

    • Page Object Model (POM)

    • Data-driven testing using Excel

  • Practice:

    • Write a sample login automation script using Java + TestNG

  • Prepare:

    • How do you create an automation framework?

    • Explain your framework architecture.

    • How do you handle dynamic elements?


🔹 Day 3: TestNG + Maven + Git

  • Revisit:

    • Annotations (@BeforeClass, @AfterTest, etc.)

    • Suite XML files and parallel execution

    • Creating reports with TestNG

  • Practice:

    • Integrate Selenium + TestNG in Maven

    • Push code to Git (be ready to show sample project)


🔹 Day 4: API Testing

  • Learn:

    • What is an API? REST vs SOAP?

    • Status Codes (200, 201, 400, 401, 403, 404, 500, etc.)

  • Tools:

    • Install and explore Postman

  • Practice:

    • Send GET, POST, PUT, DELETE requests

    • Understand response status, headers, and body

  • Prepare:

    • What is API testing?

    • How do you validate API responses?

    • What tools have you used?


🔹 Day 5: Advanced Automation + Continuous Testing

  • Learn:

    • What is Continuous Testing?

    • What is CI/CD?

  • Tools:

    • Learn basics of Jenkins and pipeline integration

    • Reporting tools like Allure or Extent Reports

  • Practice:

    • Create a small Jenkins job to run a TestNG test


🔹 Day 6: Behavioral + STAR-Based Q&A

  • Prepare answers using the STAR format (Situation, Task, Action, Result):

    • A challenging bug you found and how you handled it

    • A time you suggested an improvement in the testing process

    • How you handled deadlines in Agile projects

  • Mock Interview Practice (I can help with Q&A here)

Q1. Tell me about yourself.

Answer:
I have 2.7 years of experience in software testing, including manual and automation testing. I’m currently working at Dreamers Software Pvt. Ltd. in Pune, where I use Selenium WebDriver with Java and TestNG for automation. I follow Agile methodology, use Maven as a build tool, and am now expanding my skills into API testing with Postman. I’ve worked on creating test cases, executing regression and smoke tests, and automating critical functionalities. I’m passionate about quality and enjoy solving bugs and improving processes.


Q2. Why do you want to join this company?

Answer:
I am impressed with your focus on continuous quality and innovation. This role aligns with my experience in automation and manual testing and gives me a platform to grow in areas like security and API testing. I’m also eager to work in a collaborative, full-stack team environment as described in the job profile.


Q3. What are your strengths?

Answer:

  • Strong understanding of manual and automation testing

  • Proficient with Selenium, Java, TestNG

  • Quick learner and good in debugging and identifying root causes

  • Good collaboration in Agile teams


2. Manual Testing Questions

Q4. What is the difference between severity and priority?

Answer:

  • Severity is the impact of the defect on the application.

  • Priority is how soon the defect needs to be fixed.

Example: A spelling mistake on a homepage has low severity but high priority.


Q5. What are different types of testing you have performed?

Answer:

  • Smoke Testing

  • Regression Testing

  • Functional Testing

  • Integration Testing

  • UI Testing

  • API Testing (Basic)

  • Cross-browser Testing


Q6. How do you write test cases?

Answer:
I write test cases based on requirement documents, use cases, and user stories. Each test case includes test steps, expected results, preconditions, and postconditions. I follow the traceability matrix to ensure full coverage.


3. Automation Testing (Selenium + Java + TestNG)

Q7. What is your automation framework?

Answer:
I use a hybrid framework with Page Object Model and Data-Driven Testing. It includes Selenium WebDriver, Java, TestNG, Maven, and Extent Reports. Test scripts are modular, reusable, and maintainable. The test data is read from Excel using Apache POI.


Q8. How do you handle dynamic elements in Selenium?

Answer:
I use XPath with functions like contains(), starts-with(), or normalize-space() to handle dynamic elements. I also use WebDriverWait with ExpectedConditions to wait for elements.


Q9. How do you manage test execution using TestNG?

Answer:
I use testng.xml to organize and run test classes. I group tests, run tests in parallel, and use TestNG annotations like @BeforeClass, @AfterTest, and @DataProvider.


Q10. How do you handle exceptions in Selenium?

Answer:
I use try-catch blocks to handle exceptions and also use custom exception handling. I also use WebDriverWait to avoid ElementNotVisibleException or NoSuchElementException.


4. API Testing (Beginner)

Q11. What is API testing?

Answer:
API testing is verifying that APIs return correct responses for various requests. It includes checking status codes, response times, headers, and data. Tools like Postman or REST Assured are used for API automation.


Q12. What status codes do you commonly validate?

Answer:

  • 200 OK – Success

  • 201 Created – Resource created

  • 400 Bad Request – Client-side error

  • 401 Unauthorized – Auth required

  • 403 Forbidden – Permission denied

  • 404 Not Found – Resource not found

  • 500 Internal Server Error – Server issue


Q13. How do you validate API response in Postman?

Answer:
I use assertions in the Tests tab. Example:

javascript
pm.test("Status code is 200", function () { pm.response.to.have.status(200); });

5. Agile & Process

Q14. What is your role in Agile?

Answer:
I attend daily stand-ups, sprint planning, and retrospectives. I collaborate with developers and BAs, write and execute test cases for each story, raise bugs, and ensure the story meets the Definition of Done before closure.


Q15. What is a regression suite and how do you maintain it?

Answer:
A regression suite is a set of test cases to verify that existing functionalities work after code changes. I regularly update the suite to include new test cases and automate critical flows to ensure fast feedback.


6. CI/CD, Jenkins, Git

Q16. Have you worked with CI tools like Jenkins?

Answer:
Yes, I have configured Jenkins jobs to trigger automated test runs after code commits. I’ve used Jenkins pipelines to integrate Maven and TestNG, and to generate reports.


Q17. How do you use Git in your project?

Answer:
I use Git for version control. I commit changes to feature branches, pull from the main branch, resolve conflicts, and raise merge/pull requests. I also maintain clean commit messages.


7. Coding (Java – Basic)

Q18. Write a Java program to reverse a string.

Answer:

java
public class ReverseString { public static void main(String[] args) { String input = "Swami"; StringBuilder reversed = new StringBuilder(input).reverse(); System.out.println("Reversed: " + reversed); } }

Q19. How do you read data from Excel using Apache POI?

Answer:
I use XSSFWorkbook, XSSFSheet, and XSSFRow classes to open the Excel file and loop through rows and cells.


8. Scenario-Based Questions

Q20. What will you do if a defect is not accepted by the developer?

Answer:
I would first revalidate the issue with proper steps and screenshots. If it’s reproducible, I’d discuss it with the developer and BA, show evidence, and escalate to the lead if unresolved.


Q21. How do you decide what to automate?

Answer:
I automate stable, frequently executed, high-priority test cases like smoke tests and regression tests. I avoid automating UI elements that change often or one-time test cases.


9. Code Review & Communication

Q22. Do you participate in code reviews?

Answer:
Yes. I review automated scripts for naming conventions, logic clarity, reusability, and proper exception handling. I give feedback for improvements and maintain coding standards.


10. Continuous Testing & Quality

Q23. What is continuous testing?

Answer:
Continuous testing is the process of executing automated tests as part of the CI/CD pipeline to get fast feedback. It helps catch defects early and ensures high quality in every build.


Extras (If Asked)

Q24. What are some challenges you’ve faced?

Answer:

  • Handling unstable test environments

  • Managing flaky test cases due to dynamic elements

  • Getting late requirements changes during a sprint

I addressed these by using waits, stable locators, and maintaining clear communication with the team.


Q25. How do you ensure high-quality delivery?

Answer:
By writing clear test cases, using traceability matrices, automating regression, continuous testing with CI tools, and actively participating in Agile ceremonies.

1. What is the difference between verification and validation?

Answer:

  • Verification ensures the product is built correctly (e.g., reviews, walkthroughs).

  • Validation ensures the right product is built (e.g., testing against requirements).


2. What is a test case and what does it include?

Answer:
A test case is a set of conditions to validate a feature. It includes:

  • Test Case ID

  • Description

  • Preconditions

  • Test Steps

  • Expected Result

  • Actual Result

  • Status


3. What is the difference between regression and retesting?

Answer:

  • Regression tests whether existing functionality is broken.

  • Retesting verifies a specific bug fix.


4. What is a bug lifecycle?

Answer:
Bug lifecycle includes:

  • New → Assigned → Open → Fixed → Retest → Verified → Closed

  • If not resolved: Reopened → Deferred → Rejected → Duplicate


5. What is the difference between smoke and sanity testing?

Answer:

  • Smoke Testing: Basic tests to ensure the application is stable.

  • Sanity Testing: Focused testing after changes to ensure specific functionalities work.


Selenium WebDriver with Java (Automation)

6. What are the different locators in Selenium?

Answer:

  • ID

  • Name

  • ClassName

  • TagName

  • LinkText / PartialLinkText

  • XPath

  • CSS Selector


7. What is the Page Object Model (POM)?

Answer:
POM is a design pattern where each page of the application has a separate Java class with WebElements and methods. It improves code reusability and maintainability.


8. What is the difference between implicit and explicit wait?

Answer:

  • Implicit Wait: Applied globally for all elements.

  • Explicit Wait: Applied to specific elements with certain conditions.


9. How do you handle multiple windows in Selenium?

Answer:
Using getWindowHandles() and switching using driver.switchTo().window(handle).


10. What is the difference between findElement and findElements?

Answer:

  • findElement returns a single WebElement and throws an exception if not found.

  • findElements returns a list of WebElements; returns empty list if not found.


TestNG + Maven

11. What are TestNG annotations?

Answer:

  • @BeforeSuite, @BeforeClass, @BeforeMethod, @Test, @AfterMethod, @AfterClass, @AfterSuite


12. How do you prioritize tests in TestNG?

Answer:
Using the priority attribute in @Test(priority = 1).


13. How do you generate reports in TestNG?

Answer:
TestNG generates default HTML reports. For advanced reporting, we use Extent Reports or Allure Reports.


14. How do you run test cases using Maven?

Answer:
Using the mvn test command from the terminal after setting up pom.xml.


15. How do you perform parameterization in TestNG?

Answer:
Using:

  • @DataProvider for data-driven testing.

  • @Parameters for passing parameters from XML.


API Testing (Postman Basics)

16. What is an API?

Answer:
API (Application Programming Interface) allows communication between two software components.


17. What are HTTP methods used in REST API?

Answer:

  • GET

  • POST

  • PUT

  • DELETE

  • PATCH


18. What is a status code? List a few.

Answer:
Status codes indicate API response:

  • 200 OK

  • 201 Created

  • 400 Bad Request

  • 401 Unauthorized

  • 403 Forbidden

  • 404 Not Found

  • 500 Internal Server Error


19. How do you validate response in Postman?

Answer:
Use test scripts in the Tests tab:

javascript
pm.test("Status code is 200", () => { pm.response.to.have.status(200); });

20. What is the difference between PUT and POST?

Answer:

  • POST creates a new resource.

  • PUT updates an existing resource (or creates it if it doesn’t exist).


Agile and Process

21. What is your role in Agile?

Answer:
I participate in sprint planning, daily stand-ups, retrospectives, test user stories, raise defects, and ensure the story meets the Definition of Done.


22. What is a user story?

Answer:
A short description of a feature from an end-user perspective, e.g.,
“As a user, I want to reset my password so that I can regain access.”


23. What is the Definition of Done (DoD)?

Answer:
The criteria that a user story must meet to be considered complete—includes coding, testing, review, and documentation.


CI/CD – Jenkins, Git, Maven

24. What is CI/CD?

Answer:
Continuous Integration/Continuous Delivery automates building, testing, and deployment of code for faster releases and feedback.


25. How do you integrate Selenium with Jenkins?

Answer:

  • Install Jenkins

  • Configure Maven job

  • Pull code from Git

  • Add build steps (mvn clean test)

  • Trigger job manually or on code commit


26. What is the use of Git in automation?

Answer:
Git is used for version control. I push/pull code, resolve merge conflicts, and manage feature branches.


Coding + Java Basics

27. Write a Java program to check if a number is prime.

Answer:

int num = 7, count = 0; for (int i = 1; i <= num; i++) { if (num % i == 0) count++; } System.out.println(count == 2? "Prime": "Not Prime");

28. What is inheritance in Java?

Answer:
Inheritance allows a class to inherit properties from another class using extends. It supports code reuse.


29. What are the OOPs concepts?

Answer:

  • Encapsulation

  • Inheritance

  • Polymorphism

  • Abstraction


30. How do you handle exceptions in Java?

Answer:
Using try-catch-finally blocks or by declaring throws in the method signature.


Bonus: Behavior / Situational

31. Tell me about a time you found a critical bug.

Answer:
In a recent sprint, I found a bug in the login API where session tokens weren’t expiring. It posed a security risk. I reported it, and the team prioritized and fixed it before release.


32. How do you handle pressure or tight deadlines?

Answer:
I prioritize tasks, communicate dependencies or blockers, and focus on delivering high-risk items first. I coordinate closely with my team to ensure timely delivery.

Thanks, Swami! Since you now have 3 years of experience, interviewers will expect deeper technical knowledge, hands-on experience, and scenario-based problem-solving across:

  • Manual testing principles

  • Selenium WebDriver with Java

  • TestNG framework and Maven

  • API testing with tools like Postman or REST-assured

  • Agile/CI-CD exposure (Jenkins, Git)

  • Code quality and participation in strategy discussions

Below is a tailored list of 30+ intermediate-to-advanced level questions and answers suitable for a 3-year experienced Quality Engineer.


✅ Manual Testing – Intermediate

1. How do you ensure complete test coverage?

Answer:
I create a Requirement Traceability Matrix (RTM) to map test cases against requirements, ensuring every functionality is covered. I also perform peer reviews and exploratory testing for edge cases.


2. What is boundary value analysis and equivalence partitioning?

Answer:

  • BVA: Tests boundaries (e.g., for age 18–60, test 17, 18, 60, 61).

  • EP: Divides input into valid/invalid partitions (e.g., <18 = invalid, 18–60 = valid, >60 = invalid).


3. How do you approach exploratory testing?

Answer:
I use my domain knowledge, test heuristics (like CRUD, error guessing), and risk-based prioritization to explore features without scripted test cases.


4. What is the difference between QA and QC?

Answer:

  • QA is process-focused: preventing defects

  • QC is product-focused: finding defects


5. How do you report and track bugs efficiently?

Answer:
I use tools like Jira/Bugzilla to log bugs with proper title, description, steps to reproduce, severity/priority, screenshots/logs, and tag the right team. I follow up during defect triage and track them until closure.


✅ Selenium WebDriver + Java – Intermediate/Advanced

6. How do you design a scalable automation framework?

Answer:
I follow the Page Object Model, use utility classes for reusability, implement Data-Driven testing using Apache POI, use TestNG for test management, and Maven for dependency management. I use loggers (Log4j) and reporting tools like Extent Reports.


7. How do you handle dropdowns, alerts, and file uploads in Selenium?

Answer:

  • Dropdowns: Select class

  • Alerts: driver.switchTo().alert()

  • File Uploads: Use sendKeys(filePath) on input tag or Robot class if not possible


8. What are the limitations of Selenium?

Answer:

  • Cannot test desktop apps

  • Cannot read CAPTCHA

  • Cannot handle mobile gestures

  • Needs 3rd-party tools for reporting, file upload, image comparison, etc.


9. How do you handle synchronization issues?

Answer:
I use explicit waits with conditions like visibilityOfElementLocated, elementToBeClickable, and avoid hard-coded Thread.sleep().


10. What is the difference between hard assert and soft assert?

Answer:

  • Hard Assert: Stops execution if failed.

  • Soft Assert: Continues execution and reports all failures at the end using softAssert.assertAll().


✅ TestNG + Maven – Intermediate

11. How do you run tests in parallel?

Answer:
I configure parallel execution in testng.xml using parallel="tests" or parallel="methods" and limit threads using thread-count.


12. How do you parameterize tests using Excel?

Answer:
I use Apache POI to read Excel data and use @DataProvider in TestNG to feed data into test methods.


13. How do you skip a test in TestNG?

Answer:

  • Use throw new SkipException("reason")

  • Use enabled=false in @Test annotation


14. How do you manage dependencies in your automation project?

Answer:
I use Maven for managing dependencies via pom.xml. I define dependencies like Selenium, TestNG, Apache POI, Log4j, etc., and manage plugins like Surefire for test execution.


15. How do you generate HTML reports for test results?

Answer:

  • TestNG provides default reports.

  • For better visuals, I use ExtentReports or Allure integrated in the framework.


✅ API Testing (Postman + Basics of REST Assured)

16. How do you test authentication-secured APIs?

Answer:
I use:

  • Basic Auth or Bearer tokens in headers

  • Pre-request scripts to generate tokens

  • Environment variables for managing credentials


17. What’s the difference between JSON and XML in API responses?

Answer:

  • JSON is lightweight, faster to parse, and widely used.

  • XML is heavier but supports schema validation and namespaces.


18. What types of assertions do you perform in API tests?

Answer:

  • Status code

  • Response time

  • Headers

  • JSON body values

  • Schema validation


19. How do you chain requests in Postman?

Answer:
I extract values (e.g., tokens or IDs) using test scripts and store them in environment variables for use in subsequent requests.


20. How would you automate API testing?

Answer:
Using REST Assured + TestNG in Java. I write test classes to send requests, validate responses, and integrate into CI pipelines with Maven and Jenkins.


✅ Agile, CI/CD, Jenkins, Git – Intermediate

21. How does your QA process fit into Agile?

Answer:
I attend all ceremonies (sprint planning, daily stand-up, review, retro), perform continuous testing, write test cases in parallel with development, and provide quick feedback.


22. What is your Jenkins experience?

Answer:
I’ve created and scheduled jobs in Jenkins to:

  • Pull code from GitHub

  • Run Maven build (mvn clean test)

  • Generate and publish reports

  • Notify results via email or Slack


23. What branching strategy do you follow in Git?

Answer:
We use feature branching:

  • main/master for stable code

  • dev for integration

  • feature/* for new features

  • bugfix/*, hotfix/* for defects


24. How do you ensure quality in a CI/CD pipeline?

Answer:

  • Automated smoke tests post-deployment

  • Code coverage reports

  • API contract tests

  • Regression test suite in Jenkins

  • Manual exploratory testing in staging


25. What is shift-left testing?

Answer:
Shift-left means performing testing activities early in the SDLC, like testing API contracts before UI is ready or validating user stories during refinement.


✅ Java Coding – Intermediate

26. Reverse a string without using reverse() function.

String input = "Swami";
String output = "";
for (int i = input.length() - 1; i >= 0; i--) {
    output += input.charAt(i);
}
System.out.println(output);  // imawS

27. Find duplicates in an array.

int[] arr = {1, 2, 3, 2, 4, 5, 1};
Set<Integer> seen = new HashSet<>();
for (int num : arr) {
    if (!seen.add(num)) {
        System.out.println("Duplicate: " + num);
    }
}

✅ Scenario-Based / Behavioral

28. A developer is not accepting your bug. What will you do?

Answer:
I would first re-verify the bug, collect evidence (logs, screenshots, videos), and explain its impact. If needed, escalate to the BA or lead for clarification.


29. What is your approach to automating a new application?

Answer:

  • Understand application structure

  • Identify stable locators

  • Build POM framework

  • Automate smoke tests first

  • Use Git and CI/CD tools

  • Maintain test data strategy and logs


30. How do you prioritize testing tasks in a sprint?

Answer:

  • Test high-risk and critical features first

  • Start with smoke and sanity

  • Perform regression at the end

  • Use risk-based and exploratory testing in parallel


31. Tell me about a time when your automation script failed in production.

Answer:
Once, a locator change caused a smoke test to fail. I implemented dynamic locators and added alerting to detect and fix such issues early in CI. This improved framework stability.


API Testing Questions (with Simple English Answers)

1. What is an API? How is it different from a web service?
🔹 Answer:
An API (Application Programming Interface) allows two software systems to talk to each other. A web service is a type of API that works over the internet. So, all web services are APIs, but not all APIs are web services.


2. Which tools have you used for API testing?
🔹 Answer:
I have used Postman for manual API testing and REST Assured for automated API testing using Java.


3. How do you validate the response of an API?
🔹 Answer:
I check the status code, response body, headers, and response time. I also validate the data format and specific values in the response.


4. What are HTTP methods and how are they used in REST APIs?
🔹 Answer:
HTTP methods are actions used in REST APIs:

  • GET – Get data

  • POST – Create data

  • PUT – Update data

  • DELETE – Remove data


5. What is the difference between PUT and POST?
🔹 Answer:

  • POST is used to create a new resource.

  • PUT is used to update an existing resource or create it if it doesn't exist.


6. How do you handle authentication (OAuth, API Key, JWT) in API testing?
🔹 Answer:
I pass the authentication token or key in the request header. In Postman or REST Assured, we can set the header as "Authorization: Bearer <token>" for JWT or OAuth.


7. What is the difference between SOAP and REST APIs?
🔹 Answer:

  • SOAP is older, uses XML only, and is more strict.

  • REST is modern, supports multiple formats (like JSON), and is simpler and faster.


8. Explain status codes like 200, 201, 400, 401, 404, 500 with examples.
🔹 Answer:

  • 200 OK – Request was successful

  • 201 Created – New data created successfully

  • 400 Bad Request – Something is wrong in the request

  • 401 Unauthorized – Missing or wrong authentication

  • 404 Not Found – URL not found

  • 500 Internal Server Error – Problem in server code


9. How do you write test cases for an API endpoint?
🔹 Answer:
I include:

  • Positive test (valid data)

  • Negative test (invalid/missing data)

  • Authorization test

  • Response validation

  • Boundary and performance checks


10. How do you test negative scenarios for APIs?
🔹 Answer:
I send wrong inputs, missing fields, or invalid tokens to check if the API gives correct error messages and status codes like 400 or 401.


11. Have you used Postman or REST Assured? Compare them.
🔹 Answer:
Yes.

  • Postman is good for manual testing and easy to use.

  • REST Assured is used for automation with Java, suitable for CI/CD pipelines.


12. How do you automate API testing as part of a CI/CD pipeline?
🔹 Answer:
I use REST Assured to write API tests in Java and integrate them into Jenkins or GitLab CI. Whenever code is pushed, tests run automatically.


Perfect, Swami! Here's the next section with simple English answers for:


Selenium + Automation Framework Questions

13. Describe the automation framework you have worked on.
🔹 Answer:
I worked on a hybrid framework using Selenium WebDriver, TestNG, Maven, and Java. It had Page Object Model (POM), data-driven testing, reusable methods, logging, and reporting.


14. How do you handle dynamic elements in Selenium?
🔹 Answer:
I use techniques like:

  • XPath with contains() or starts-with()

  • Waits (Explicit Wait)

  • JavaScriptExecutor if needed


15. What are different types of waits in Selenium?
🔹 Answer:

  • Implicit Wait – Waits globally for all elements

  • Explicit Wait – Waits for a specific condition

  • Fluent Wait – Similar to explicit, but checks every few seconds


16. How do you manage data-driven testing in TestNG?
🔹 Answer:
I use @DataProvider in TestNG and pass test data from Excel or an array. Each data set runs the test once.


17. What is the use of Maven in Selenium projects?
🔹 Answer:
Maven manages project dependencies (like Selenium, TestNG) and builds the project. It makes it easy to share and maintain.


18. How do you organize test suites in TestNG?
🔹 Answer:
I create XML files in TestNG to define test groups, order of tests, parallel execution, and suite names.


19. What is the Page Object Model (POM)? How have you used it?
🔹 Answer:
POM is a design pattern where each page of the app has a separate class with locators and actions. It keeps code clean and reusable.


20. How do you manage browser compatibility in Selenium?
🔹 Answer:
I use WebDriverManager or set drivers manually. I run tests on different browsers like Chrome, Firefox using TestNG parameters or cross-browser setup.


21. How do you handle exceptions in automation scripts?
🔹 Answer:
I use try-catch blocks, custom exception handling, and also add screenshots on failure for better debugging.


22. What reporting tools have you used (Extent, Allure, etc.)?
🔹 Answer:
I have used Extent Reports to generate detailed and colorful test reports. It shows pass/fail results, logs, and screenshots.


Regression, Security & Continuous Testing Questions

23. What is regression testing? When do you perform it?
🔹 Answer:
Regression testing checks that old features still work after new changes. I do it after every bug fix or feature update.


24. What is continuous testing? How does it fit in CI/CD?
🔹 Answer:
Continuous testing means running tests automatically in every stage of CI/CD. It helps catch bugs early during development.


25. Have you worked with Jenkins? Explain the setup.
🔹 Answer:
Yes. I created Jenkins jobs to pull code from Git, build with Maven, run tests (API/Selenium), and send email reports.


26. How do you ensure test scripts are reusable and maintainable?
🔹 Answer:
I follow best practices like using Page Object Model, utility methods, naming conventions, and separating test data.


27. What security-related test scenarios have you validated in APIs?
🔹 Answer:
I tested for:

  • Unauthorized access

  • SQL injection via inputs

  • Missing authentication headers

  • Token expiry


28. How do you ensure test coverage for a critical feature?
🔹 Answer:
I write test cases for all positive, negative, edge, and integration scenarios. I also use traceability matrix to map tests to requirements.


29. What is the role of automation in continuous testing?
🔹 Answer:
Automation helps run tests frequently and quickly. It finds bugs early and reduces manual effort in CI/CD pipelines.


30. How do you prioritize test cases for regression suite?
🔹 Answer:
I prioritize:

  • High-risk and business-critical tests first

  • Frequently used features

  • Recently changed modules


Coding, Code Review, and Debugging Questions

31. Can you write a simple Java method to reverse a string or check for palindrome?
🔹 Answer (Simple Example):

public boolean isPalindrome(String str) {
    String reversed = new StringBuilder(str).reverse().toString();
    return str.equals(reversed);
}

It checks if a string reads the same forward and backward.


32. How do you handle version control (Git branching, commits)?
🔹 Answer:
I use Git to create branches for features or bugs, then commit and push changes. I follow proper naming like feature/login or bug/fix404. I raise pull requests for code reviews.


33. What is the importance of code reviews in testing?
🔹 Answer:
Code reviews help catch mistakes, improve quality, and share knowledge. It ensures that test scripts follow standards and are readable.


34. How do you debug a failed test case?
🔹 Answer:
I check the error message, logs, and screenshot. Then I verify locators, test data, and wait conditions to fix the issue.


35. What best practices do you follow when writing test scripts?
🔹 Answer:

  • Use meaningful names

  • Keep scripts modular and reusable

  • Use POM and utility classes

  • Add logs and comments

  • Handle exceptions and waits properly


Scenario-Based / Behavioral Questions

36. Describe a time when your automation script failed. How did you handle it?
🔹 Answer:
Once a script failed due to a dynamic element. I debugged it, added explicit wait and corrected the locator. I also updated the script to handle similar cases in future.


37. How do you collaborate with developers during sprint cycles?
🔹 Answer:
I join daily stand-ups, discuss requirements, test early builds, and raise bugs. I also help developers by sharing logs and test cases when needed.


38. Explain how you manage test data in an Agile environment.
🔹 Answer:
I use Excel files, JSON, or property files for test data. I keep it separate from the code to easily update it for each sprint or environment.


39. Have you ever identified a critical bug just before release? What did you do?
🔹 Answer:
Yes. I found a login issue just before release. I immediately informed the dev team, added screenshots, and helped retest the fix quickly.


40. How do you keep upskilling yourself in testing trends?
🔹 Answer:
I follow online courses, blogs, YouTube, LinkedIn, and practice on tools like Postman, Selenium, and new frameworks. I also attend webinars and testing meetups.



Comments

🌟🌟🌟🌟☆ Great platform with helpful onboarding! Some areas could be streamlined, but overall a very positive experience.