TestNG

AwedExuberance avatar
AwedExuberance
·
·
Download

Start Quiz

Study Flashcards

30 Questions

Which method is used to navigate to the SnapDeal URL?

navigate()

Which method is used to log in to Flipkart?

login()

Which method is used to search for a product in SnapDeal?

searchAndSelectProduct()

Which method is used to buy and remove a product from the cart in SnapDeal?

buyAndRemoveFromCart()

Which method is used to log out from SnapDeal?

logout()

Which method is used to maximize the browser window in SnapDeal?

maximize()

Which method is used to accept an alert in SnapDeal?

accept()

Which method is used to switch to a frame in SnapDeal?

switchTo()

Which method is used to perform a mouse hover action in SnapDeal?

moveToElement()

Which method is used to close the browser in SnapDeal?

close()

Which tool enables you to run test methods, test classes, and test cases in parallel inside your project?

TestNG

What is the purpose of performing parallel execution in testing?

To reduce execution time

What is the first step in running multiple classes using TestNG?

Create a TestNG.xml file

What does the TestNG.xml file contain?

All of the above

Which package should the class 'Flipkart' be placed in?

com.suite1

What is the purpose of the 'init()' method in the 'Flipkart' class?

To maximize the browser window

What is the purpose of the 'login()' method in the 'Flipkart' class?

To log in to Flipkart

Which method is annotated with '@BeforeClass' in the 'Flipkart' class?

init()

Which method is annotated with '@Test' in the 'Flipkart' class?

login()

Which WebDriver is used in the 'Flipkart' class?

FirefoxDriver

Which attribute is used to log the execution details in the console in TestNG?

verbose

What is the default value of the 'Parallel' attribute in TestNG?

none

Which attribute is used to specify the name of the test suite in TestNG?

name

How can you execute multiple test suites in parallel using TestNG?

By setting the 'Parallel' attribute to 'suites'

What is the purpose of the 'thread-count' attribute in TestNG?

To execute scripts in parallel or sequential order

What is the range of values for the 'verbose' attribute in TestNG?

1-10

What is the purpose of the 'name' attribute in TestNG?

To specify the name of the test suite

Which attribute is used to run scripts parallel in TestNG?

Parallel

What happens when you increase the value of the 'verbose' attribute in TestNG?

The execution details in the console become more detailed and clearer

What is the purpose of TestNG?

To execute multiple test suites in parallel

TestNG: Running Multiple Test Classes in Parallel with TestNG.xml

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser