{"id":4215,"date":"2025-03-11T14:42:05","date_gmt":"2025-03-11T09:12:05","guid":{"rendered":"https:\/\/www.testleaf.com\/blog\/?p=4215"},"modified":"2025-12-04T14:04:51","modified_gmt":"2025-12-04T08:34:51","slug":"epam-interview-questions-with-answers-2","status":"publish","type":"post","link":"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/","title":{"rendered":"EPAM Interview Questions with Answers"},"content":{"rendered":"<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div><!--[if lt IE 9]><script>document.createElement('audio');<\/script><![endif]-->\n<audio class=\"wp-audio-shortcode\" id=\"audio-4215-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/ogg\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/03\/Epam-Interview-Questions-Part-2.ogg?_=1\" \/><a href=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/03\/Epam-Interview-Questions-Part-2.ogg\">https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/03\/Epam-Interview-Questions-Part-2.ogg<\/a><\/audio>\n<h1><\/h1>\n<h1 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Epam_Interview_Questions_Part_2\"><\/span><b><span data-contrast=\"auto\">Epam Interview Questions:<\/span><\/b><strong> Part 2<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h1><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Epam_Interview_Questions_Part_2\" >Epam Interview Questions: Part 2<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q1_How_can_we_execute_particular_test_cases_for_3_times_in_testing\" >Q1) How can we execute particular test cases for 3 times in testing?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q2_How_we_execute_40_test_cases_alone_among_500_test_cases\" >Q2) How we execute 40 test cases alone among 500 test cases?\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q3How_we_execute_test_cases_in_a_parallel_way\" >Q3)How we execute test cases in a parallel way?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q4_We_have_a_LinkedList_with_some_elements_How_do_you_access_the_elements\" >Q4) We have a LinkedList with some elements. How do you access the elements?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q5_How_do_you_make_some_test_cases_should_not_run_in_testNG\" >Q5) How do you make some test cases should not run in testNG?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#_Q6_I_have_5_test_in_one_class_when_BeforeTest_and_BeforeMethod_will_run_Explain\" >\u00a0Q6) I have 5 @test in one class, when BeforeTest and @BeforeMethod will run? Explain<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q7_How_to_take_screenshot\" >Q7) How to take screenshot?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q8_What_report_you_are_using\" >Q8) What report you are using?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q9_How_do_you_handle_multiple_test_data_in_your_project\" >Q9) How do you handle multiple test data in your project?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#_Q10_What_lib_you_are_using_for_API\" >\u00a0Q10) What lib you are using for API?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q11_What_are_all_the_HTTP_methods_you_have_in_API\" >Q11) What are all the HTTP methods you have in API?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q12_3_Difference_between_post_and_get_method\" >Q12) 3 Difference between post and get method?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q13_What_authentication_mechanisms_have_you_used_in_your_projects\" >Q13) What authentication mechanisms have you used in your projects?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#_Q14_What_build_management_tool_you_are_using\" >\u00a0Q14) What build management tool you are using?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q15_What_is_the_Benefits_of_Maven\" >Q15) What is the Benefits of Maven?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q16_What_CICD_tools_are_you_using\" >Q16) What CI\/CD tools are you using?\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q17_Is_git_and_github_is_same_or_different\" >Q17) Is git and github is same or different?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#Q18_What_is_the_command_for_PUSH\" >Q18) What is the command for PUSH ?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/#_Q19_What_is_super_keyword\" >\u00a0Q19) What is super keyword?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n<p>As promised, here\u2019s Part 2 of our interview questions series! In this post, we\u2019ll cover 19 more essential questions to help you strengthen your knowledge and boost your confidence. If you haven\u2019t checked it yet, read <a href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers\/\" rel=\"noopener\" data-start=\"278\" data-end=\"294\">Part 1 here<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Q1_How_can_we_execute_particular_test_cases_for_3_times_in_testing\"><\/span><b><span data-contrast=\"auto\">Q1) How can we execute particular test cases for 3 times in testing?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"none\">We <\/span><span data-contrast=\"auto\">can execute a particular test case three times in TestNG by using the invocationCount attribute in the @Test annotation. This tells TestNG to run that test method the specified number of times.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p aria-level=\"3\"><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559740&quot;:240}\"> @Test(invocationCount = 3)<br \/>\npublic void executeThreeTimes() (<br \/>\nSystem.out.println(&#8220;This test is executed three times.&#8221;);<br \/>\n}<\/span><\/p><\/blockquote>\n<h5 aria-level=\"3\"><b><span data-contrast=\"auto\">Explanation<\/span><\/b><span data-contrast=\"auto\">:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">invocationCount = 3:<\/span><br \/>\n<span data-contrast=\"auto\">This attribute ensures that the executeThreeTimes() method is invoked three times during a single test run.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Use Case: <\/span><\/b><span data-contrast=\"auto\">This is useful for scenarios like checking for flaky tests, load testing a particular method, or simply ensuring consistency.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">If needed, you can also run these invocations in parallel by adding the threadPoolSize attribute. For instance:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559740&quot;:240}\"> @Test(invocationCount = 3, threadPoolSize = 2)<br \/>\npublic void executeThreeTimesInParallel() {<br \/>\nSystem.out.println(&#8220;Thread: &#8220;);<br \/>\n}<\/span><\/p><\/blockquote>\n<h2 aria-level=\"3\"><span class=\"ez-toc-section\" id=\"Q2_How_we_execute_40_test_cases_alone_among_500_test_cases\"><\/span><b><span data-contrast=\"auto\">Q2) How we execute 40 test cases alone among 500 test cases?<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p aria-level=\"3\"><b><span data-contrast=\"auto\">In our projects, to run only a specific subset\u2014say, 40 out of 500 test cases\u2014we typically use TestNG\u2019s grouping mechanism. Here&#8217;s how it works:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a01) Tagging Tests with Groups:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0We annotate our test methods with a group name that represent<\/span><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0the subset we want to run. For example:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559740&quot;:240}\"> @Test(groups = {&#8220;smoke&#8221;})<br \/>\npublic void testCase1() {<br \/>\n\/\/ test logic<br \/>\n}<\/span><\/p><\/blockquote>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0We apply the same group (like <\/span><span data-contrast=\"auto\">&#8220;smoke&#8221;<\/span><span data-contrast=\"auto\">) to all the 40 test cases we wish<\/span> <span data-contrast=\"auto\">to execute.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a02<\/span><b><span data-contrast=\"auto\">) Configuring testng.xml:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0In our testng.xml file, we specify that only tests belonging to the &#8220;smoke&#8221; group should run:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\"> https:\/\/testng.org\/testng-1.8.dtd (doctype)<br \/>\n&lt;!DOCTYPE suite SYSTEM &#8220;https:\/\/testng.org\/testng-1.0.dtd&#8221;&gt;<br \/>\n&lt;suite name=&#8221;Subset Suite&#8221;&gt;<br \/>\n&lt;test name=&#8221;Run 40 Smoke Tests&#8221;&gt;<br \/>\n&lt;groups&gt;<br \/>\n&lt;run&gt;<br \/>\n&lt;include name=&#8221;smoke&#8221;\/&gt;<br \/>\n&lt;\/run&gt;<br \/>\n&lt;\/groups&gt;<br \/>\n&lt;classes&gt;<br \/>\n&lt;class name=&#8221;com.sample.class1&#8243;\/&gt;<br \/>\n&lt;class name=&#8221;com.sample.Class2&#8243;\/&gt;<br \/>\n&lt;!&#8211; List all classes that contain your smoke tests<br \/>\n&lt;\/classes&gt;<br \/>\n&lt;\/test&gt;<br \/>\n&lt;\/suite&gt;<\/span><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Q3How_we_execute_test_cases_in_a_parallel_way\"><\/span><b><span data-contrast=\"auto\">Q3)How we execute test cases in a parallel way?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">In our automation framework, we execute test cases in parallel using TestNG&#8217;s built-in parallel execution features. There are two primary ways to achieve this:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">1.\u00a0 Configuring Parallelism via testng.xml:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">What It Does: <\/span><\/b><span data-contrast=\"auto\">You can set the parallel attribute in your testng.xml file to run tests, classes, or methods concurrently. You can also specify the thread-count to control how many threads will be used.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559740&quot;:240}\">https:\/\/testng.org\/testng-1.0.dtd (doctype)<br \/>\n&lt;!DOCTYPE suite SYSTEM &#8220;https:\/\/testng.org\/testng-1.0.dtd&#8221;&gt;<br \/>\n&lt;suite name=&#8221;Suite&#8221; parallel=&#8221;methods thread-count=&#8221;5&#8243;&gt;<br \/>\n&lt;test name=&#8221;ParallelTests&#8221;&gt;<br \/>\n&lt;classes&gt;<br \/>\n&lt;class name=&#8221;com.example.YourTestClass&#8221;\/&gt;<br \/>\n&lt;\/classes&gt;<br \/>\n&lt;\/test&gt;<br \/>\n&lt;\/suite&gt;<\/span><\/p><\/blockquote>\n<p><b><span data-contrast=\"auto\">parallel=&#8221;methods&#8221;<\/span><\/b><span data-contrast=\"auto\"> indicates that individual test methods will run in parallel.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">thread-count=&#8221;5&#8243;<\/span><\/b><span data-contrast=\"auto\"> limits the number of concurrent threads to 5.<\/span><br \/>\n<span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">2. Using Annotations (Invocation Count and Thread Pool):<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">What It Does:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">At the method level, you can use the invocationCount attribute to run a test multiple times and the threadPoolSize attribute to specify the number of threads to use for those invocations.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559740&quot;:240}\"> @Test(invocationCount = 10, threadPoolsize = 3)<br \/>\npublic void concurrentTest() {<br \/>\nSystem.out.println(&#8220;Running on thread: &#8220;);<br \/>\n\/\/ Test logic here&#8230;<br \/>\n}<\/span><\/p><\/blockquote>\n<p><span data-contrast=\"auto\">This test method is executed 10 times.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Up to 3 threads will be used concurrently for these invocations.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">3. Benefits and Considerations:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Benefits:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Reduced Execution Time:<\/span><\/b><span data-contrast=\"auto\"> Running tests concurrently can significantly speed up the overall test suite execution.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Resource Optimization:<\/span><\/b><span data-contrast=\"auto\"> Parallel tests make efficient use of available hardware resources.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">Considerations:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><b><span data-contrast=\"auto\">Thread Safety:<\/span><\/b><span data-contrast=\"auto\"> Ensure that your tests do not share mutable state or conflicting resources.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Resource Management:<\/span><\/b><span data-contrast=\"auto\"> Be cautious with external dependencies (like databases or files) to avoid conflicts during parallel execution.<\/span><\/p>\n<p>Learn how to answer <a href=\"https:\/\/www.testleaf.com\/blog\/top-20-java-interview-questions\/\"><strong data-start=\"340\" data-end=\"375\">Top 20 Java Interview Questions<\/strong><\/a> effectively.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Q4_We_have_a_LinkedList_with_some_elements_How_do_you_access_the_elements\"><\/span><b><span data-contrast=\"auto\">Q4) We have a LinkedList with some elements. How do you access the elements?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h4><span data-contrast=\"auto\">\u00a0\u00a0 1)\u00a0 <\/span><b><span data-contrast=\"auto\">Using the <\/span><\/b><b><span data-contrast=\"auto\">get(index)<\/span><\/b><b><span data-contrast=\"auto\"> Method:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Usage:<\/span><\/b><span data-contrast=\"auto\"> Retrieve an element by its index.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Note:<\/span><\/b><span data-contrast=\"auto\"> Since LinkedList is a doubly-linked list, accessing an element by index has O(n) time complexity.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:360,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p>LinkedList&lt;String&gt; list = new LinkedList&lt;&gt;();<br \/>\nlist.add(&#8220;Apple&#8221;);<br \/>\nlist.add(&#8220;Banana&#8221;);<br \/>\nlist.add(&#8220;Cherry&#8221;);<br \/>\n\/\/ Access element at index 1 (\u0412\u0430\u043f\u0430\u043f\u0430)<br \/>\nString element = list.get(1);<br \/>\nSystem.out.println(&#8220;Element at index 1: &#8221; + element);\u00a0\u00a0\u00a0<span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p><\/blockquote>\n<h4><span data-contrast=\"auto\">2)\u00a0 <\/span><b><span data-contrast=\"auto\">Using an Enhanced For Loop (For-Each):<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Usage:<\/span><\/b><span data-contrast=\"auto\"> Iterate over each element.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\"> for (String fruit: list) {<br \/>\nSystem.out.println(fruit);<br \/>\n}<\/span><\/p><\/blockquote>\n<h4><span data-contrast=\"auto\">3) <\/span><b><span data-contrast=\"auto\">Using an Iterator:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Usage:<\/span><\/b><span data-contrast=\"auto\"> Traverse the LinkedList with an Iterator.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:360,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\"> Iterator&lt;String&gt; iterator = list.iterator();<br \/>\nwhile (iterator.hasNext()) {<br \/>\nSystem.out.println(iterator.next());<br \/>\n}<\/span><\/p><\/blockquote>\n<h4><span data-contrast=\"auto\">4) <\/span><b><span data-contrast=\"auto\">Using a ListIterator:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Usage:<\/span><\/b><span data-contrast=\"auto\"> Traverse the list in both directions (forward and backward).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-contrast=\"auto\">\u00a0<\/span>ListIterator&lt;String&gt; listIterator = list.listIterator();<br \/>\nwhile (listIterator.hasNext()) {<br \/>\nSystem.out.println(listIterator.next());<br \/>\n}<br \/>\n<span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Q5_How_do_you_make_some_test_cases_should_not_run_in_testNG\"><\/span><b><span data-contrast=\"auto\">Q5) How do you make some test cases should not run in testNG?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">There are a couple of simple ways to prevent certain test cases from running in <\/span><b><span data-contrast=\"auto\">TestNG<\/span><\/b><span data-contrast=\"auto\">:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">1. Disable the Test Using the enabled Attribute:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">You can annotate a test method with @Test(enabled = false). This tells TestNG to ignore that test during execution.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:2,&quot;335551620&quot;:2,&quot;335559740&quot;:240}\"> @Test(enabled = false)<br \/>\npublic void testThatShouldNotRun() {<br \/>\n\/\/ This test won&#8217;t run.<br \/>\n}<\/span><\/p><\/blockquote>\n<h4><b><span data-contrast=\"auto\">2. Exclude Tests by Grouping in testng.xml:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">You can assign tests to specific groups and then configure your testng.xml to exclude those groups.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\"> @Test(groups = {&#8220;exclude&#8221;})<br \/>\npublic void testThatShouldNotRun() {<br \/>\n\/\/ This test is assigned to the &#8220;exclude&#8221; group.<br \/>\n}<\/span><\/p><\/blockquote>\n<p><b><span data-contrast=\"auto\">In testng.xml, you can exclude that group:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\"> https:\/\/testng.org\/testng-1.8.dtd (doctype).<br \/>\n&lt;!DOCTYPE suite SYSTEM &#8220;https:\/\/testng.org\/testng-1.0.dtd&#8221;&gt;<br \/>\n&lt;suite name=&#8221;Suite&#8221;&gt;<br \/>\n&lt;test name=&#8221;Test&#8221;&gt;<br \/>\n&lt;groups&gt;<br \/>\n&lt;run&gt;<br \/>\n&lt;exclude name=&#8221;exclude&#8221;\/&gt;<br \/>\n&lt;\/run&gt;<br \/>\n&lt;\/groups&gt;<br \/>\n&lt;classes&gt;<br \/>\n&lt;class name=&#8221;com.testleaf.classA&#8221;\/&gt;<br \/>\n&lt;\/classes&gt;<br \/>\n&lt;\/test&gt;<br \/>\n&lt;\/suite&gt;<\/span><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"_Q6_I_have_5_test_in_one_class_when_BeforeTest_and_BeforeMethod_will_run_Explain\"><\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0Q6) <\/span><b style=\"font-style: inherit;\"><span data-contrast=\"auto\">I have 5 @test in one class, when BeforeTest and @BeforeMethod will run? Explain<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><b><span data-contrast=\"auto\">@BeforeTest:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">When It Runs:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">The @BeforeTest method runs <\/span><b><span data-contrast=\"auto\">once<\/span><\/b><span data-contrast=\"auto\"> before any of the test methods in the &lt;test&gt; tag of your testng.xml file.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Scope:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">It applies to all classes and test methods defined within that &lt;test&gt; tag.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">If your testng.xml defines one &lt;test&gt; that includes your class, the @BeforeTest method will execute once before the 5 test methods in your class run.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">@BeforeMethod:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">When It Runs:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">The @BeforeMethod method runs <\/span><b><span data-contrast=\"auto\">before each<\/span><\/b><span data-contrast=\"auto\"> @Test method.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Scope:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">It applies to every test method in the class.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">With 5 @Test methods in the class, the @BeforeMethod will run 5 times (once before each test).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\"> public class SampleTests {<br \/>\n@BeforeTest<br \/>\npublic void beforeTest() {<br \/>\nSystem.out.println(&#8220;BeforeTest: Run once before all tests in this &lt;test&gt; tag.&#8221;);<br \/>\n}<br \/>\n@BeforeMethod<br \/>\npublic void beforeMethod() {<br \/>\nSystem.out.println(&#8220;BeforeMethod: Run before each test method.&#8221;);<br \/>\n}<br \/>\n@Test<br \/>\npublic void test1() {<br \/>\nSystem.out.println(&#8220;Test 1 executed.&#8221;); }<br \/>\n@Test<br \/>\npublic void test2() {<br \/>\nSystem.out.println(&#8220;Test 2 executed.&#8221;);<br \/>\n}<br \/>\n@Test<br \/>\npublic void test3() {<br \/>\nSystem.out.println(&#8220;Test 3 executed.&#8221;);<br \/>\n}<br \/>\n@Test<br \/>\npublic void test4({<br \/>\nSystem.out.println(&#8220;Test 4 executed.&#8221;);<br \/>\n}<br \/>\n@Test<br \/>\npublic void tests() {<br \/>\nSystem.out.println(&#8220;Test 5 executed.&#8221;);<br \/>\n}<br \/>\n}<\/span><\/p><\/blockquote>\n<p><strong>OUTPUT:\u00a0<\/strong><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\"> [RemoteTestNG] detected TestNG version 7.4.8<br \/>\nBeforeTest: Run once before all tests in this &lt;test&gt; tag.<br \/>\nBeforeMethod: Run before each test method.<br \/>\nTest 1 executed.<br \/>\nBeforeMethod: Run before each test method.<br \/>\nTest 2 executed.<br \/>\nBeforeMethod: Run before each test method.<br \/>\nTest 3 executed.<br \/>\nBeforeMethod: Run before each test method.<br \/>\nTest 4 executed.<br \/>\nBeforeMethod: Run before each test method.<br \/>\nTest 5. executed.<br \/>\nPASSED: test2<br \/>\nPASSED: tests<br \/>\nPASSED: test1<br \/>\nPASSED: test4<br \/>\nPASSED: test3<br \/>\n====================================<br \/>\nDefault test<br \/>\nTests run: 5, Failures: e, Skips: e<br \/>\n====================================<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p><\/blockquote>\n<p><a href=\"https:\/\/www.testleaf.com\/course\/playwright.html?utm_source=blog_post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-5709 size-full\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/Playwright-online-class.png\" alt=\"Playwright automation testing\" width=\"2048\" height=\"512\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/Playwright-online-class.png 2048w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/Playwright-online-class-300x75.png 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/Playwright-online-class-1024x256.png 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/Playwright-online-class-768x192.png 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/Playwright-online-class-1536x384.png 1536w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/Playwright-online-class-150x38.png 150w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Q7_How_to_take_screenshot\"><\/span><b><span data-contrast=\"auto\">Q7) How to take screenshot?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">In my automation projects, I take screenshots using Selenium&#8217;s built-in TakesScreenshot interface. This interface provides the getScreenshotAs method that allows you to capture the current state of the browser as an image. Here\u2019s a simple example.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\"> File srcFile = driver.getScreenshotAs (OutputType.FILE);<br \/>\nFile destFile = new File(&#8220;screenshot.png&#8221;);<br \/>\nFileUtils.copyFile(srcFile, destFile);<\/span><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Q8_What_report_you_are_using\"><\/span><b><span data-contrast=\"auto\">Q8) What report you are using?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">In my automation projects, I use <\/span><b><span data-contrast=\"auto\">Extent Reports<\/span><\/b><span data-contrast=\"auto\"> for generating test reports.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h3><b><span data-contrast=\"auto\">Why Extent Reports?<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h3>\n<h4><b><span data-contrast=\"auto\">Interactive and Visually Appealing:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">Extent Reports generate HTML reports that are easy to read and navigate, with rich visuals and dashboards displaying the test execution summary.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Detailed Test Information:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">It allows us to attach detailed logs, screenshots, and other artifacts to individual tests. This makes it easier to diagnose issues when tests fail.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Real-Time Reporting:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">Reports are generated in real-time as tests execute, which helps in monitoring test progress during long test runs.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Integration:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">Extent Reports integrate seamlessly with testing <a href=\"https:\/\/www.testleaf.com\/blog\/types-of-frameworks-in-selenium-webdriver\/\">frameworks<\/a> like TestNG and JUnit, and they work well with Selenium for web automation.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Customization:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">We can customize the look and feel of the reports, including themes, charts, and metadata (like system info, environment details, etc.).<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Q9_How_do_you_handle_multiple_test_data_in_your_project\"><\/span><b style=\"font-style: inherit;\"><span data-contrast=\"auto\">Q9) How do you handle multiple test data in your project?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">In our projects, we handle multiple test data sets using a data-driven approach. This involves separating our test logic from the actual data, which allows us to run the same tests with different inputs without changing the code. Here\u2019s how we do it:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a01) TestNG DataProvider:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0We use TestNG\u2019s @DataProvider to supply multiple sets of test data. This annotation allows a single test method to be executed multiple times with different\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0data sets defined in an Object[][] array.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p>@DataProvider (name = &#8220;loginData&#8221;)<br \/>\npublic Object[][] getLoginData() {<br \/>\nreturn new Object[][] {<br \/>\n{&#8220;user1&#8221;, &#8220;password1&#8221;},<br \/>\n{&#8220;user2&#8221;, &#8220;password2&#8221;},<br \/>\n{&#8220;user3&#8221;, &#8220;password3&#8221;}<br \/>\n};<br \/>\n}<br \/>\n@Test(dataProvider = &#8220;loginData&#8221;)<br \/>\npublic void testLogin(String username, String password) {<br \/>\n\/\/ code to perform login and verify results<br \/>\n}<\/p>\n<p>}<\/p><\/blockquote>\n<p><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a02) External Data Sources:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0For more complex data sets, we read test data from external sources like Excel, CSV, or JSON files. We use libraries such as Apache POI for Excel or OpenCSV\u00a0 \u00a0 \u00a0 \u00a0for CSV files. This helps in managing large and changing data sets without altering the test code.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Parameterization via XML:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0We sometimes use TestNG\u2019s XML configuration to pass parameters to our tests. This is useful for environment-specific configurations or when there\u2019s a small\u00a0 \u00a0 \u00a0 \u00a0 \u00a0set of static data.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Benefits:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Reusability:<\/span><\/b><span data-contrast=\"auto\"> Test logic is separated from test data, so the same test method can validate multiple scenarios.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Maintainability:<\/span><\/b><span data-contrast=\"auto\"> Updating test data doesn\u2019t require changes in the code; data is managed externally.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Scalability:<\/span><\/b><span data-contrast=\"auto\"> It&#8217;s easy to add new test cases by simply appending more data sets.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><strong><span class=\"TextRun SCXW48643778 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW48643778 BCX8\">Related Posts: <\/span><\/span><\/strong><a class=\"Hyperlink SCXW48643778 BCX8\" href=\"https:\/\/www.testleaf.com\/blog\/selenium-interview-questions\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span class=\"TextRun Underlined SCXW48643778 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW48643778 BCX8\" data-ccp-charstyle=\"Hyperlink\">https:\/\/www.testleaf.com\/blog\/selenium-interview-questions\/<\/span><\/span><\/a><span class=\"EOP SCXW48643778 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"_Q10_What_lib_you_are_using_for_API\"><\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:360,&quot;335559740&quot;:240}\">\u00a0Q10) <\/span><b style=\"font-style: inherit;\"><span data-contrast=\"auto\">What lib you are using for API?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">In my API automation projects, I primarily use <\/span><b><span data-contrast=\"auto\">REST-assured<\/span><\/b><span data-contrast=\"auto\"> as the library for API testing.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">REST-assured is a Java DSL that simplifies testing RESTful web services. It provides a fluent and easy-to-read syntax for making HTTP requests (like GET, POST, PUT, PATCH, DELETE, etc.) and asserting responses. This library integrates well with other testing frameworks such as <a href=\"https:\/\/testng.org\/\">TestNG<\/a> or <a href=\"https:\/\/en.wikipedia.org\/wiki\/JUnit\">JUnit<\/a> and supports <a href=\"https:\/\/en.wikipedia.org\/wiki\/JSON\">JSON<\/a> and XML response parsing, authentication, and custom assertions.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\"> public class APITest {<br \/>\n@Test<br \/>\npublic void testGetEndpoint() {<br \/>\ngiven()<br \/>\n.baseuri(&#8220;https:\/\/api.example.com&#8221;)<br \/>\n.header(&#8220;Content-Type&#8221;, &#8220;application\/json&#8221;)<br \/>\n.when()<br \/>\n.get(&#8220;\/users&#8221;)<br \/>\n.then()<br \/>\n.statusCode (200)<br \/>\n.body(&#8220;size()&#8221;, greater Than (0));<br \/>\n}<\/span><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Q11_What_are_all_the_HTTP_methods_you_have_in_API\"><\/span><b><span data-contrast=\"auto\">Q11) What are all the HTTP methods you have in API?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">In API testing and automation, the methods usually refer to the HTTP methods that define the type of action to be performed on the resource. The common HTTP methods used in APIs are:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">1. GET:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Purpose:<\/span><\/b><span data-contrast=\"auto\"> Retrieve data from a server.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Characteristics:<\/span><\/b><span data-contrast=\"auto\"> Safe and idempotent (repeating the same GET should produce the same result).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">2. POST:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Purpose:<\/span><\/b><span data-contrast=\"auto\"> Create a new resource or submit data to the server.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Characteristics:<\/span><\/b><span data-contrast=\"auto\"> Not idempotent; multiple identical POST requests might create multiple resources.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">3. PUT:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Purpose:<\/span><\/b><span data-contrast=\"auto\"> Update an existing resource completely by replacing it with new data.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Characteristics:<\/span><\/b><span data-contrast=\"auto\"> Idempotent; multiple PUT requests with the same data should result in the same resource state.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">4. PATCH:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Purpose:<\/span><\/b><span data-contrast=\"auto\"> Partially update an existing resource (i.e., modify only certain fields).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Characteristics:<\/span><\/b><span data-contrast=\"auto\"> Not strictly idempotent depending on how the API is designed but generally used for partial updates.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">5. DELETE:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Purpose:<\/span><\/b><span data-contrast=\"auto\"> Remove a resource from the server.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Characteristics:<\/span><\/b><span data-contrast=\"auto\"> Idempotent; deleting an already deleted resource generally returns the same status.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">6. HEAD:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Purpose:<\/span><\/b><span data-contrast=\"auto\"> Retrieve the headers for a resource, without the response body.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Characteristics:<\/span><\/b><span data-contrast=\"auto\"> Useful for checking what a GET request would return before actually making it.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">7. OPTIONS:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><b><span data-contrast=\"auto\">Purpose:<\/span><\/b><span data-contrast=\"auto\"> Describe the communication options for the target resource, such as supported methods.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Characteristics:<\/span><\/b><span data-contrast=\"auto\"> Often used in handling Cross-Origin Resource Sharing (CORS) or to understand the API\u2019s capabilities.<\/span><br \/>\n<span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Q12_3_Difference_between_post_and_get_method\"><\/span><b><span data-contrast=\"auto\">Q12) 3 Difference between post and get method?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h4><b><span data-contrast=\"auto\">GET Method:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a01. Purpose:<\/span><\/b>\u00a0<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0 GET is used to <\/span><b><span data-contrast=\"auto\">retrieve<\/span><\/b><span data-contrast=\"auto\"> data from a server. Think of it as asking, &#8220;Can you show me this information?&#8221;<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a02. How It Sends Data:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Data is sent as part of the URL. For example:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><a href=\"http:\/\/example.com\/search?query=something\"><span data-contrast=\"none\">\u00a0 \u00a0 \u00a0http:\/\/example.com\/search?query=something<\/span><\/a><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0This means the information is visible in the browser\u2019s address bar.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a03. Visibility and Limitations:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Because the data is in the URL, it can be seen by anyone who looks at it.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0URLs have a length limit, so you can&#8217;t send a large amount of data.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a04. Caching and Bookmarking:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0GET requests can be <\/span><b><span data-contrast=\"auto\">cached<\/span><\/b><span data-contrast=\"auto\"> by browsers (stored for faster access later) and <\/span><b><span data-contrast=\"auto\">bookmarked<\/span><\/b><span data-contrast=\"auto\"> (saved for future use).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a05. Idempotency:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0GET is considered <\/span><b><span data-contrast=\"auto\">idempotent<\/span><\/b><span data-contrast=\"auto\">, which means if you send the same GET request multiple times, the result will be the same and it doesn\u2019t change anything on\u00a0 \u00a0 \u00a0 \u00a0 \u00a0the server.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">POST Method:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a01. Purpose:<\/span><\/b>\u00a0<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0 POST is used to <\/span><b><span data-contrast=\"auto\">send data<\/span><\/b><span data-contrast=\"auto\"> to a server, usually to create or update resources. Think of it as submitting a form, like &#8220;Please save this new information.&#8221;<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a02. How It Sends Data:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Data is sent in the <\/span><b><span data-contrast=\"auto\">body<\/span><\/b><span data-contrast=\"auto\"> of the HTTP request, not in the URL.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0This means the data is not visible in the browser\u2019s address bar.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a03. Visibility and Limitations:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Since data is hidden in the request body, it\u2019s more secure for sensitive data (although for true security, you should also use HTTPS).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0There is no strict URL length limit, so you can send larger amounts of data.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a04. Caching and Bookmarking:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0POST requests are generally <\/span><b><span data-contrast=\"auto\">not cached<\/span><\/b><span data-contrast=\"auto\"> by browsers.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0You cannot bookmark a POST request because the data is not visible in the URL.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a05. Idempotency:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0POST is <\/span><b><span data-contrast=\"auto\">not idempotent<\/span><\/b><span data-contrast=\"auto\"> by default. This means if you send the same POST request multiple times, it might create multiple entries or cause other changes on\u00a0 \u00a0 \u00a0 \u00a0the server.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/www.testleaf.com\/course\/genai-qa-engineers-training-course.html?utm_source=blog_post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><img decoding=\"async\" class=\"aligncenter wp-image-5555 size-full\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Babus-Gen-AI.png\" alt=\"Babu's Gen AI\" width=\"2048\" height=\"512\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Babus-Gen-AI.png 2048w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Babus-Gen-AI-300x75.png 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Babus-Gen-AI-1024x256.png 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Babus-Gen-AI-768x192.png 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Babus-Gen-AI-1536x384.png 1536w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Babus-Gen-AI-150x38.png 150w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Q13_What_authentication_mechanisms_have_you_used_in_your_projects\"><\/span><b><span data-contrast=\"auto\">Q13) What authentication mechanisms have you used in your projects?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">I have primarily implemented two types of authentication:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a01. Basic Authentication:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Description:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Uses a username and password encoded in Base64 to secure API endpoints.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Usage Example:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Commonly used for simple API authentication in test scenarios, where the credentials are sent in the HTTP header.<\/span><br \/>\n<span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a02. Token-Based Authentication (OAuth 2.0):<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<p><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Description:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Uses access tokens to verify user identity and grant access to secured resources.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Usage Example:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Employed in projects that require enhanced security for API interactions, where a token is generated after validating credentials and then used for subsequent\u00a0 \u00a0 \u00a0 \u00a0requests.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:1440,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"_Q14_What_build_management_tool_you_are_using\"><\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<strong>Q14) <\/strong><\/span><b style=\"font-style: inherit;\"><span data-contrast=\"auto\">What build management tool you are using?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">In my automation projects, I use <\/span><b><span data-contrast=\"auto\">Maven<\/span><\/b><span data-contrast=\"auto\"> as the build management tool. Maven is an open-source build automation tool primarily used for Java projects. It simplifies the entire build lifecycle\u2014from compiling code to packaging and deploying applications\u2014using a single configuration file called the <\/span><b><span data-contrast=\"auto\">pom.xml<\/span><\/b><span data-contrast=\"auto\">.<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Key benefits of Maven include:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<h6><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a01. Automatic Dependency Management: <\/span><\/b>\u00a0<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0<\/span><\/h6>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Maven downloads and manages all the necessary libraries and plugins from central repositories, which saves a lot of time and reduces version conflicts.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h6><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a02. Standardized Project Structure: <\/span><\/b><\/h6>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0It enforces a consistent directory layout (such as src\/main\/java for source code and src\/test\/java for tests), which makes the project easier to understand and\u00a0 \u00a0 \u00a0 \u00a0 \u00a0maintain.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h6><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a03. Consistent Build Lifecycle:<\/span><\/b><\/h6>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Maven defines a standard set of build phases (clean, compile, test, package, install, deploy) that ensure our projects build the same way across different\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0environments.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h6><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a04. Extensibility with Plugins:<\/span><\/b><\/h6>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0The rich ecosystem of Maven plugins allows us to integrate tasks like code quality analysis, documentation generation, and automated deployment seamlessly\u00a0 \u00a0 \u00a0 \u00a0 \u00a0into the build process.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h6><b><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a05. IDE and CI\/CD Integration:<\/span><\/b><\/h6>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0Maven integrates very well with popular IDEs like Eclipse and IntelliJ IDEA, as well as continuous integration tools like Jenkins, which streamlines both local\u00a0 \u00a0 \u00a0 \u00a0development and automated build pipelines.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Q15_What_is_the_Benefits_of_Maven\"><\/span><b><span data-contrast=\"auto\">Q15) What is the Benefits of Maven?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h4><b><span data-contrast=\"auto\">What is Maven?<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">Maven is a build automation and project management tool primarily used for Java projects. It uses a configuration file called pom.xml (Project Object Model) to manage project dependencies, build processes, and plugins. Maven standardizes the project structure and automates many tasks, making it easier to build, test, and deploy applications consistently.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Benefits of Maven:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<ul>\n<li data-leveltext=\"%1)\" data-font=\"\" data-listid=\"93\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:360,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,1],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1)&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Automatic Dependency Management:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Maven automatically downloads and manages third-party libraries your project needs, so you don\u2019t have to manually include JAR files or resolve version conflicts.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"%1)\" data-font=\"\" data-listid=\"93\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:360,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,1],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1)&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Standardized Project Structure:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">It enforces a common folder layout, making projects more uniform and easier for new developers to understand.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"%1)\" data-font=\"\" data-listid=\"93\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:360,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,1],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1)&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"3\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Consistent Build Process:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Maven defines a fixed build lifecycle (e.g., clean, compile, test, package, install, deploy) that ensures your project builds the same way every time across different environments.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"%1)\" data-font=\"\" data-listid=\"93\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:360,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,1],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1)&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"4\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Extensible with Plugins:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">A vast ecosystem of plugins automates tasks such as compiling code, running tests, generating reports, and packaging the application, reducing manual effort.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"%1)\" data-font=\"\" data-listid=\"93\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:360,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,1],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1)&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"5\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Integration with IDEs and CI\/CD Tools:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Maven integrates seamlessly with popular IDEs (like Eclipse and IntelliJ IDEA) and continuous integration systems (such as Jenkins), which streamlines the development and deployment process.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Q16_What_CICD_tools_are_you_using\"><\/span><b><span data-contrast=\"auto\">Q16) What <a href=\"https:\/\/en.wikipedia.org\/wiki\/CI\/CD\">CI\/CD<\/a> tools are you using?<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">I use a combination of <\/span><b><span data-contrast=\"auto\">Maven<\/span><\/b><span data-contrast=\"auto\">, <\/span><b><span data-contrast=\"auto\">Git<\/span><\/b><span data-contrast=\"auto\">, and <\/span><b><span data-contrast=\"auto\">Jenkins<\/span><\/b><span data-contrast=\"auto\"> in my CI\/CD pipeline:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Maven:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Manages build automation and dependency management. It compiles the <\/span> <span data-contrast=\"auto\">code, runs tests, and packages the application.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Git:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Serves as the version control system to manage source code and track<\/span><br \/>\n<span data-contrast=\"auto\">changes.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Jenkins:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Acts as the CI\/CD server to automate the integration, testing, and<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">deployment processes, triggering builds whenever changes are pushed to <\/span> <span data-contrast=\"auto\">Git.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">This combination allows me to efficiently manage code, automate builds, <\/span> <span data-contrast=\"auto\">and streamline deployment processes.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Q17_Is_git_and_github_is_same_or_different\"><\/span><b><span data-contrast=\"auto\">Q17) Is git and github is same or different?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">Git and GitHub are related but not the same:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559685&quot;:0,&quot;335559737&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Git:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">A distributed version control system (VCS) used to track changes in source <\/span> <span data-contrast=\"auto\">code during software development.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">It is a command-line tool (and also available via GUIs) that runs locally on your computer.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Git allows you to manage revisions, branches, merges, and more.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">GitHub:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<p><span data-contrast=\"auto\">A web-based hosting service for Git repositories.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">It provides a platform to store, share, and collaborate on Git repositories online.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">GitHub offers additional features like issue tracking, pull requests, and code reviews.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">In summary, Git is the tool for version control, while GitHub is a service that helps you host and manage your Git repositories online.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h2><a href=\"https:\/\/www.testleaf.com\/course\/selenium-automation-certification-training-course.html?utm_source=blog_post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><img decoding=\"async\" class=\"aligncenter wp-image-4084 size-full\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/02\/Selenium-1.jpg\" alt=\"Selenium training in chennai\" width=\"2048\" height=\"512\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/02\/Selenium-1.jpg 2048w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/02\/Selenium-1-300x75.jpg 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/02\/Selenium-1-1024x256.jpg 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/02\/Selenium-1-768x192.jpg 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/02\/Selenium-1-1536x384.jpg 1536w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/02\/Selenium-1-150x38.jpg 150w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"Q18_What_is_the_command_for_PUSH\"><\/span><b><span data-contrast=\"auto\">Q18) What is the command for PUSH ?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">The Git command for pushing your local commits to a remote repository is:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">git push &lt;remote&gt; &lt;branch&gt;<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">For example, if your remote is named origin and your branch is main, you\u2019d use:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">git push origin main<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Key Points:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<ul>\n<li data-leveltext=\"%1)\" data-font=\"\" data-listid=\"94\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:360,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,1],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1)&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">&lt;remote&gt;<\/span><\/b><span data-contrast=\"auto\">:<\/span><br \/>\n<span data-contrast=\"auto\">This is the name of your remote repository (commonly origin).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"%1)\" data-font=\"\" data-listid=\"94\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:360,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,1],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1)&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">&lt;branch&gt;<\/span><\/b><span data-contrast=\"auto\">:<\/span><br \/>\n<span data-contrast=\"auto\">This is the name of the branch you want to push (for example, main or master).<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"%1)\" data-font=\"\" data-listid=\"94\" data-list-defn-props=\"{&quot;335552541&quot;:0,&quot;335559685&quot;:360,&quot;335559991&quot;:360,&quot;469769242&quot;:[65533,1],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;%1)&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"3\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Authentication:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Depending on your repository setup, you might be prompted for credentials or use SSH keys for authentication.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li><b><span data-contrast=\"auto\">iv) Example Workflow:<\/span><\/b><\/li>\n<\/ul>\n<ol>\n<li><span data-contrast=\"auto\">Make your changes.<\/span><\/li>\n<li><span data-contrast=\"auto\"> Stage your changes:<\/span><\/li>\n<\/ol>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 git add .<\/span><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0 \u00a03. Commit your changes:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0git commit -m &#8220;Your commit message&#8221;<\/span><br \/>\n<span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0 4. Push your changes:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0git push origin main<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559731&quot;:720,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p>Get expert tips on tackling <a href=\"https:\/\/www.testleaf.com\/blog\/test-automation-framework-interview-questions\/\"><strong data-start=\"865\" data-end=\"914\">Test Automation Framework Interview Questions<\/strong><\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"_Q19_What_is_super_keyword\"><\/span><span data-ccp-props=\"{}\">\u00a0<strong>Q19<\/strong>) <\/span><b style=\"font-style: inherit;\"><span data-contrast=\"auto\">What is super keyword?<\/span><\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h4><span data-contrast=\"none\">\u00a0<\/span><b><span data-contrast=\"auto\">Definition:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">\u00a0 The <\/span><b><span data-contrast=\"auto\">super<\/span><\/b><span data-contrast=\"auto\"> keyword in Java is a special reference used within a subclass to refer to its immediate parent class. It allows you to access methods, fields, and\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 constructors of the parent class.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Purpose:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h4>\n<h6><b><span data-contrast=\"auto\">Reusability:<\/span><\/b><\/h6>\n<p><span data-contrast=\"auto\">Enables a subclass to reuse or extend the functionality of its parent class without rewriting code.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h6><b><span data-contrast=\"auto\">Maintenance:<\/span><\/b><\/h6>\n<p><span data-contrast=\"auto\">By calling parent&#8217;s methods or constructors, changes in the parent class propagate automatically to subclasses.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h6><b><span data-contrast=\"auto\">Keyword:<\/span><\/b><br \/>\n<span data-contrast=\"auto\">super<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h6>\n<h6><b><span data-contrast=\"auto\">Usage Context:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h6>\n<ul>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"95\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1080,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Used in method overriding to call the overridden method in the parent class.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"96\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1080,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Used in constructors to invoke a specific constructor from the parent class.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li data-leveltext=\"-\" data-font=\"Aptos\" data-listid=\"97\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:1080,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Aptos&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;-&quot;,&quot;469777815&quot;:&quot;hybridMultilevel&quot;}\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Can also be used to access hidden fields if the subclass defines a variable with the same name as in the parent.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><b><span data-contrast=\"auto\">Selenium Example:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">Usage in Selenium:<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">While Selenium\u2019s built-in classes themselves (like RemoteWebDriver, ChromeDriver, etc.) already use inheritance, you might create custom classes in your automation framework where you extend Selenium classes.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><b><span data-contrast=\"auto\">Example Scenario:<\/span><\/b><br \/>\n<span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\"> public class CustomChromeDriver extends ChromeDriver {<br \/>\n\/\/ Constructor: calls the parent ChromeDriver constructor<br \/>\npublic CustomChromeDriver() {<br \/>\nsuper();<br \/>\n}<br \/>\n\/\/ Custom method that navigates to a URL using the parent&#8217;s get() method<br \/>\npublic void customNavigate(String url) {<br \/>\nsuper.get(url);<br \/>\nSystem.out.println(&#8220;Navigated to:&#8221; + url);<br \/>\n}<br \/>\npublic static void main(String[] args) {<br \/>\n\/\/ Create an instarice of CustomChromeDriver<br \/>\nChromeDriver driver = new CustomChromeDriver();<br \/>\n\/\/ Use the custom navigation method<br \/>\n((CustomChromeDriver) driver).customNavigate(&#8220;https:\/\/www.example.com&#8221;);<br \/>\n\/\/ Quit the driver<br \/>\ndriver.quit();<br \/>\n}<br \/>\n}<\/span><\/p><\/blockquote>\n<h5><b><span data-contrast=\"auto\">Explanation:<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559685&quot;:720,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h5>\n<ul>\n<li><span data-contrast=\"auto\">Here, super() is used to call the ChromeDriver constructor.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">You can also use super.get(&#8230;) if you want to ensure you are calling the original get() method from the parent class after performing additional logic.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<h3><b><span data-contrast=\"auto\">Conclusion<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:180,&quot;335559739&quot;:180,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">These <a href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers\/\">EPAM interview questions<\/a> not only test your understanding of a well-structured test automation framework but also your ability to write clean, efficient Java code for common programming tasks. By explaining your hybrid framework\u2014built on the POM design pattern and integrated with tools like Selenium, TestNG, and Maven\u2014you can demonstrate a solid foundation in automation best practices. Moreover, solving the array manipulation problem showcases your coding skills and attention to detail.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:180,&quot;335559739&quot;:180,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">I hope this guide helps you prepare for your EPAM interview by reinforcing both your theoretical knowledge and practical coding abilities. Good luck on your journey and remember to keep refining your skills as you tackle more complex challenges in the world of automation and software development!<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559738&quot;:180,&quot;335559739&quot;:180,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h5><strong>We Also Provide Training In:<\/strong><\/h5>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/selenium-automation-certification-training-course.html?utm_source=blog_post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Advanced Selenium Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/playwright.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Playwright Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/genai-qa-engineers-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Gen AI Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/aws-cloud-architect-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>AWS Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/rest-api-testing-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>REST API Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/full-stack-developer-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Full Stack Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/appium-mobile-automation-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Appium Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/dev-ops-master-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>DevOps Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/apache-jmeter-testing-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>JMeter Performance Training<\/strong><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h6><strong>Author&#8217;s Bio<\/strong>:<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2404 alignleft\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2023\/04\/Untitled-design.png\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2023\/04\/Untitled-design.png 250w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2023\/04\/Untitled-design-150x150.png 150w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2023\/04\/Untitled-design-96x96.png 96w\" sizes=\"(max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>As CEO of TestLeaf, I\u2019m dedicated to transforming software testing by empowering individuals with real-world skills and advanced technology. With 24+ years in software engineering, I lead our mission to shape local talent into global software professionals. Join us in redefining the future of test engineering and making a lasting impact in the tech world.<\/p>\n<p><strong>Babu Manickam<\/strong><\/p>\n<p>CEO &#8211; Testleaf<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"https:\/\/in.linkedin.com\/in\/babu-manickam\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/linkedin.png\" alt=\"LinkedIn Logo\" width=\"28\" height=\"28\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Epam Interview Questions: Part 2 As promised, here\u2019s Part 2 of our interview questions series! In this post, we\u2019ll cover 19 more essential questions to help you strengthen your knowledge and boost your confidence. If you haven\u2019t checked it yet, read Part 1 here. Q1) How can we execute particular test cases for 3 times &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/\"> <span class=\"screen-reader-text\">EPAM Interview Questions with Answers<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":4216,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[62],"tags":[157,65,122],"class_list":["post-4215","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-questions","tag-interview-preparation","tag-interview-questions","tag-top-interview-questions"],"acf":[],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/4215","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/comments?post=4215"}],"version-history":[{"count":12,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/4215\/revisions"}],"predecessor-version":[{"id":8135,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/4215\/revisions\/8135"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/media\/4216"}],"wp:attachment":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/media?parent=4215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/categories?post=4215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/tags?post=4215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}