79814844

Date: 2025-11-09 14:46:42
Score: 4.5
Natty:
Report link

I'm also facing the same issue, tests runs just fine with direct class name or even direct package reference, but as soon as I try to run with groups then it fails with null pointer exception.

I noticed that, when groups are included in xml then it even not going for @BeforeClass and @BeforeMethod methods from superclass which is overridden in test class and that is the reason test is trying to execute before initializing the web drivers and ended up with null pointer exception.

I've tried to rename the methods in superclass to avoid collision but none worked. With same configuration it runs fine if I remove the groups from testng xml suite.

Note that group names are correctly specified in the @test.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Me too answer (2.5): I'm also facing the same issue
  • User mentioned (1): @BeforeClass
  • User mentioned (0): @BeforeMethod
  • User mentioned (0): @test
  • Low reputation (1):
Posted by: Irshad Telsang