accenture technical interview questions in online test for java experienced

Introduction: Why Java Is Needed for Automation Testing

For experienced professionals appearing in Accenture online technical interviews, Java is a core evaluation area, especially for automation-focused roles. Accenture’s online test is designed to assess not just syntax, but problem-solving, framework thinking, and real-world application.

Java is required because it:

  • Powers most Selenium automation frameworks
  • Integrates easily with TestNG, JUnit, Maven, Jenkins
  • Supports API + Database + UI testing
  • Scales well for enterprise-level projects

For experienced candidates, Accenture expects depth, not memorization.


Core Java Topics for Testing (Experienced Level)

1. Object-Oriented Programming (OOP)

  • Real-time use of inheritance and abstraction
  • Reusability in framework design

2. Collections Framework

  • Efficient test data handling
  • Performance-aware usage of List, Set, Map

3. Multithreading

  • Parallel execution with TestNG
  • Thread safety and synchronization

4. Exception Handling

  • Framework-level error handling
  • Custom exceptions and logging

5. Java 8 Streams & Lambdas

  • Cleaner automation logic
  • Filtering test data and API responses

Accenture Technical Interview Questions (Java – Experienced)

Core Java Interview Questions (1–25)

1. Why does Accenture prefer Java for automation roles?

Java offers platform independence, strong OOP principles, scalability, and seamless tool integration, which suits enterprise automation.


2. Explain OOP concepts with real automation usage.

  • Encapsulation → Secure test data
  • Inheritance → Base test classes
  • Polymorphism → Browser-independent execution
  • Abstraction → Framework structure

3. Encapsulation example in framework:

public class ConfigReader {

    private String browser = “chrome”;

    public String getBrowser() {

        return browser;

    }

}

Expected Output:
Browser value is accessed securely.


4. Inheritance usage example:

class BaseTest {

    void setup() {

        System.out.println(“Setup completed”);

    }

}

class LoginTest extends BaseTest {

    void execute() {

        setup();

        System.out.println(“Login test executed”);

    }

}

Output:
Setup completed
Login test executed


5. How is polymorphism used in Selenium?

Using a single WebDriver reference to run tests on different browsers.


6. Abstract class vs interface (real-time)?

Abstract ClassInterface
Can have implementationUsed for contracts
Single inheritanceMultiple inheritance

7. What is a singleton class in automation?

Used for WebDriver manager, configuration reader, DB connection.


8. Why is String immutable?

Ensures thread safety and security, especially in parallel execution.


9. String vs StringBuilder vs StringBuffer?

TypeThread-safePerformance
StringYesSlow
StringBuilderNoFast
StringBufferYesMedium

10. Exception handling strategy in frameworks?

Centralized handling with custom exceptions + logging.


11. Custom exception example:

class FrameworkException extends RuntimeException {

    FrameworkException(String msg) {

        super(msg);

    }

}


12. Checked vs unchecked exceptions?

Unchecked exceptions are more common in automation.


13. Why collections are critical in automation?

They store test data, WebElements, API/DB results efficiently.


14. ArrayList vs HashSet?

ArrayListHashSet
Allows duplicatesNo duplicates
Maintains orderNo order

15. HashMap real-time usage?

Map<String,String> data = new HashMap<>();

data.put(“username”,”admin”);


16. Iterate HashMap:

for(Map.Entry<String,String> e : data.entrySet()) {

    System.out.println(e.getKey()+” : “+e.getValue());

}

Output:
username : admin


17. Multithreading relevance?

Used for parallel execution in Accenture projects.


18. Thread vs Runnable?

Runnable is preferred for better design.


19. Synchronization importance?

Avoids data inconsistency during parallel runs.


20. Java 8 Stream example:

List<Integer> nums = Arrays.asList(10,15,20);

nums.stream().filter(n -> n>15).forEach(System.out::println);

Output:
20


21. File handling usage?

Reading configs, logs, test data.


22. File read example:

BufferedReader br = new BufferedReader(new FileReader(“data.txt”));

System.out.println(br.readLine());


23. Garbage collection?

Automatic memory cleanup.


24. Wrapper classes?

Allow primitives in collections.


25. Access modifiers?

Control framework-level access.


Java Selenium Coding Challenges (26–55)

26. Launch browser dynamically:

WebDriver driver;

if(browser.equals(“chrome”)) {

    driver = new ChromeDriver();

}


27. Locator priority in projects?

id → name → cssSelector → xpath


28. Dynamic XPath example:

//input[contains(@id,’email’)]


29. Types of waits?

Implicit, Explicit, Fluent.


30. Explicit wait example:

WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));

