I have a test suite where Testng groups are specified:

<include name = "precondition1"/>
and Testng classes where groups specified as well:

@Test(groups = { "precondition1" } )
In parent class I have several @BeforeMethods which depend on testng groups:

@BeforeMethod(groups = {"precondition1"})
@BeforeMethod(groups = {"precondition2"})
All works ok when I launch suite but all the @BeforeMethods are launched when I launch testNg class separately. How can I avoid the problem? Thanks in advance.