0% found this document useful (0 votes)
85 views6 pages

(Presentation) Chapter 4 TestNG XML File - XML

This document discusses TestNG, an XML file for test suites, and TestNG annotations. It provides a table describing common TestNG annotations like @BeforeTest, @AfterTest, @BeforeClass, and @Test that can be used to specify methods to run before, after, or as tests. It also includes links for references on TestNG basics and advanced concepts.

Uploaded by

Rouqia Hamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views6 pages

(Presentation) Chapter 4 TestNG XML File - XML

This document discusses TestNG, an XML file for test suites, and TestNG annotations. It provides a table describing common TestNG annotations like @BeforeTest, @AfterTest, @BeforeClass, and @Test that can be used to specify methods to run before, after, or as tests. It also includes links for references on TestNG basics and advanced concepts.

Uploaded by

Rouqia Hamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Chapter 4

TestNG XML File

Instructor: Rex Jones II


Chapter 4

▪ View xml File For TestNG Suite, Test, Class, & Method Tags

▪ Decide Which TestNG Annotations We Choose For Testing


View xml File For
TestNG Tags
Which Annotation(s)
Do We Choose For Testing
TestNG Annotations
Annotations Description
@BeforeSuite Annotates methods that will be run before any method in a
given <suite> is run
@AfterSuite Annotates methods that will be run after all the test
methods in a given <suite> have been run
@BeforeTest Annotates methods that will be run before any method in a
given <test> is run
@AfterTest Annotates methods that will be run after all the test
methods in a given <test> have been run
@BeforeClass Annotates methods that will be run before the first method
on the current test class is run
@AfterClass Annotates methods that will be run after the last test
method on the current class is run
@BeforeMethod Annotates methods that will be run before each test
method
@AfterMethod Annotates methods that will be run after every test method

@Test Annotates a method as a test method


Reference Links
▪ Next Generation Java Testing TestNG and Advanced
Concepts
[Link]

▪ Getting Started With TestNG (A Java Test Framework)


[Link]

You might also like