wait.until(ExpectedConditions.elementToBeClickable(By.id(“login”)));


31. Thread.sleep vs Explicit Wait?

Thread.sleepExplicit Wait
StaticDynamic
Not recommendedRecommended

32. Handle dropdown:

Select s = new Select(element);

s.selectByVisibleText(“India”);


33. Handle alerts:

driver.switchTo().alert().accept();


34. Handle frames:

driver.switchTo().frame(“frame1”);


35. Multiple windows handling?

Using getWindowHandles().


36. Screenshot on failure:

File src = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);


37. StaleElementReferenceException?

Element detached from DOM.


38. Solution?

Re-locate the element.


39. Actions class usage?

Mouse hover, drag-drop.


40. JavaScriptExecutor usage?

Handle hidden elements.


41. Headless browser usage?

CI/CD pipelines.


42. Selenium Grid?

Parallel cross-browser execution.


43. Selenium limitations?

Cannot automate CAPTCHA.


44. Page Object Model (POM)?

Separates UI and test logic.


45. POM example:

@FindBy(id=”username”)

WebElement username;


46. Hybrid framework?

POM + Data-driven + Keyword-driven.


47. Framework folder structure?

base, pages, tests, utils, reports.


48. Test data management?

Excel, JSON, DB.


49. Read properties file:

Properties prop = new Properties();

prop.load(new FileInputStream(“config.properties”));


50. Maven usage?

Dependency management.


51. Maven lifecycle?

clean → test → install


52. Jenkins role?

CI/CD execution.


53. Git usage?

Version control.


54. Logging tool?

Log4j.


55. Reporting tools?

Extent Reports, Allure.


JUnit & TestNG Interview Questions (56–75)

56. Why TestNG is preferred at Accenture?

Parallel execution, annotations, reporting.


57. Common TestNG annotations?

AnnotationPurpose
@TestTest case
@BeforeMethodSetup
@AfterMethodTeardown

58. DataProvider example:

@DataProvider

public Object[][] data() {

    return new Object[][]{{“admin”,”123″}};

}


59. Hard vs Soft assertion?

HardSoft
Stops executionContinues

60. TestNG XML usage?

Controls execution.


61. Grouping tests?

Execute by category.


62. DependsOnMethods?

Controls dependency.


63. Retry Analyzer?

Re-runs failed tests.


64. Listener usage?

Captures execution events.


65. Parallel execution?

Thread count in XML.


66. JUnit annotations?

@Test, @Before, @After


67. JUnit vs TestNG?

JUnitTestNG
SimpleAdvanced

68. Parameterization?

Multiple test data sets.


69. BDD framework?

Cucumber.


70. Feature file?

Written in Gherkin.


71. Step definition?

Maps steps to code.


72. Hooks?

@Before, @After


73. CI/CD with TestNG?

Automated pipeline execution.


74. API testing tool?

REST Assured.


75. API validations?

Status code, response body, schema.


Selenium + Java + API + DB Scenarios (76–90)

76. End-to-end scenario:

  • Create user via API
  • Validate DB entry
  • Login via UI

77. JDBC connection:

Connection con = DriverManager.getConnection(url,user,pass);


78. Execute query:

ResultSet rs = stmt.executeQuery(“SELECT * FROM users”);


79. UI vs DB validation?

Compare UI value with DB result.


80. API + DB validation?

Verify API response persistence.


81. Parallel execution challenge?

Thread safety.


82. Flaky tests handling?

Explicit waits, retries.


83. Dynamic test data?

Randomization.


84. Environment handling?

Config files.


85. Logging importance?

Debugging failures.


86. Reporting importance?

Stakeholder visibility.


87. CI/CD failure handling?

Auto-rerun + logs.


88. Security testing?

Not handled by Selenium.


89. Performance testing?

Handled by JMeter.


90. Framework scalability?

Modular design.


Common Mistakes in Accenture Java Interviews

  • Weak framework explanation
  • Poor multithreading knowledge
  • Memorized answers
  • No real-time scenarios
  • Ignoring Java basics

1-Page Revision Table / Notes

AreaKey Focus
Core JavaOOP, Collections
SeleniumLocators, Waits
TestNGParallel execution
FrameworkPOM, Hybrid
CI/CDJenkins

FAQs (For Google Ranking)

Is Java mandatory for Accenture experienced roles?

Yes, strong Java fundamentals are expected.

Are framework questions compulsory?

Yes, especially Hybrid and POM frameworks.

Is API + DB testing required?

Yes, integration testing is common.

Is coding required in online test?

Yes, logic-based Java coding is common.

Leave a Comment

Your email address will not be published. Required fields are marked *