TestNG Groups: Include, Exclude with Example – Selenium Tutorial (Medium)

AwedExuberance avatar
AwedExuberance
·
·
Download

Start Quiz

Study Flashcards

30 Questions

Which group parameter is associated with the first test case?

none

Which test case is tagged with both 'strong_ties' and 'bonding' groups?

tc04VerifyLoggedInPage

Which scenario involves removing the group tag from the running XML?

Scenario 1

Which scenario involves running test cases specific to a particular group?

Scenario 2

Which scenario involves excluding a test case?

Scenario 3

Which scenario involves including specific test cases?

Scenario 4

How many test cases are associated with the 'bonding' group?

3

Which test case is tagged with the 'strong_ties' group?

tc03EnterCredentials

Which test case is not associated with any group parameter?

tc02VerifyLoggedInPage

Which test case is associated with both 'bonding' and 'strong_ties' groups?

tc05VerifyHyperlinks

Which types of test designs does TestNG cover?

Functional and UI tests

How can you run single or multiple packages in TestNG?

By creating XML and running it through maven

When do we use groups in TestNG?

When we want to ignore some test cases

What are the two mechanisms supported in TestNG for grouping test cases?

Include and exclude

What is the syntax for using groups in the XML file?

@Test (groups = { 'group_name' })

What are the logical names used for groups in TestNG?

bonding and strong_ties

What is the purpose of using the 'exclude' mechanism in TestNG?

To ignore (not execute) some test cases

What is the purpose of using the 'include' mechanism in TestNG?

To include specific test cases in a group

What is the purpose of creating an XML file for TestNG?

To configure testng.xml file

What can be encapsulated in a package in TestNG?

A group of classes

What is the purpose of the XML file in the Maven framework?

To store information about one or more tests

What is the purpose of the @Test annotation in TestNG?

To define a Java class as a TestNG method

What is the purpose of the 'exclude' tag in the TestNG XML?

To exclude specific test cases

What is the purpose of the 'include' tag in the TestNG XML?

To include specific test cases

What is the purpose of the 'groups' attribute in the @Test annotation?

To assign test methods to specific groups

What is the purpose of the 'tc01LaunchURL' method in the TC_Class1 class?

To initialize the browser and launch the URL

What is the purpose of the 'tc02VerifyLaunchPage' method in the TC_Class1 class?

To verify the presence of the home page heading

What is the purpose of the 'tc03EnterCredentials' method in the TC_Class1 class?

To enter the username and password on the login form

What is the purpose of the 'tc04VerifyLoggedInPage' method in the TC_Class1 class?

To verify the presence of the Manager ID on the user dashboard

What is the purpose of the 'tc05VerifyHyperlinks' method in the TC_Class1 class?

To verify the presence of additional links on the user dashboard

TestNG Groups - Include & Exclude (Example) is a quiz that tests your knowledge on using TestNG's grouping feature to include and exclude specific test cases. This quiz covers topics such as creating XML configurations, running single or multiple packages, and organizing tests based on different test designs. TestNG is a popular testing framework used for unit, functional, end-to-end, UI, and integration tests.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Use Quizgecko on...
Browser
Browser