App is launched and closed without any action when running with anotation @BeforeTest, @AfterTest

Hello,

I created a Maven project, copied code from Appium studio to Eclipse, and testng.xml file.

If I use the code from Appium studio with anotation @Before, @After, nothing happened when running testng.xml file (image below)

If I change anotation to @BeforeTest, @AfterTest, app is launched but it closed immediately also. No steps are executed.

Does anyone know what happened?

Any help would be appreciated. Thank you.

Sorry, I imported incorrect library.