Thursday, June 18

TestNG annotations.& POM

 If you use Selenium or Rest Assured with Java, you

MUST know these TestNG annotations.

Execution order:
@BeforeSuite → @BeforeTest → @BeforeClass → @BeforeMethod → @Test → @AfterMethod → @AfterClass → @AfterTest → @AfterSuite
Most used annotations:
@Test - marks a method as a test case
@BeforeMethod — runs before each test (e.g. launch browser)
@AfterMethod - runs after each test (e.g. close browser)
@BeforeClass — runs once before all tests in a class
@DataProvider — enables data-driven testing
@Parameters — pass values from XML config
@Groups - group test cases (smoke, regression)
Pro tips:
→ Use groups={"smoke"} for quick sanity runs
→ Use depends On Methods for sequential test flows
→ Use enabled=false to temporarily skip a test
→ Use priority to control execution order
Learning Selenium Automation: Understanding Page Object Model (POM)
As I continue my journey in QA Engineering and Test Automation, I explored one of the most important design patterns used in Selenium frameworks — Page Object Model (POM).

POM
🔹 What is POM?
Page Object Model is a Selenium design pattern where each web page of an application is created as a separate class containing:
✔ Web elements
✔ Locators
✔ Page actions/methods
✔ Reusable automation logic
Instead of writing all Selenium code inside test cases, POM helps separate test logic from page implementation.
⚙️ How POM works:
Test Scripts
⬇️
Page Classes
⬇️
Web Elements
⬇️
Web Application
For example:
LoginPage → handles login actions
ProductPage → handles product operations
CartPage → handles cart functionality
The test cases simply call these reusable methods.
💡 Benefits of POM:
✅ Better code readability
✅ Reduces code duplication
✅ Easy maintenance when UI changes
✅ Improves reusability
✅ Helps build scalable automation frameworks
🛠 Common tools used with POM:
Selenium WebDriver
Java
TestNG
Maven
Git/GitHub
Jenkins
Currently applying these concepts while building my E-Commerce QA Automation Suite, combining manual testing concepts with automation best practices.
Every automation framework starts with writing code, but great frameworks come from writing maintainable code. 🚀

Coforge Q&A

 Coforge  Q&A

hashtagAutomation
đ—Ĩđ—ŧ𝘂đ—ģ𝗱 𝟭: (𝗧𝗲𝗰đ—ĩđ—ģđ—ļ𝗰𝗮𝗹)
1. Explain about your project, how long is your sprint?
2. Have you created a framework from scratch? What are challenges you have faced while working with framework?
3. Difference between String Buffer and StringBuilder
4. Program to remove duplicate elements from an Array List
5. Where have you used Inheritance in your framework?
6. How would you handle authentication popup using Selenium?
7. How many test cases you have automated in a single sprint?
8. Difference between Request Specification and Response Specification in REST Assured (write code & explain it)
9. Difference between 500 vs 503 API status code
đ—Ĩđ—ŧ𝘂đ—ģ𝗱 𝟮: (𝗧𝗲𝗰đ—ĩđ—ģđ—ļ𝗰𝗮𝗹)
1. Given a string, remove all the duplicate elements from a string
2. Write code to fetch the username and password from a properties file
3. What is the use of Group By in SQL?
4. Suppose you logged a bug, and the developer says it's not a bug—how would you convince them that it is?
5. Suppose a JS alert appears randomly on a webpage when clicking a button (you cannot predict when it will appear). How would you ensure it is accepted automatically using Selenium?
6. What is Stale Element Exception?
7. Have you tested Graph QL API? Explain how you did it
8. How many string objects will be created: String s1 = new String("JAVA");
9. Difference between finally and finalize in Java
10. Use of protected access modifier?
11. How would you achieve thread safety in your framework when running tests in parallel?

EPAM Systems Automation Testing Interview Questions

 EPAM Systems Automation Testing Interview Questions 


1. Given an array, find the next greater element for a given key.
2. How would you optimize your solution instead of using nested loops?
3. How will you handle duplicate values in the array for this problem?
4. Write logic to find the second largest number in an array.
5. How will you sort a list without using inbuilt methods?
6. Difference between == and .equals() with real-time scenario.
7. Explain a situation where .equals() failed due to improper override.
8. How would you handle Null Pointer Exception in your code?
9. How have you implemented OOPS concepts in your automation framework?
10. Where exactly did you use abstraction in your project?
11. Can you explain a real scenario where inheritance caused an issue?
12. How do you decide between interface and abstract class?
13. How does polymorphism help in framework design?
14. How do you achieve encapsulation in Page Object Model?
15. When would you use List vs Set in automation?
16. How do you remove duplicates from a collection?
17. How do you maintain insertion order while removing duplicates?
18. How would you store API response data dynamically?
19. What happens if you use HashMap in multithreading?
20. Element is not clickable due to overlay — how will you handle it?
21. Dynamic XPath is failing — what is your approach?
22. Page is loading slowly — how will you handle synchronization?
23. Stale Element Reference Exception — how do you fix it?
24. How do you handle multiple windows or tabs?
25. Dropdown is not a select tag — how will you handle it?
26. How do you verify broken links in UI?
27. How do you handle file upload in Selenium?
28. API is returning 200 but response is incorrect — what will you validate?
29. How do you validate JSON response dynamically?
30. How do you handle authentication (token-based API)?
31. How will you test negative scenarios in API?
32. How do you chain multiple API requests?
33. Your framework execution is slow — how will you optimize it?
34. How will you design a hybrid framework?
35. How do you manage test data in your framework?
36. How do you implement retry logic for flaky tests?
37. How do you generate reports in your framework?
38. How do you integrate your framework with CI/CD (Jenkins)?
39. You are asked to migrate Selenium framework to Playwright — what steps will you follow?
40. Tests are flaky — how do you identify and fix them?

Interviews

 interviews that you should absolutely master  Basic + Practical Understanding  Tell me about yourself (Project-focused answer matters!)  Wh...