Saturday, May 5, 2018

Top 50 Java Interview Questions | SDET Role

Oracle (and other companies) interview experience for SDET Java Role (Core Java - Basic Concepts, Algorithms & data structure, Cucumber framework, Selenium and TestNG, REST API)

Essential skills | SDET Java Role

Programming Languages
Knowledge of Java and Python is helpful. Basics of Core Java (Inheritance, OOPS, Collections, Exception handling)
Algorithms & DS
Basic understanding of Algorithms & DS (Sorting, Searching, recursion, dynamic programming, hash table and List etc.)
Testing Frameworks
Knowledge of Test Libraries for Unit, Acceptance and End To End Testing for e.g. JUNIT, TestNG, Hemcrest, Cucumber, Selenium and Rest Assured for REST API testing. Ability to write small framework for testing from scratch using Core Java.
SQL & UNIX Shell
Basic Knowledge of SQL, Database and Linux Shell Programming.
Build Tools and CI Pipeline
Knowledge of atleast one build tool- Travis CI, Jenkins CI, Teamcity, etc. Maven, Gradle, Vagrant, Docker, Build CI & CD and Automation Tools - Jenkins, ability to setup a build pipeline on Jenkins.
Quant and Aptitude
Puzzles and Quantitative aptitude

    Java Questions

    1. What is difference between JDK, JVM and JRE?
    2. What is super class in Java?
    3. How will you make sure that main thread is the last one to exit?
    4. Main Interfaces in Collections API - List, Set, Map. What is difference between them?
    5. Enumerator vs Iterator? Which one is thread safe?
    6. Can collection classes be made serializable. How to do that?
    7. catch NPE first and Exception in last, will that work? Discuss the exception hierarchy. What are the inheritance rules for Exceptions.
    8. Error and exception difference with example. StackoverflowError, OOMError, etc.
    9. Custom exceptions, how will you create one?
    10. How will you compare two java objects?
    11. Multiple inheritance in Java? [oracle]
    12. overriding and overloading difference.
    13. Inheritance vs Composition in Java.
    14. How to swap two numbers without a temporary variable? Discuss XOR approach. what are problems with addition approach? Integer overflow.

    Algorithms and DS

    1. Identify the pangram sentence from array of sentences. Pangram is a string that contains all the alphabets from a-z.
    2. Searching an elements from a sorted and rotated array.
    3. Find two numbers of which the product is maximum in an array. sort and multiply first or last two elements.
    4. Sorting algorithms
    5. How to find the relative efficiency of a given algorithms
    6. find first not-repeating character by iterating through the length of the string only once and by using constant space.
    7. Print fibonacci series
    8. Print prime numbers upto x
    9. Implement a stack data structure.
    10. Reverse the ordering of words in a string

    Testing Framework Questions

    1. JUNIT vs TestNG what are differences? Which one is better for QA?
    2. TestNG hierarchy - Tests, suites, classes, etc.
    3. Parameterization of tests in TestNG and data providers.
    4. TestNG Listeners. Uses
    5. Selenium and Rest API testing frameworks

    Linux & Shell

    1. How to run a program in background
    2. How to create a service for running jar
    3. How to make sure that a program is restarted if terminated
    4. How to list selected processes
    5. How to kill a process
    6. How to search for keywords in files in current directory
    7. What is awk command, sed command
    8. How to copy a file from one machine to another?
    9. Continuously monitor last 100 lines of a log file.
    10. How to connect to a remote server and execute certain commands.
    11. I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this? unix pipes.
    12. Unix permissions concepts chmod +x file.
    13. How does password less login works? At a higher level.

    Database and SQL

    1. Employee and Department table - all employees from employee table and only departments that exists for a employee from department table. Left outer join.
    2. How to delete duplicate records from a given table. (duplicate based on specified fields)
    3. 2nd highest salary in SQL, how will you find it out.

    Build Tools and CI/CD

    1. Maven and Gradle basics (PMD rules, Firebug, Code coverage tools, etc.)
    2. What is CI and CD
    3. How is your CI/CD and build environment setup in your project. Jenkins, Regression Test, etc. explain the stuff.
    4. How to setup a build pipeline in Jenkins
    5. How to seamlessly deploy to AWS EC2 cloud upon single commit in version control. Just the high level steps/approach.

    No comments:

    Post a Comment

    Your comment will be published after review from moderator