How nikhithamadishetti/simple_testng_project works
Project type and purpose
• This is a Java‐based automated test suite project built around the TestNG testing framework.
• Its purpose is to demonstrate TestNG features—parameterization, grouping, dependency management, parallel execution, data providers, and listeners—and to generate human‐ and machine‐readable reports.
File structure
• Top‐level
• testng.xml – TestNG suite configuration file that declares which tests to run and with what parameters.
• SimpleTestNGProject directory
• src/… – Java test classes, each demonstrating a TestNG feature:
– AssertionsAndParameter.java
– Dataprovider.java
– DependencyMethods.java
– FirstTestNGTestCase.java, SecTestNGTestCase.java
– GroupingTestcases.java
– ListernerTest.java, ITestListernerTests.java
– ParallelExecution.java, ParallelExecution1.java
– TC1.java, TC2.java
– TestMethodUsingDataProviderMethod.java
• bin/… – compiled .class files (output of build).
• test-output/… – directory with generated HTML, XML, CSS, JS, and JUnit‐style XML test reports.
Insights from README
• Minimal content—project name only.
a. Main components (group into logical zones):
1. Configuration Layer
– testng.xml (suite definitions)
2. Execution Engine
– TestNG Core Runner (parses XML, scans for annotations)
3. Test Code Layer
– Test Classes (src/*.java)
– Data Provider Methods
– Listener Implementations
4. Reporting Layer
– Report Generator (internal to TestNG)
– Output Directory (test-output/)
b. Relationships and data flows:
– Runner → (loads) → Test Classes & Data Providers
– Runner → (invokes callbacks) → Listeners
– Runner → (executes) → Test Methods (grouped by annotation directives, parallel or sequential)
– Runner → (sends results) → Report Generator
– Report Generator → (writes) → test-output (HTML, XML, JUnit XML, CSS/JS)
c. Architectural patterns & principles:
– Annotation‐driven execution (TestNG @Test, @Before, @After, etc.)
– Event‐driven extension points (DataProviders, ITestListener, etc.)
– Separation of concerns: configuration, execution, test logic, reporting
d. Key technologies & libraries:
– Java 8+
– TestNG framework core
– Built‐in HTML/XML report generators
– Optional JUnit XML for CI/CD integration