BeforeSuite and AfterSuite in TestNG Doubt | Selenium Forum
M
Posted on 24/07/2016
I have two attachments.
YahooTest.java and YahooNewsTest.java
I have @BeforeSuite and @AfterSuite in Yahootest.java. Both files run fine as TestNGSuite and TestNGTest.

But When i copy the functions and annotations of @BeforeSuite and @AfterSuite to YahooNewsTest.java
i am getting the following compiler error on the function definitions.

"Illegal modifier for parameter beforeSuite; only final is permitted".

I have tried modifying the order of test in testng.xml, but it did not work. I can't execute it as TestNGTest also.

M
Replied on 25/07/2016

it is working fine for me.

could you please tell me the version of java you're using and send a screen shot.


M
Replied on 03/08/2016

Hi i did some mistake from my side.
Hence the issue. It works fine