{"id":1438,"date":"2024-01-14T16:27:25","date_gmt":"2024-01-14T10:57:25","guid":{"rendered":"https:\/\/www.chandansharma.co.in\/blog\/?p=1438"},"modified":"2024-01-14T16:27:27","modified_gmt":"2024-01-14T10:57:27","slug":"python-automation-framework-pytest-framework","status":"publish","type":"post","link":"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/","title":{"rendered":"Python Automation Framework-Pytest Framework"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"225\" height=\"225\" src=\"https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-logo.png\" alt=\"\" class=\"wp-image-1437\" srcset=\"https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-logo.png 225w, https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-logo-150x150.png 150w, https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-logo-50x50.png 50w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/figure><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p>Pytest is a widely-used testing framework for Python that simplifies the process of writing and executing test cases. It is known for its simplicity, scalability, and powerful features. <\/p>\n\n\n\n<p>Pytest supports various types of tests, including unit tests, functional tests, and acceptance tests.<\/p>\n\n\n\n<p>Pytest is one of the most popularly used Python testing frameworks. It is an open-source testing framework. Pytest supports unit testing, functional testing, and API tests.<\/p>\n\n\n\n<p><\/p>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites for Pytest Framework:<\/h3>\n\n\n\n<ul><li><a href=\"https:\/\/docs.microsoft.com\/en-us\/training\/modules\/test-python-with-pytest\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Install Python version 3.5<\/a>&nbsp;or above.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Key Benefits of Pytest Framework:<\/h3>\n\n\n\n<ul><li>Provides a compact and simple test suite.<\/li><li>Highly extensible with many plugins available, such as the Pytest HTML plugin, which can be added to your project to print HTML reports with a single command-line option.<\/li><li>It has large community support.<\/li><li>It helps to cover all parameter combinations without rewriting test cases.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Disadvantages of Pytest Framework:<\/h3>\n\n\n\n<p>Pytest\u2019s proprietary routines prevent compatibility. This means that though the test cases can be easily written in this framework, you won\u2019t be able to use those in other testing frameworks.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-1024x475.png\" alt=\"\" class=\"wp-image-1440\" width=\"709\" height=\"328\" srcset=\"https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-1024x475.png 1024w, https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-300x139.png 300w, https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-768x356.png 768w, https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework.png 1220w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Here are some key features and concepts associated with Pytest:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Simple Syntax:<\/h3>\n\n\n\n<p>Pytest uses a concise and easy-to-read syntax for writing test functions. Test functions are identified by the use of the <strong><em>test_<\/em><\/strong> prefix or by using the <em><strong>@pytest.mark<\/strong><\/em> decorator.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def test_addition():\r\n    assert 1 + 1 == 2\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Fixtures:<\/h3>\n\n\n\n<p><strong><em>Pytest <\/em><\/strong>provides a powerful fixture mechanism to set up and tear down resources needed for testing. <strong><em>Fixtures <\/em><\/strong>can be used to manage test data, initialize objects, and handle other setup tasks.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pytest\r\n\r\n\n@pytest.fixture\r\ndef setup_data():\r\n    data = {\"key\": \"value\"}\r\n    return data\n\n\ndef test_using_fixture(setup_data):\r\n    assert \"key\" in setup_data\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. Parameterized Testing:<\/h3>\n\n\n\n<p>Pytest supports parameterized testing, allowing you to run the same test with different sets of input parameters.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pytest\r\n\r\n@pytest.mark.parametrize(\"input, expected\", &#91;(1, 2), (2, 4), (3, 6)])\r\ndef test_multiply_by_two(input, expected):\r\n    result = input * 2\r\n    assert result == expected\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>Plugins and Extensibility<\/strong>:<\/h3>\n\n\n\n<p>Pytest has a rich ecosystem of plugins that extend its functionality. You can use existing plugins or create your own to customize the testing process according to your needs.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong><strong>Assertions<\/strong><\/strong>:<\/h3>\n\n\n\n<p>Pytest provides a set of powerful built-in assertions that make it easy to write expressive and informative test cases.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def test_strings():\r\n    assert \"hello\" == \"hello\"\r\n    assert \"world\" in \"hello world\"\n\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. <strong><strong>Test Discovery<\/strong><\/strong>:<\/h3>\n\n\n\n<p>Pytest automatically discovers and runs test functions and methods in your project. You don&#8217;t need to explicitly specify test files or classes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Run all tests in the current directory\r\npytest\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">7. <strong><strong><strong>Fixture Scope<\/strong><\/strong><\/strong>:<\/h3>\n\n\n\n<p>Pytest allows you to control the scope of fixtures, such as function-level, class-level, module-level, or session-level.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pytest\r\n\r\n@pytest.fixture(scope=\"module\")\r\ndef module_fixture():\r\n    # Fixture setup code\r\n    yield\r\n    # Fixture teardown code\n\n<\/code><\/pre>\n\n\n\n<p>To use Pytest, you need to install it first. You can do this using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install pytest\n<\/code><\/pre>\n\n\n\n<p>Once installed, you can start writing and running your tests with Pytest.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pytest is a widely-used testing framework for Python that simplifies the process of writing and executing test cases. It is known for its simplicity, scalability, &hellip; <\/p>\n<div class='heateor_sss_sharing_container heateor_sss_vertical_sharing heateor_sss_bottom_sharing' style='width:44px;left: -10px;top: 120px;-webkit-box-shadow:none;box-shadow:none;' data-heateor-sss-href='https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/1438'><div class=\"heateor_sss_sharing_ul\"><a aria-label=\"Facebook\" class=\"heateor_sss_facebook\" href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwww.chandansharma.co.in%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1438\" title=\"Facebook\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg\" style=\"background-color:#3c589a;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-5 -5 42 42\"><path d=\"M17.78 27.5V17.008h3.522l.527-4.09h-4.05v-2.61c0-1.182.33-1.99 2.023-1.99h2.166V4.66c-.375-.05-1.66-.16-3.155-.16-3.123 0-5.26 1.905-5.26 5.405v3.016h-3.53v4.09h3.53V27.5h4.223z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Twitter\" class=\"heateor_sss_button_twitter\" href=\"http:\/\/twitter.com\/intent\/tweet?text=Logic%20Bytes%20-%20Spread%20Your%20Knowledge&url=https%3A%2F%2Fwww.chandansharma.co.in%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1438\" title=\"Twitter\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_twitter\" style=\"background-color:#55acee;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-4 -4 39 39\"><path d=\"M28 8.557a9.913 9.913 0 0 1-2.828.775 4.93 4.93 0 0 0 2.166-2.725 9.738 9.738 0 0 1-3.13 1.194 4.92 4.92 0 0 0-3.593-1.55 4.924 4.924 0 0 0-4.794 6.049c-4.09-.21-7.72-2.17-10.15-5.15a4.942 4.942 0 0 0-.665 2.477c0 1.71.87 3.214 2.19 4.1a4.968 4.968 0 0 1-2.23-.616v.06c0 2.39 1.7 4.38 3.952 4.83-.414.115-.85.174-1.297.174-.318 0-.626-.03-.928-.086a4.935 4.935 0 0 0 4.6 3.42 9.893 9.893 0 0 1-6.114 2.107c-.398 0-.79-.023-1.175-.068a13.953 13.953 0 0 0 7.55 2.213c9.056 0 14.01-7.507 14.01-14.013 0-.213-.005-.426-.015-.637.96-.695 1.795-1.56 2.455-2.55z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Linkedin\" class=\"heateor_sss_button_linkedin\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=https%3A%2F%2Fwww.chandansharma.co.in%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1438\" title=\"Linkedin\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_linkedin\" style=\"background-color:#0077b5;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"0 0 32 32\"><path d=\"M6.227 12.61h4.19v13.48h-4.19V12.61zm2.095-6.7a2.43 2.43 0 0 1 0 4.86c-1.344 0-2.428-1.09-2.428-2.43s1.084-2.43 2.428-2.43m4.72 6.7h4.02v1.84h.058c.56-1.058 1.927-2.176 3.965-2.176 4.238 0 5.02 2.792 5.02 6.42v7.395h-4.183v-6.56c0-1.564-.03-3.574-2.178-3.574-2.18 0-2.514 1.7-2.514 3.46v6.668h-4.187V12.61z\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><a aria-label=\"Pinterest\" class=\"heateor_sss_button_pinterest\" href=\"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/1438\" onclick=\"event.preventDefault();javascript:void( (function() {var e=document.createElement('script' );e.setAttribute('type','text\/javascript' );e.setAttribute('charset','UTF-8' );e.setAttribute('src','\/\/assets.pinterest.com\/js\/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());\" title=\"Pinterest\" rel=\"nofollow noopener\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg heateor_sss_s__default heateor_sss_s_pinterest\" style=\"background-color:#cc2329;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-2 -2 35 35\"><path fill=\"#fff\" d=\"M16.539 4.5c-6.277 0-9.442 4.5-9.442 8.253 0 2.272.86 4.293 2.705 5.046.303.125.574.005.662-.33.061-.231.205-.816.27-1.06.088-.331.053-.447-.191-.736-.532-.627-.873-1.439-.873-2.591 0-3.338 2.498-6.327 6.505-6.327 3.548 0 5.497 2.168 5.497 5.062 0 3.81-1.686 7.025-4.188 7.025-1.382 0-2.416-1.142-2.085-2.545.397-1.674 1.166-3.48 1.166-4.689 0-1.081-.581-1.983-1.782-1.983-1.413 0-2.548 1.462-2.548 3.419 0 1.247.421 2.091.421 2.091l-1.699 7.199c-.505 2.137-.076 4.755-.039 5.019.021.158.223.196.314.077.13-.17 1.813-2.247 2.384-4.324.162-.587.929-3.631.929-3.631.46.876 1.801 1.646 3.227 1.646 4.247 0 7.128-3.871 7.128-9.053.003-3.918-3.317-7.568-8.361-7.568z\"\/><\/svg><\/span><\/a><a aria-label=\"Whatsapp\" class=\"heateor_sss_whatsapp\" href=\"https:\/\/api.whatsapp.com\/send?text=Logic%20Bytes%20-%20Spread%20Your%20Knowledge https%3A%2F%2Fwww.chandansharma.co.in%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1438\" title=\"Whatsapp\" rel=\"nofollow noopener\" target=\"_blank\" style=\"font-size:32px!important;box-shadow:none;display:inline-block;vertical-align:middle\"><span class=\"heateor_sss_svg\" style=\"background-color:#55eb4c;width:40px;height:40px;margin:0;display:inline-block;opacity:1;float:left;font-size:32px;box-shadow:none;display:inline-block;font-size:16px;padding:0 4px;vertical-align:middle;background-repeat:repeat;overflow:hidden;padding:0;cursor:pointer;box-sizing:content-box\"><svg style=\"display:block;\" focusable=\"false\" aria-hidden=\"true\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"100%\" height=\"100%\" viewBox=\"-6 -5 40 40\"><path class=\"heateor_sss_svg_stroke heateor_sss_no_fill\" stroke=\"#fff\" stroke-width=\"2\" fill=\"none\" d=\"M 11.579798566743314 24.396926207859085 A 10 10 0 1 0 6.808479557110079 20.73576436351046\"><\/path><path d=\"M 7 19 l -1 6 l 6 -1\" class=\"heateor_sss_no_fill heateor_sss_svg_stroke\" stroke=\"#fff\" stroke-width=\"2\" fill=\"none\"><\/path><path d=\"M 10 10 q -1 8 8 11 c 5 -1 0 -6 -1 -3 q -4 -3 -5 -5 c 4 -2 -1 -5 -1 -4\" fill=\"#fff\"><\/path><\/svg><\/span><\/a><\/div><div class=\"heateorSssClear\"><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[910,12,917],"tags":[913,923,21,911,921,912,924,915,874,916],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python Automation Framework-Pytest Framework - Logic Bytes<\/title>\n<meta name=\"description\" content=\"Pytest is a widely-used testing framework for Python that simplifies the process of writing and executing test cases. It is known for its simplicity, scalability, and powerful features.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Automation Framework-Pytest Framework - Logic Bytes\" \/>\n<meta property=\"og:description\" content=\"Pytest is a widely-used testing framework for Python that simplifies the process of writing and executing test cases. It is known for its simplicity, scalability, and powerful features.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/\" \/>\n<meta property=\"og:site_name\" content=\"Logic Bytes\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-14T10:57:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-14T10:57:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-logo.png\" \/>\n<meta name=\"author\" content=\"Chandan Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chandan Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/\",\"url\":\"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/\",\"name\":\"Python Automation Framework-Pytest Framework - Logic Bytes\",\"isPartOf\":{\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#website\"},\"datePublished\":\"2024-01-14T10:57:25+00:00\",\"dateModified\":\"2024-01-14T10:57:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/0c7e3da957c6e1375f6b4c899d491b49\"},\"description\":\"Pytest is a widely-used testing framework for Python that simplifies the process of writing and executing test cases. It is known for its simplicity, scalability, and powerful features.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.chandansharma.co.in\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Automation Framework-Pytest Framework\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#website\",\"url\":\"https:\/\/www.chandansharma.co.in\/blog\/\",\"name\":\"Logic Bytes\",\"description\":\"Spread Your Knowledge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.chandansharma.co.in\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/0c7e3da957c6e1375f6b4c899d491b49\",\"name\":\"Chandan Sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/42af2b8ad482f08d8902257fec963abc?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/42af2b8ad482f08d8902257fec963abc?s=96&d=identicon&r=g\",\"caption\":\"Chandan Sharma\"},\"url\":\"https:\/\/www.chandansharma.co.in\/blog\/author\/chandan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Automation Framework-Pytest Framework - Logic Bytes","description":"Pytest is a widely-used testing framework for Python that simplifies the process of writing and executing test cases. It is known for its simplicity, scalability, and powerful features.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/","og_locale":"en_US","og_type":"article","og_title":"Python Automation Framework-Pytest Framework - Logic Bytes","og_description":"Pytest is a widely-used testing framework for Python that simplifies the process of writing and executing test cases. It is known for its simplicity, scalability, and powerful features.","og_url":"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/","og_site_name":"Logic Bytes","article_published_time":"2024-01-14T10:57:25+00:00","article_modified_time":"2024-01-14T10:57:27+00:00","og_image":[{"url":"https:\/\/www.chandansharma.co.in\/blog\/wp-content\/uploads\/2024\/01\/Pytest-Framework-logo.png"}],"author":"Chandan Sharma","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Chandan Sharma","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/","url":"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/","name":"Python Automation Framework-Pytest Framework - Logic Bytes","isPartOf":{"@id":"https:\/\/www.chandansharma.co.in\/blog\/#website"},"datePublished":"2024-01-14T10:57:25+00:00","dateModified":"2024-01-14T10:57:27+00:00","author":{"@id":"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/0c7e3da957c6e1375f6b4c899d491b49"},"description":"Pytest is a widely-used testing framework for Python that simplifies the process of writing and executing test cases. It is known for its simplicity, scalability, and powerful features.","breadcrumb":{"@id":"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.chandansharma.co.in\/blog\/python-automation-framework-pytest-framework\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.chandansharma.co.in\/blog\/"},{"@type":"ListItem","position":2,"name":"Python Automation Framework-Pytest Framework"}]},{"@type":"WebSite","@id":"https:\/\/www.chandansharma.co.in\/blog\/#website","url":"https:\/\/www.chandansharma.co.in\/blog\/","name":"Logic Bytes","description":"Spread Your Knowledge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.chandansharma.co.in\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/0c7e3da957c6e1375f6b4c899d491b49","name":"Chandan Sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.chandansharma.co.in\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/42af2b8ad482f08d8902257fec963abc?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/42af2b8ad482f08d8902257fec963abc?s=96&d=identicon&r=g","caption":"Chandan Sharma"},"url":"https:\/\/www.chandansharma.co.in\/blog\/author\/chandan\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pajmea-nc","_links":{"self":[{"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/1438"}],"collection":[{"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/comments?post=1438"}],"version-history":[{"count":3,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/1438\/revisions"}],"predecessor-version":[{"id":1442,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/posts\/1438\/revisions\/1442"}],"wp:attachment":[{"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/media?parent=1438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/categories?post=1438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chandansharma.co.in\/blog\/wp-json\/wp\/v2\/tags?post=1438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}