Selenium Grid , TestNG Questions & Answers


  1. What is Selenium Grid?
    1. Scale by distributing tests on several machines
    2. manage multiple environments from a central point, making it easy to run the tests against a vast combination of browsers / OS.
    3. minimize the maintenance time for the grid by allowing you to implement custom hooks to leverage virtual infrastructure for instance
    4. All of the above
    Ans: 4
  2. The selenium-server-standalone package includes the ____.
    1. Hub
    2. Webdriver
    3. legacy RC needed to run the grid
    4. All of the above
    Ans: 4
  3. What is Hub in Selenium Grid?
    1. The Hub is framework to run the Grid.
    2. The Hub is the central point that will receive all the test request and distribute them the the right nodes.
    3. Both 1 & 2
    4. None of the above
    Ans: 2
  4. How to start Selenium hub?
    1. java -jar selenium-server-standalone-2.32.0.jar -role node
    2. java -role hub
    3. java -jar selenium-server-standalone-2.32.0.jar -role hub
    4. None of the above
    Ans: 3
  5. How to start Selenium nodes?
    1. java -jar selenium-server-standalone-2.32.0.jar -role node -hub http://localhost:4444/grid/register
    2. java -jar selenium-server-standalone-2.32.0.jar -role hub
    3. java -jar selenium-server-standalone-2.32.0.jar -role node
    4. All of the above
    Ans: 1
  6. How to start remote control on port “5556” and register it to the local hub?
    1. Dport =5556 launch-remote-contro
    2. ant -Dport =5555 launch-remote-contro
    3. ant -Dport =5556 launch-remote-contro
    4. None of the above
    Ans: 3

TestNG

  1. What is TestNG?
    1. TestNG is a testing framework
    2. designed to simplify a broad range of testing needs, from unit testing to integration testing
    3. Both 1 & 2
    4. None of the above
    Ans: 3
  2. What are the annotations available in TestNG?
    1. @BeforeSuite
    2. @AfterSuite
    3. @BeforeTest
    4. @BeforeGroups
    5. All of the above
    Ans: 5
  3. TestNG can be invoked from ____
    1. Command line
    2. ant
    3. Eclipse
    4. IntelliJ's IDEA
    5. All of the above
    Ans: 5
  4. ____ statement will invoke TestNG from command line.
    1. java org.testng.TestNG testng1.xml [testng2.xml testng3.xml ...]
    2. ant -Dport =5556 launch-remote-contro
    3. java org.testng.TestNG
    4. None of the above
    Ans: 1

Followers