{"id":27962154,"url":"https://github.com/cihat-kose/testng-practice-lessons","last_synced_at":"2025-08-19T19:28:27.230Z","repository":{"id":288922657,"uuid":"619175600","full_name":"cihat-kose/testng-practice-lessons","owner":"cihat-kose","description":"Hands-on UI automation practice with Selenium, TestNG and Java. ","archived":false,"fork":false,"pushed_at":"2025-04-20T12:59:28.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T19:14:31.106Z","etag":null,"topics":["java-selenium-testng","testing-automation","testng","ui-testing"],"latest_commit_sha":null,"homepage":"https://testng.org/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cihat-kose.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-26T13:50:45.000Z","updated_at":"2025-04-20T12:59:31.000Z","dependencies_parsed_at":"2025-04-20T13:42:41.096Z","dependency_job_id":"30dd58a7-aac2-4943-8b9f-60370fabbc26","html_url":"https://github.com/cihat-kose/testng-practice-lessons","commit_stats":null,"previous_names":["cihat-kose/testng-practice-lessons"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Ftestng-practice-lessons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Ftestng-practice-lessons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Ftestng-practice-lessons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Ftestng-practice-lessons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cihat-kose","download_url":"https://codeload.github.com/cihat-kose/testng-practice-lessons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252940911,"owners_count":21828769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java-selenium-testng","testing-automation","testng","ui-testing"],"created_at":"2025-05-07T19:14:34.635Z","updated_at":"2025-08-19T19:28:27.218Z","avatar_url":"https://github.com/cihat-kose.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TestNG Practice Lessons\n\n![Java](https://img.shields.io/badge/Java-ED8B00?style=for-the-badge\u0026logo=java\u0026logoColor=white)\n![TestNG](https://img.shields.io/badge/TestNG-FF9E2C?style=for-the-badge\u0026logo=testng\u0026logoColor=white)\n![Selenium](https://img.shields.io/badge/Selenium-43B02A?style=for-the-badge\u0026logo=selenium\u0026logoColor=white)\n![Log4j2](https://img.shields.io/badge/Log4j2-ff1100?style=for-the-badge\u0026logo=apache\u0026logoColor=white)\n![Maven](https://img.shields.io/badge/Maven-C71A36?style=for-the-badge\u0026logo=apachemaven\u0026logoColor=white)\n\n## 💡 Introduction\nWelcome to the **testng-practice-lessons** repository! This project is designed for SDET students to reinforce their knowledge through practical lessons. It demonstrates how to perform test automation using **TestNG** with TestNG-specific features like annotations, parallel execution, and data providers.\n\n## Table of Contents\n- [💡 Introduction](#💡-introduction)\n- [📥 Installation](#📥-installation)\n- [⚙️ Usage](#⚙️-usage)\n- [✨ Features](#✨-features)\n- [📦 Dependencies](#📦-dependencies)\n- [🔧 Configuration](#🔧-configuration)\n- [📚 Documentation](#📚-documentation)\n- [💡 Examples](#💡-examples)\n- [🛠️ Troubleshooting](#🛠️-troubleshooting)\n- [👥 Contributors](#👥-contributors)\n- [🤝 Contributing](#🤝-contributing)\n- [📜 License](#📜-license)\n\n## 📥 Installation\n### Cloning the Repository\nTo install TestNGCurrent, clone the repository to your local machine:\n```bash\ngit clone https://github.com/cihat-kose/testng-practice-lessons.git\n```\n### Importing into IntelliJ IDEA from VCS\n1. Open IntelliJ IDEA.\n2. Go to `File` \u003e `New` \u003e `Project from Version Control`.\n3. In the dialog, select `Git` and enter the repository URL: `https://github.com/cihat-kose/testng-practice-lessons.git`.\n4. Click `Clone`.\n\n### Adding Dependencies from Maven\n1. Open IntelliJ IDEA.\n2. Navigate to `File` \u003e `Project Structure` \u003e `Libraries`.\n3. Click on the `+` icon and select `From Maven`.\n4. In the dialog, search for the necessary libraries using the Maven coordinates:\n    - `org.apache.logging.log4j:log4j-api:2.20.0`\n    - `org.apache.logging.log4j:log4j-core:2.20.0`\n    - `commons-io:commons-io:2.18.0`\n    - `org.seleniumhq.selenium:selenium-java:4.32.0`\n    - `org.slf4j:slf4j-nop:2.0.17`\n    - `org.testng:testng:7.11.0`\n5. Click `OK` to add the selected libraries.\n\nFor each library, you can also use a higher version if available.\n\n## ⚙️ Usage\nEnsure that you have the necessary dependencies installed and navigate to the `src` directory to set up and execute the test cases.\n\n### 1. Running from XML File\nRun your tests from any TestNG XML file by following these steps:\n\n```bash\n# From IntelliJ IDEA or Eclipse\nRight-click on any XML file (e.g., 'cross-browser-test.xml') and select 'Run'.\n\n# To run from command line with Maven\nmvn test -DsuiteXmlFile=your-test-suite.xml\n```\n\n### 2. Running Test Classes Directly\nYou can directly run test classes annotated with TestNG:\n\n```bash\n# Right-click on the class in IntelliJ IDEA and select 'Run ClassName'.\n\n# To run all test classes with Maven\nmvn test\n```\n\n## ✨ Features\n- **Sorting**: Organize tests in a specific order.\n- **Annotations**: Use TestNG's rich set of annotations to define test methods.\n- **Enable/Disable**: Enable or disable tests dynamically.\n- **Assertions**: Utilize TestNG assertions to validate test outcomes.\n- **Dependency Management**: Manage test method dependencies.\n- **Groups**: Group tests for selective execution.\n- **Cross Browser Testing**: Execute tests across multiple browsers.\n- **Parallel Testing**: Run tests in parallel to save time.\n- **XML Configuration**: Configure test suites using `testng.xml`.\n- **Data Providers**: Supply data to test methods.\n- **Parameterized Tests**: Run the same test with different parameters.\n- **Page Object Model (POM)**: Implement POM for cleaner code.\n- **HTML Reporting**: Generate HTML reports for test results.\n- **Logging**: Integrated logging using Log4j2 for tracking and debugging test execution.\n\n## 📦 Dependencies\n| Dependency          | Version | Link                                                                                                                                                                                     |\n|---------------------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Java                | 21+     | [Java](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)                                                                                                             |\n| TestNG              | 7.11.0  | [TestNG](https://mvnrepository.com/artifact/org.testng/testng/7.9.0)                                                                                                                     |\n| Selenium WebDriver  | 4.32.0  | [Selenium](https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java/4.25.0)                                                                                              |\n| Log4j2              | 2.20.0  | [Log4j2 API](https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api/2.20.0), [Log4j2 Core](https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core/2.20.0) |\n| Commons IO          | 2.18.0  | [Commons IO](https://mvnrepository.com/artifact/commons-io/commons-io/2.11.0)                                                                                                            |\n| SLF4J NOP           | 2.0.17  | [SLF4J NOP](https://mvnrepository.com/artifact/org.slf4j/slf4j-nop/1.7.30)                                                                                                                |                                                                                                       |\n\n## 🔧 Configuration\nConfiguration details can be found in the `testng.xml` file and other relevant configuration files within the project. Log4j2 configuration is set up in the `log4j2.xml` file to provide detailed logging.\n\n### Log4j2 Integration\nThe project uses Log4j2 for logging purposes. Ensure the necessary dependencies are included in your project and the `log4j2.xml` file is correctly configured for detailed logging. Logging is crucial for tracking and debugging test execution; `BaseDriver` utilizes Log4j2 to log test methods' start, end, and results.\n\n## 📚 Documentation\nDetailed documentation is available in the repository's `README.md` file and inline comments within the codebase. Here are some tools and programs used:\n- [Java](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)\n- [Selenium WebDriver](https://www.selenium.dev/downloads/)\n- [TestNG](https://testng.org/doc/download.html)\n- [IntelliJ IDEA](https://www.jetbrains.com/idea/)\n- [Maven](https://maven.apache.org/)\n- [Git](https://git-scm.com/)\n\n## 💡 Examples\nThis project includes several examples designed to demonstrate TestNG's capabilities, including:\n\n### Annotations\n- **@Test**: Define individual test methods.\n- **@BeforeClass/@AfterClass**: Setup and teardown methods for test classes.\n- **@BeforeMethod/@AfterMethod**: Run methods before and after each test method.\n\n### Parallel Execution\n- **Parallel Execution in XML**: Configure parallel execution in the `testng.xml` file for faster test execution.\n\n### Data Providers\n- **Data Providers**: Pass data to test methods dynamically using the `@DataProvider` annotation.\n\n### Cross Browser Testing\n- **Browser Setup**: Set up tests to run on multiple browsers using WebDriver.\n\n## 🛠️ Troubleshooting\nIf you encounter any issues:\n- Ensure that TestNG and Selenium WebDriver are properly installed and operational.\n- Verify that your Java environment is correctly set up for TestNG and other dependencies.\n- Check that your IntelliJ IDEA and other development tools are configured according to the project's requirements.\n- If problems persist, check your Maven configurations to ensure all necessary dependencies are correctly included.\n\nFor additional help, please open an issue in the GitHub repository.\n\n## 👥 Contributors\n- [cihat-kose](https://github.com/cihat-kose)\n\n## 🤝 Contributing\nContributions are welcome! Please follow these steps:\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Commit your changes (`git commit -m 'Add new feature'`).\n4. Push to the branch (`git push origin feature-branch`).\n5. Create a Pull Request.\n\n## 📜 License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\nFor more information on how to get started, visit the [TestNG Practice Lessons](https://github.com/cihat-kose/testng-practice-lessons.git).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcihat-kose%2Ftestng-practice-lessons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcihat-kose%2Ftestng-practice-lessons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcihat-kose%2Ftestng-practice-lessons/lists"}