A TestNG-based UI testing framework for SDET training. Demonstrates TestNG annotations, parallel testing, cross-browser testing, logging with Log4j2, and structured reporting. Designed to help students strengthen automation testing skills with practical examples and configuration.
git clone https://github.com/cihat-kose/testng-practice-lessons.gitA TestNG-based UI testing framework for SDET training. Demonstrates TestNG annotations, parallel testing, cross-browser testing, logging with Log4j2, and structured reporting. Designed to help students strengthen automation testing skills with practical examples and configuration.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/cihat-kose/testng-practice-lessonsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Create a TestNG-based UI testing framework for [COMPANY] in the [INDUSTRY] sector. The framework should include TestNG annotations, parallel testing, cross-browser testing, logging with Log4j2, and structured reporting. Provide practical examples and configuration details for [DATA] to help students strengthen their automation testing skills.
# TestNG-Based UI Testing Framework for [COMPANY] in the [INDUSTRY] Sector
## Framework Overview
This framework is designed to help students strengthen their automation testing skills with practical examples and configuration. It includes the following features:
- **TestNG Annotations**: Utilizes TestNG annotations such as @BeforeMethod, @AfterMethod, @Test, and @DataProvider for structured test case management.
- **Parallel Testing**: Supports parallel test execution to improve test execution time and efficiency.
- **Cross-Browser Testing**: Enables testing across different browsers to ensure compatibility and robustness.
- **Logging with Log4j2**: Implements Log4j2 for comprehensive logging, making it easier to debug and track test execution.
- **Structured Reporting**: Generates detailed test reports for better analysis and reporting.
## Practical Examples
### Example 1: TestNG Annotations
```java
public class TestNGAnnotationsExample {
@BeforeMethod
public void setUp() {
System.out.println("Setting up the test environment");
}
@Test
public void testLogin() {
System.out.println("Executing login test");
}
@AfterMethod
public void tearDown() {
System.out.println("Cleaning up the test environment");
}
}
```
### Example 2: Parallel Testing
```java
public class ParallelTestingExample {
@Test(threadPoolSize = 3, invocationCount = 5, timeOut = 1000)
public void parallelTest() {
System.out.println("Executing parallel test");
}
}
```
## Configuration Details
### TestNG XML Configuration
```xml
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Test Suite" parallel="tests" thread-count="2">
<test name="Test 1">
<classes>
<class name="TestNGAnnotationsExample"/>
</classes>
</test>
<test name="Test 2">
<classes>
<class name="ParallelTestingExample"/>
</classes>
</test>
</suite>
```
### Log4j2 Configuration
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
```Your one-stop shop for church and ministry supplies.
Automate your browser workflows effortlessly
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power