Selenium Java - TestNG IntegrationWhich TestNG annotation attribute is used to assign a test method to one or more groups?A@Test(timeout = 1000)B@Test(priority = 1)C@Test(enabled = false)D@Test(groups = {"groupName"})Check Answer
Step-by-Step SolutionSolution:Step 1: Recall TestNG @Test attributesThe 'groups' attribute is used to assign tests to groups.Step 2: Match attribute to usage@Test(groups = {"groupName"}) correctly assigns groups.Final Answer:@Test(groups = {"groupName"}) -> Option DQuick Check:Assign groups = @Test(groups) [OK]Quick Trick: Use groups attribute inside @Test to assign groups [OK]Common Mistakes:Using priority instead of groupsConfusing enabled or timeout with groupsMissing curly braces for multiple groups
Master "TestNG Integration" in Selenium Java9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepTraceTryChallengeAutomateRecallFrame
More Selenium Java Quizzes Actions Class - Click and hold - Quiz 9hard Handling Form Elements - File upload (sendKeys to input) - Quiz 4medium Handling Form Elements - File upload (sendKeys to input) - Quiz 6medium Handling Windows, Frames, and Alerts - Why context switching is essential - Quiz 12easy JavaScriptExecutor - Async script execution - Quiz 6medium Page Object Model - PageFactory initialization - Quiz 11easy Page Object Model - Base page class pattern - Quiz 14medium Page Object Model - Page class design - Quiz 3easy TestNG Integration - Parallel execution configuration - Quiz 15hard TestNG Integration - TestNG annotations (@Test, @BeforeMethod, @AfterMethod) - Quiz 3easy