Top Framework Interview Questions for SDET

Beknazar
4 min readDec 20, 2023

Hi there! I put together the top Framework interview questions for SDET or Test Automation roles. The questions and answers are based on a framework with Java, Selenium, Cucumber, JUnit, Jenkins, and SauceLabs tools.

Please consider taking my Udemy course Interview Preparation for SDET(Java) if you prefer video sessions with more detailed explanations.

Can you tell me about your framework?

My framework is written in Java. It is based on Selenium, JUnit, Cucumber, and Maven. Selenium is for web automation, JUnit is for assertions, Cucumber is to have a behavior-driven structure with reusable steps, and Maven is to manage projects and dependencies. To better organize my elements in the framework I use the page object model (POM) where each UI page has a corresponding Java class with necessary elements.

How does your code run as part of CI and what is your CI strategy?

We have two different automated suits we run as part of the CI process.

First is a smoke suit. We maintain a small set of critical tests which we run for every release in the Dev environment (for every change) to make sure new changes will not break core features and have quick feedback. This Jenkins job is part of the development pipeline and triggered after the Dev environment deployment.

Second, is the regression suit with all our automated tests. We run this suit in Jenkins manually against the Test environment before each release as part of the regression test execution.

Tell me about the execution flow of your framework.

When we run from the maven command, it triggers the maven-surefire-plugin and then from there, it goes to the cucumber runner class and then to features files to run the step definitions.

How do you manage credentials inside your framework?

I manage credentials by using Maven system properties

mvn test -Dusername=john_doe@gmail.com -Dpassword=12345a

How do you manage running in different environments?

I get the value from maven system properties and use it to differentiate env URL

How do you manage test data in your framework?

  • The majority of my test data exists in cucumber scenarios.
  • If test data is not suitable for the cucumber scenario, I keep it under the resources folder. For some instances, I use external storage like S3 buckets.

What kind of reports do you generate from your framework?

My framework generates maven-cucumber-reporting (cucumber reports) reports.

        <dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>5.7.7</version>
</dependency>

What’s a singleton pattern and why do you need to use it in your framework?

  • Singleton is a creational design pattern that lets you ensure that a class has only one instance while providing a global access point to this instance.
  • We need a singleton to have one instance of Driver during the execution.

Thank you for your attention. Please consider taking my online courses:

--

--