{"id":8549,"date":"2018-07-27T13:36:26","date_gmt":"2018-07-27T13:36:26","guid":{"rendered":"https:\/\/appening.xyz\/?p=8549"},"modified":"2024-01-15T09:16:09","modified_gmt":"2024-01-15T09:16:09","slug":"testing-next-generation-testng","status":"publish","type":"post","link":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/","title":{"rendered":"Testing Next Generation &#8211; TestNG"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p style=\"font-weight: 400;\"><b>TestNG<\/b><span style=\"font-weight: 400;\"> is a testing framework inspired from <\/span><b>JUnit<\/b><span style=\"font-weight: 400;\"> and <\/span><b>NUnit<\/b><span style=\"font-weight: 400;\"> but introducing some new functionality that makes it more powerful and easier to use.<\/span><\/p>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">It is an open-source automated testing framework where <\/span><b>NG<\/b><span style=\"font-weight: 400;\"> of Test<\/span><b>NG <\/b><span style=\"font-weight: 400;\">means <\/span><b>N<\/b><span style=\"font-weight: 400;\">ext <\/span><b>G<\/b><span style=\"font-weight: 400;\">eneration. <\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/p>\n<h2 style=\"font-weight: 400;\"><span class=\"ez-toc-section\" id=\"why-test-ng\"><\/span>Why Test NG<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">These are the major advantages of Test NG <\/span><\/p>\n<ul style=\"font-weight: 400;\">\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Test NG has advanced features which help us to easily maintain our automation scripts. <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">It can achieve <\/span><b>Batch execution <\/b><span style=\"font-weight: 400;\">and <\/span><b>Parallel execution<\/b><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">It can achieve <\/span><b>Group execution<\/b><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">It gives the ability to produce <\/span><b>HTML Reports<\/b><span style=\"font-weight: 400;\"> of execution <\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Data <\/span><b>Parameterization <\/b><span style=\"font-weight: 400;\">is possible\u00a0\u00a0<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"annotations-available-in-testng\"><\/span>Annotations available in TestNG<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul style=\"font-weight: 400;\">\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@BeforeSuit<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@AfterSuit<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@BeforeTest<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@AfterTest <\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@BeforeClass <\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@AfterClass<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@BeforeMethod\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@AfterMethod<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@Test<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@Parameters<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">@DataProvider<\/span><\/li>\n<\/ul>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">To use TestNG first you have to install <\/span><i><span style=\"font-weight: 400;\">Test NG plugin<\/span><\/i><span style=\"font-weight: 400;\"> in <\/span><i><span style=\"font-weight: 400;\">Eclipse IDE.<\/span><\/i><\/p>\n<p style=\"font-weight: 400;\"><strong>Test NG Class: <\/strong><span style=\"font-weight: 400;\">The class which contains at least one <\/span><b>@Test<\/b><span style=\"font-weight: 400;\"> annotation is called <\/span><b>TestNG class.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8551 size-full\" src=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/class.png\" alt=\"\" width=\"620\" height=\"362\" \/><\/b><\/p>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>The output is:-<\/strong> <\/span><\/p>\n<p>This is Before Method<br \/>\nMy First Test<br \/>\nThis is After Method<br \/>\nThis is Before Method<br \/>\nMy Second Test<br \/>\nThis is After Method<br \/>\n===============================================<br \/>\nSuite<br \/>\nTotal tests run: 2, Failures: 0, Skips: 0<br \/>\n===============================================<\/p>\n<h2 style=\"font-weight: 400;\"><span class=\"ez-toc-section\" id=\"batch-execution-run-script-multiple-times\"><\/span>Batch Execution &amp; Run Script Multiple times<span style=\"font-weight: 400;\"> \u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"font-weight: 400;\"><b>Batch Execution<\/b><span style=\"font-weight: 400;\">: Executing multiple scripts or multiple TestNG class is called<\/span><i><span style=\"font-weight: 400;\"> Batch Execution.<\/span><\/i><span style=\"font-weight: 400;\"> For achieving batch execution:- \u00a0<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"> We have to generate a TestNG suit file.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Add all the classes in the TestNG classes as shown below. <\/span><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8552 size-full\" style=\"color: #333333; font-style: normal; font-weight: 400; margin-top: 0.4em;\" src=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/Batch.png\" alt=\"\" width=\"669\" height=\"349\" \/><\/span><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><\/span><\/li>\n<\/ol>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">For generating TestNG suit simply just <\/span><i><span style=\"font-weight: 400;\">Right click<\/span><\/i><span style=\"font-weight: 400;\"> on <\/span><b>TestNG class <\/b><span style=\"font-weight: 400;\">and move to TestNG and click on <\/span><b>Convert to TestNG. <\/b><span style=\"font-weight: 400;\">We can also create a suit file for a package which contains all TestNG classes by just <\/span><i><span style=\"font-weight: 400;\">right-clicking<\/span><\/i><span style=\"font-weight: 400;\"> on the package and following the same.<\/span><\/p>\n<p style=\"font-weight: 400;\"><b>Run Script Multiple Times<\/b><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\">To run a test script multiple times we have to use <\/span><b>InvocationCount <\/b><span style=\"font-weight: 400;\">after <\/span><b>@Test <\/b><span style=\"font-weight: 400;\">annotation.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8553 size-full\" src=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/Run-Script-Multiple-Times.png\" alt=\"\" width=\"633\" height=\"319\" \/><\/p>\n<p style=\"font-weight: 400;\"><strong>The output is:- \u00a0<\/strong><\/p>\n<p>This is Before Method<br \/>\nMy First Test<br \/>\nThis is After Method<br \/>\nThis is Before Method<br \/>\nMy First Test<br \/>\nThis is After Method<br \/>\nThis is Before Method<br \/>\nMy First Test<br \/>\nThis is After Method<br \/>\nThis is Before Method<br \/>\nMy First Test<br \/>\nThis is After Method<br \/>\nThis is Before Method<br \/>\nMy First Test<br \/>\nThis is After Method<br \/>\nThis is Before Method<br \/>\nMy Second Test<br \/>\nThis is After Method<br \/>\n===============================================<br \/>\nSuite<br \/>\nTotal tests run: 6, Failures: 0, Skips: 0<br \/>\n===============================================<\/p>\n<h3 style=\"font-weight: 400;\"><span class=\"ez-toc-section\" id=\"for-changing-the-order-of-script-execution\"><\/span>For changing the order of script execution<span style=\"font-weight: 400;\">: <\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">There are different ways to change the order of script execution for TestNG script.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><b> By using \u2018priority\u2019 attribute: I<\/b><span style=\"font-weight: 400;\">f we want to change the order of <\/span><i><span style=\"font-weight: 400;\">executing script<\/span><\/i><span style=\"font-weight: 400;\"> we can use <\/span><b>\u2018(priority=1)\u2019<\/b><span style=\"font-weight: 400;\"> after <\/span><b>@Test<\/b><span style=\"font-weight: 400;\">. TestNG by default will execute the scripts and class in Alphabetic order.<\/span><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8554 size-full\" src=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/priority.png\" alt=\"\" width=\"571\" height=\"303\" \/><\/p>\n<p style=\"font-weight: 400;\"><strong>The output is:- \u00a0<\/strong><\/p>\n<p style=\"font-weight: 400;\">My Third \u00a0Test<br \/>\nMy Second Test<br \/>\nMy First Test<br \/>\n===============================================<br \/>\nSuite<br \/>\nTotal tests run: 3, Failures: 0, Skips: 0<br \/>\n===============================================<\/p>\n<ol start=\"2\">\n<li style=\"font-weight: 400;\"><b> By Using \u2018<\/b><b>dependsOnMethods<\/b><b>\u2019 attribute:<\/b><span style=\"font-weight: 400;\"> For changing the order of <\/span><i><span style=\"font-weight: 400;\">executing script <\/span><\/i><span style=\"font-weight: 400;\">we can also use \u2018<\/span><b>(<\/b><b>dependsOnMethods = { &#8220;methodname&#8221; }<\/b><b>)<\/b><span style=\"font-weight: 400;\">\u2019 after <\/span><b>@Test<\/b><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8555 size-full\" src=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/depend.png\" alt=\"\" width=\"635\" height=\"301\" \/><\/li>\n<\/ol>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>The output is:-<\/strong> <\/span><\/p>\n<p>My Third \u00a0Test<br \/>\nMy Second Test<br \/>\nMy First Test<br \/>\n===============================================<br \/>\nSuite<br \/>\nTotal tests run: 3, Failures: 0, Skips: 0<br \/>\n=================================================<\/p>\n<ol start=\"3\">\n<li style=\"font-weight: 400;\"><b> By using TestNG Suit file<\/b><span style=\"font-weight: 400;\">: <\/span><span style=\"font-weight: 400;\">For changing the order of <\/span><i><span style=\"font-weight: 400;\">executing script <\/span><\/i><span style=\"font-weight: 400;\">we can also use <\/span><b>includeTag <\/b><span style=\"font-weight: 400;\">(<\/span><span style=\"font-weight: 400;\">&lt;<\/span><span style=\"font-weight: 400;\">include<\/span> <span style=\"font-weight: 400;\">name<\/span><span style=\"font-weight: 400;\">=<\/span><i><span style=\"font-weight: 400;\">&#8220;methodname&#8221;<\/span><\/i><span style=\"font-weight: 400;\">&gt;&lt;\/<\/span><span style=\"font-weight: 400;\">include<\/span><span style=\"font-weight: 400;\">&gt;<\/span><span style=\"font-weight: 400;\">) in suit file.<\/span><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8556 size-full\" src=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/Suitpriority.png\" alt=\"\" width=\"848\" height=\"328\" \/><\/p>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>The output is:-<\/strong> <\/span><\/p>\n<p style=\"font-weight: 400;\">My Third \u00a0Test<br \/>\nMy Second Test<br \/>\nMy First Test<br \/>\n===============================================<br \/>\nSuite<br \/>\nTotal tests run: 3, Failures: 0, Skips: 0<br \/>\n===========================================<\/p>\n<h3 style=\"font-weight: 400;\"><span class=\"ez-toc-section\" id=\"parallel-execution\"><\/span><b>Parallel Execution<\/b><span style=\"font-weight: 400;\">:-<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">We use <\/span><i><span style=\"font-weight: 400;\">parallel script execution<\/span><\/i><span style=\"font-weight: 400;\"> to test the Script with multiple browsers in order to check compatibility. This is called <\/span><i><span style=\"font-weight: 400;\">cross-browser testing.<\/span><\/i><span style=\"font-weight: 400;\"> To achieve<\/span><i><span style=\"font-weight: 400;\"> parallel Script execution, <\/span><\/i><span style=\"font-weight: 400;\">we use<\/span><i><span style=\"font-weight: 400;\"> parameter tag <\/span><\/i><span style=\"font-weight: 400;\">in test runner in the TestNG Suit file and use one of the annotation<\/span><b> @Parameters <\/b><span style=\"font-weight: 400;\">in<\/span> <span style=\"font-weight: 400;\">TestNG Class.<\/span><\/p>\n<p style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8558 size-full\" src=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/paralll.png\" alt=\"\" width=\"944\" height=\"578\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8557 size-full\" style=\"color: #333333; font-style: normal; font-weight: 300;\" src=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/parallel2.png\" alt=\"\" width=\"830\" height=\"438\" \/><\/p>\n<p>As a developer, you will find TestNG very useful as it gives the developer the ability to write more flexible and powerful tests with help of easy annotations, grouping, sequencing &amp; parametrizing.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_61 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-white ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"#\" data-href=\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#why-test-ng\" title=\"Why Test NG\">Why Test NG<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"#\" data-href=\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#annotations-available-in-testng\" title=\"Annotations available in TestNG\">Annotations available in TestNG<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"#\" data-href=\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#batch-execution-run-script-multiple-times\" title=\"Batch Execution &amp; Run Script Multiple times \u00a0\">Batch Execution &amp; Run Script Multiple times \u00a0<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"#\" data-href=\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#for-changing-the-order-of-script-execution\" title=\"For changing the order of script execution: \">For changing the order of script execution: <\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"#\" data-href=\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#parallel-execution\" title=\"Parallel Execution:-\">Parallel Execution:-<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; TestNG is a testing framework inspired from JUnit and NUnit but introducing some new functionality that makes it more powerful and easier to use. It is an open-source automated testing framework where NG of TestNG means Next Generation. \u00a0 Why Test NG These are the major advantages of Test NG Test NG has advanced [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":28429,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[808],"tags":[857,858,859,860,861,862,809,863,864,865],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Testing Next Generation - TestNG - appening<\/title>\n<meta name=\"description\" content=\"Learn the major advantages of TestNG over JUnit and how TestNG simplifies the way the tests are coded.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing Next Generation - TestNG - appening\" \/>\n<meta property=\"og:description\" content=\"Learn the major advantages of TestNG over JUnit and how TestNG simplifies the way the tests are coded.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/\" \/>\n<meta property=\"og:site_name\" content=\"appening\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/appening.xyz\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-27T13:36:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T09:16:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/NectTesting-Next-Generation-\u2013-TestNG-2-770x520-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"770\" \/>\n\t<meta property=\"og:image:height\" content=\"520\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"appening\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@appening_xyz\" \/>\n<meta name=\"twitter:site\" content=\"@appening_xyz\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"appening\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/\"},\"author\":{\"name\":\"appening\",\"@id\":\"https:\/\/appening.co\/blog\/#\/schema\/person\/0100bc469421e09ed22e38e660e8f155\"},\"headline\":\"Testing Next Generation &#8211; TestNG\",\"datePublished\":\"2018-07-27T13:36:26+00:00\",\"dateModified\":\"2024-01-15T09:16:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/\"},\"wordCount\":603,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/appening.co\/blog\/#organization\"},\"keywords\":[\"Batch Execution\",\"HTML\",\"JUnit\",\"Next generation\",\"NUnit\",\"Parallel execution\",\"software testing\",\"TestNG\",\"TestNG annotations\",\"TestNG tutorial\"],\"articleSection\":[\"Software Testing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/\",\"url\":\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/\",\"name\":\"Testing Next Generation - TestNG - appening\",\"isPartOf\":{\"@id\":\"https:\/\/appening.co\/blog\/#website\"},\"datePublished\":\"2018-07-27T13:36:26+00:00\",\"dateModified\":\"2024-01-15T09:16:09+00:00\",\"description\":\"Learn the major advantages of TestNG over JUnit and how TestNG simplifies the way the tests are coded.\",\"breadcrumb\":{\"@id\":\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/appening.co\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Testing Next Generation &#8211; TestNG\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/appening.co\/blog\/#website\",\"url\":\"https:\/\/appening.co\/blog\/\",\"name\":\"Appening\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/appening.co\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/appening.co\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/appening.co\/blog\/#organization\",\"name\":\"Appening\",\"url\":\"https:\/\/appening.co\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/appening.co\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2024\/01\/Appening_Light_PNG-copy.png\",\"contentUrl\":\"https:\/\/appening.co\/blog\/wp-content\/uploads\/2024\/01\/Appening_Light_PNG-copy.png\",\"width\":8002,\"height\":1794,\"caption\":\"Appening\"},\"image\":{\"@id\":\"https:\/\/appening.co\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/appening.xyz\/\",\"https:\/\/twitter.com\/appening_xyz\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/appening.co\/blog\/#\/schema\/person\/0100bc469421e09ed22e38e660e8f155\",\"name\":\"appening\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/appening.co\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/62ebb72214c8580415278108ecb20cac?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/62ebb72214c8580415278108ecb20cac?s=96&d=mm&r=g\",\"caption\":\"appening\"},\"url\":\"https:\/\/appening.co\/blog\/author\/appening\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Testing Next Generation - TestNG - appening","description":"Learn the major advantages of TestNG over JUnit and how TestNG simplifies the way the tests are coded.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/","og_locale":"en_US","og_type":"article","og_title":"Testing Next Generation - TestNG - appening","og_description":"Learn the major advantages of TestNG over JUnit and how TestNG simplifies the way the tests are coded.","og_url":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/","og_site_name":"appening","article_publisher":"https:\/\/www.facebook.com\/appening.xyz\/","article_published_time":"2018-07-27T13:36:26+00:00","article_modified_time":"2024-01-15T09:16:09+00:00","og_image":[{"width":770,"height":520,"url":"https:\/\/appening.co\/blog\/wp-content\/uploads\/2018\/07\/NectTesting-Next-Generation-\u2013-TestNG-2-770x520-1.jpg","type":"image\/jpeg"}],"author":"appening","twitter_card":"summary_large_image","twitter_creator":"@appening_xyz","twitter_site":"@appening_xyz","twitter_misc":{"Written by":"appening","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#article","isPartOf":{"@id":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/"},"author":{"name":"appening","@id":"https:\/\/appening.co\/blog\/#\/schema\/person\/0100bc469421e09ed22e38e660e8f155"},"headline":"Testing Next Generation &#8211; TestNG","datePublished":"2018-07-27T13:36:26+00:00","dateModified":"2024-01-15T09:16:09+00:00","mainEntityOfPage":{"@id":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/"},"wordCount":603,"commentCount":0,"publisher":{"@id":"https:\/\/appening.co\/blog\/#organization"},"keywords":["Batch Execution","HTML","JUnit","Next generation","NUnit","Parallel execution","software testing","TestNG","TestNG annotations","TestNG tutorial"],"articleSection":["Software Testing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/appening.co\/blog\/testing-next-generation-testng\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/","url":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/","name":"Testing Next Generation - TestNG - appening","isPartOf":{"@id":"https:\/\/appening.co\/blog\/#website"},"datePublished":"2018-07-27T13:36:26+00:00","dateModified":"2024-01-15T09:16:09+00:00","description":"Learn the major advantages of TestNG over JUnit and how TestNG simplifies the way the tests are coded.","breadcrumb":{"@id":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/appening.co\/blog\/testing-next-generation-testng\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/appening.co\/blog\/testing-next-generation-testng\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/appening.co\/blog\/"},{"@type":"ListItem","position":2,"name":"Testing Next Generation &#8211; TestNG"}]},{"@type":"WebSite","@id":"https:\/\/appening.co\/blog\/#website","url":"https:\/\/appening.co\/blog\/","name":"Appening","description":"","publisher":{"@id":"https:\/\/appening.co\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/appening.co\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/appening.co\/blog\/#organization","name":"Appening","url":"https:\/\/appening.co\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/appening.co\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/appening.co\/blog\/wp-content\/uploads\/2024\/01\/Appening_Light_PNG-copy.png","contentUrl":"https:\/\/appening.co\/blog\/wp-content\/uploads\/2024\/01\/Appening_Light_PNG-copy.png","width":8002,"height":1794,"caption":"Appening"},"image":{"@id":"https:\/\/appening.co\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/appening.xyz\/","https:\/\/twitter.com\/appening_xyz"]},{"@type":"Person","@id":"https:\/\/appening.co\/blog\/#\/schema\/person\/0100bc469421e09ed22e38e660e8f155","name":"appening","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/appening.co\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/62ebb72214c8580415278108ecb20cac?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/62ebb72214c8580415278108ecb20cac?s=96&d=mm&r=g","caption":"appening"},"url":"https:\/\/appening.co\/blog\/author\/appening\/"}]}},"_links":{"self":[{"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/posts\/8549"}],"collection":[{"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/comments?post=8549"}],"version-history":[{"count":1,"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/posts\/8549\/revisions"}],"predecessor-version":[{"id":28430,"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/posts\/8549\/revisions\/28430"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/media\/28429"}],"wp:attachment":[{"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/media?parent=8549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/categories?post=8549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appening.co\/blog\/wp-json\/wp\/v2\/tags?post=8549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}