testng-skill

Generates Java TestNG tests with XML suite configuration and parallel execution.

350|69|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/LambdaTest/agent-skills --skill testng-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testng-skill
Source: https://github.com/LambdaTest/agent-skills/tree/main/testng-skill
Command: npx skills add https://github.com/LambdaTest/agent-skills --skill testng-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the creation and configuration of TestNG tests in Java, enabling efficient unit and integration testing with advanced features.

Core Features & Use Cases

  • TestNG Test Generation: Create basic and data-driven TestNG tests.
  • Configuration: Set up XML suites, parallel execution, and listeners.
  • Use Case: Generate a TestNG suite that runs smoke tests in parallel across multiple browsers, reporting failures with screenshots.

Quick Start

Use the testng-skill to generate a basic Java TestNG test class with a @Test annotation and a @BeforeMethod setup.

Frequently Asked Questions about testng-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a data-driven TestNG test in Java?

To write a data-driven TestNG test in Java, you use Data Providers to pass multiple sets of data to your test methods. This enables structured and scalable test automation by executing the same test logic across various inputs.

How do I configure test groups and parallel execution in TestNG XML?

You configure test groups and parallel execution in TestNG XML by defining suite files that specify parallel attributes and group inclusions. This facilitates running complex testing scenarios like smoke tests across multiple browsers simultaneously.

Can I use soft assertions and retry mechanisms in TestNG for complex test scenarios?

Yes, you can use soft assertions and retry mechanisms in TestNG to handle complex test scenarios. These advanced features allow your Java tests to continue executing after a failure and automatically retry failed test cases.

What is the best way to add listeners for screenshot reporting in a TestNG suite?

The best way to add listeners for screenshot reporting in a TestNG suite is by configuring them within your XML suite files. This addresses the need for robust reporting of failures by capturing screenshots automatically during test execution.

Does TestNG support structured unit testing for scalable Java projects?

Yes, TestNG supports structured unit testing for scalable Java projects. It generates basic and data-driven Java tests with @Test annotations and setup methods, addressing the need for efficient unit and integration testing.