{"id":18003,"date":"2017-07-31T12:15:30","date_gmt":"2017-07-31T09:15:30","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=18003"},"modified":"2017-07-28T17:42:31","modified_gmt":"2017-07-28T14:42:31","slug":"behavioural-driven-development-using-python-behave","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/","title":{"rendered":"Behavioural Driven Development using Python Behave"},"content":{"rendered":"<h2>1. Introduction<\/h2>\n<p><code>Behave<\/code> is <code>Behavioural Driven Development<\/code>\u00a0that uses Python as its back end language. Behave uses tests written in natural language format, backed up by python code.<\/p>\n<h2>2. Installation<\/h2>\n<p>The installation of Behave can be done in two ways:<\/p>\n<ul>\n<li>You can install Behave using pip. All you have to do is just type in <code>pip install behave<\/code>.<\/li>\n<li>The other way you can install Behave is through its source distribution. All you need to do is download the source package of <a href=\"https:\/\/pypi.python.org\/pypi\/behave\" target=\"_blank\" rel=\"noopener\">Behave<\/a>. Once you have downloaded Behave, just unpack the behave source distribution. After that navigate to the directory and type in <code>python setup.py install<\/code>.<\/li>\n<\/ul>\n<h2>3. Getting started with Behave<\/h2>\n<p>To set up Behave for your automation project there are certain aspects that have to be taken into consideration, which includes setting up your browser configurations in an <code>environment.py<\/code> file. I am using chrome as the default browser to execute the test scenarios. Here is the code block to set up the browser configuration:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Configure chrome driver for Behave in Python<\/em><\/span><\/p>\n<pre class=\"brush:python\">from selenium import webdriver\r\nfrom selenium.webdriver.chrome.options import Options\r\nimport os\r\nchrome_options = Options()\r\nchrome_options.add_experimental_option('prefs',{\r\n 'credentials_enable_service':False,\r\n\u00a0 \u00a0 'profile':{\r\n\u00a0 \u00a0 \u00a0 \u00a0 'password_manager_enabled':False\r\n\u00a0 \u00a0 }\r\n})\r\ndef before_all(context):\r\n\u00a0 \u00a0 context.browser = webdriver.Chrome(chrome_options=chrome_options)\r\n\u00a0 \u00a0 context.browser.maximize_window()\r\ndef after_all(context):\r\n\u00a0 \u00a0 context.browser.quit()<\/pre>\n<p>The configuration mentioned above sets the parameters for the chrome browser so that it is executed within a controlled environment. If you see the code you will find an attribute <code>context<\/code>\u00a0which has been used often. <code>context<\/code>\u00a0is an object attribute of Behave which holds several information for the tests that are being executed by the Behave runner. The <code>context<\/code>\u00a0object may hold information of your browser configuration, the test cases failing on executing a scenario, the current scenario which is getting executed, the tags that are being used for every scenarios etc.<\/p>\n<p>The <code>context<\/code> variable in all cases is an instance of the <code>behave.runner.Context<\/code> class.<\/p>\n<p>The <code>before_all<\/code>\u00a0method consists of the code block for running the predefined steps before the actual execution for all the scenarios start, for example initiating the loading of a browser in the system.<\/p>\n<p>The <code>after_all<\/code>\u00a0method consists of the code block for running the predefined steps after the actual execution of all the scenarios, for example terminate the executing session and closing the browser.<\/p>\n<p>Once you have the configuration of your browser done, next you have to create a directory <code>steps<\/code>. Inside the <code>steps<\/code>\u00a0directory you have to create a file called <code>steps.py<\/code>. This file would consist of the implementation for the steps that you would define in the Gherkin format. The following code block would give a brief idea:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Setting up the logic for each feature<\/em><\/span><\/p>\n<pre class=\"brush:python\">from selenium import webdriver\r\nimport time\r\nfrom selenium.webdriver.common.action_chains import ActionChains\r\nfrom selenium.webdriver.common.by import By\r\nfrom selenium.webdriver.support.ui import WebDriverWait\r\nfrom selenium.webdriver.support import expected_conditions as EC\r\nfrom selenium.common.exceptions import *\r\n\r\n@when('I visit url \"{url}\"')\r\n\u00a0 \u00a0 def step(context, url):\r\n\u00a0 \u00a0 context.browser.get(url)\r\n\u00a0 \u00a0 context.browser.implicitly_wait(10)\r\n@when('I click on the element with xpath \"{xpath}\"')\r\n\u00a0 \u00a0 def step(context, xpath):\r\n\u00a0 \u00a0 element = context.browser.find_element(By.XPATH,xpath)\r\n\u00a0 \u00a0 element.click()\r\n@when('I click on the element with css \"{css}\"')\r\n\u00a0 \u00a0 def step(context, css):\r\n\u00a0 \u00a0 element = context.browser.find_element(By.CSS_SELECTOR,css)\r\n\u00a0 \u00a0 element.click()<\/pre>\n<p>Next you have to create a <code>features<\/code>\u00a0directory, all the feature files associated to your tests should be kept in this directory. The feature files would have all your test scenarios written in Gherkin format. The file should be saved in the <code>.feature<\/code>\u00a0file format. The code block written below describes how to write a feature file.<\/p>\n<p><span style=\"text-decoration: underline\"><em>The Gherkin format to set up your test cases<\/em><\/span><\/p>\n<pre class=\"brush:java\">Feature: Create and Update an ad instance\r\n Scenario: Hit the URL and validate title of the page\r\n When I visit url \"&lt;some url&gt;\"\r\n Then the title should match \"&lt;title of the page&gt;\"\r\n\r\n Scenario: Click on login and switch tab\r\n When I click on the element with xpath \"\/\/span[text()='LOGIN']\"\r\n Then I switch to the new tab\r\n Then the title should match \"Automatad - Login\"\r\n\r\n Scenario: Enter username, password and validate \"admin dashboard\"\r\n When I enter element with name \"email\" as \"&lt;email&gt;\"\r\n When I enter element with name \"password\" as \"&lt;password&gt;\"\r\n When I click on the element with xpath \"\/\/button[@type='submit']\"\r\n Then I check the page load status\r\n Then I should see the element having \"CLASS\" as \"sidebar-header\"<\/pre>\n<h2>4. Executing scenarios based on tags<\/h2>\n<p>There might be situations where it would be necessary to execute specific scenarios of a test case. In such cases we have to utilize the concept of tagging in behave. Tagging helps you execute specific scenarios and helps distributing execution of test scenarios. To tag scenarios you just have to mention your <code>tag keyword<\/code> and append it with <code>@<\/code>. For example<\/p>\n<p>if I just want to execute all the scenarios for login I would just add a <code>@login<\/code>\u00a0tag before each scenario specific to login. For example:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Configuring tags with your test cases<\/em><\/span><\/p>\n<pre class=\"brush:java\">@login\r\n Scenario: Hit the URL and validate title of the page\r\n When I visit url \"&lt;baseURL&gt;\"\r\n Then the title should match \"&lt;title of the page&gt;\"\r\n\r\n@login\r\n Scenario: Click on login and switch tab\r\n When I click on the element with xpath \"\/\/span[text()='LOGIN']\"\r\n Then I switch to the new tab\r\n Then the title should match \"&lt;title of the login page&gt;\"<\/pre>\n<p>So, if I want to execute the scenarios specific to login I can utilize the <code>@login<\/code> tag to accomplish it.<\/p>\n<h2>5. Executing a Behave test<\/h2>\n<p>There are several ways you can actually execute behave scenarios.<\/p>\n<ul>\n<li>To execute all the behave scenarios just navigate to the features directory and execute the command <code>behave<\/code>. All the scenarios in the feature file be executed sequentially.<\/li>\n<li>If we are out side the features directory we can execute all scenarios by executing the command <code>behave features\/<\/code>.<\/li>\n<li>If you want to execute the scenarios based on tags you have to run the command <code>behave features\/ --tags=login<\/code>. It would run all the scenarios specific to login only.<\/li>\n<li>You can also use the <code>--capture<\/code> option like <code>behave --capture<\/code>\u00a0to display all standard output on the console. If you use the option <code>--no-capture<\/code> with behave like <code>behave --no-capture<\/code> it would not generate the respective standard output on the console then.<\/li>\n<\/ul>\n<p>For other options that you can use to control the behave runner, you can visit this <a href=\"http:\/\/pythonhosted.org\/behave\/behave.html#configuration-files\" target=\"_blank\" rel=\"noopener\">page<\/a>.<\/p>\n<h2>6. Generating reports in Behave<\/h2>\n<p>Reports in Behave can be generated using the <code>Junit<\/code> library. When <code>junit<\/code> is enabled, all stdout and stderr will be redirected and dumped to the <code>junit<\/code> report, regardless of the <code>--capture<\/code> and <code>--no-capture<\/code>\u00a0options. Junit will generate the report in the xml format. But as more and more test cases and scenarios are added this reporting structure would become cumbersome. Further, it would become tough to identify the passed and the failed scenarios and the reason for a test to fail. <code>Allure<\/code> which is a third party report generating tool, came out with a python binding to generate reports for test results of Behave, which gives a representable format for all the test cases executed.<\/p>\n<h3>6.1 Allure Behave<\/h3>\n<p>The allure behave can be installed in the following way:<\/p>\n<ul>\n<li>I am using mac as my platform, so at first you would have to install allure in your system. To install allure in your system you just need to type brew install allure.<\/li>\n<li>Once allure is intalled in your system you need to install the python binding for allure. To install the allure behave package in python you just have to type in pip install &#8211;user allure-behave. Now you can easily generate test reports using allure for behave.<\/li>\n<li>To generate reports using allure follow these steps:<\/li>\n<\/ul>\n<p><code>behave -f allure_behave.formatter:AllureFormatter -o %allure_result_folder% .\/features<\/code><\/p>\n<p><code>allure serve %allure_result_folder%<\/code><\/p>\n<h2>7. Reference<\/h2>\n<p>Behave:\u00a0<a href=\"http:\/\/pythonhosted.org\/behave\/\">http:\/\/pythonhosted.org\/behave\/<\/a><\/p>\n<p>GitHub:\u00a0<a href=\"https:\/\/bitbucket.org\/CodersDen\/python-behave\">https:\/\/bitbucket.org\/CodersDen\/python-behave<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction Behave is Behavioural Driven Development\u00a0that uses Python as its back end language. Behave uses tests written in natural language format, backed up by python code. 2. Installation The installation of Behave can be done in two ways: You can install Behave using pip. All you have to do is just type in pip &hellip;<\/p>\n","protected":false},"author":1029,"featured_media":1651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[],"class_list":["post-18003","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Behavioural Driven Development using Python Behave - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"1. Introduction Behave is Behavioural Driven Development\u00a0that uses Python as its back end language. Behave uses tests written in natural language format,\" \/>\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.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Behavioural Driven Development using Python Behave - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"1. Introduction Behave is Behavioural Driven Development\u00a0that uses Python as its back end language. Behave uses tests written in natural language format,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/soumyajit.basu\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-31T09:15:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Soumyajit Basu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SoumyajitBasu19\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Soumyajit Basu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/\"},\"author\":{\"name\":\"Soumyajit Basu\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c2aa0b158203f117998917927a96c276\"},\"headline\":\"Behavioural Driven Development using Python Behave\",\"datePublished\":\"2017-07-31T09:15:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/\"},\"wordCount\":921,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/\",\"name\":\"Behavioural Driven Development using Python Behave - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"datePublished\":\"2017-07-31T09:15:30+00:00\",\"description\":\"1. Introduction Behave is Behavioural Driven Development\u00a0that uses Python as its back end language. Behave uses tests written in natural language format,\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Behavioural Driven Development using Python Behave\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c2aa0b158203f117998917927a96c276\",\"name\":\"Soumyajit Basu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ca834774616f992a60dd418c3424f7d678f645d0974d880abe735f481c8b1407?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ca834774616f992a60dd418c3424f7d678f645d0974d880abe735f481c8b1407?s=96&d=mm&r=g\",\"caption\":\"Soumyajit Basu\"},\"description\":\"Soumyajit is a QA\/DevOps engineer by profession and a technology enthusiast by passion. He loves communicating about technology and is an author at his own blog platform as well as in Dzone and Web Code Geeks.\",\"sameAs\":[\"https:\/\/soumyajit2016.wordpress.com\/\",\"https:\/\/www.facebook.com\/soumyajit.basu\",\"https:\/\/www.linkedin.com\/in\/soumyajit-basu-5a783886\/\",\"https:\/\/x.com\/SoumyajitBasu19\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/soumyajit-basu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Behavioural Driven Development using Python Behave - Web Code Geeks - 2026","description":"1. Introduction Behave is Behavioural Driven Development\u00a0that uses Python as its back end language. Behave uses tests written in natural language format,","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.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/","og_locale":"en_US","og_type":"article","og_title":"Behavioural Driven Development using Python Behave - Web Code Geeks - 2026","og_description":"1. Introduction Behave is Behavioural Driven Development\u00a0that uses Python as its back end language. Behave uses tests written in natural language format,","og_url":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/soumyajit.basu","article_published_time":"2017-07-31T09:15:30+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","type":"image\/jpeg"}],"author":"Soumyajit Basu","twitter_card":"summary_large_image","twitter_creator":"@SoumyajitBasu19","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Soumyajit Basu","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/"},"author":{"name":"Soumyajit Basu","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c2aa0b158203f117998917927a96c276"},"headline":"Behavioural Driven Development using Python Behave","datePublished":"2017-07-31T09:15:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/"},"wordCount":921,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/","url":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/","name":"Behavioural Driven Development using Python Behave - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","datePublished":"2017-07-31T09:15:30+00:00","description":"1. Introduction Behave is Behavioural Driven Development\u00a0that uses Python as its back end language. Behave uses tests written in natural language format,","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/python\/behavioural-driven-development-using-python-behave\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/www.webcodegeeks.com\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Behavioural Driven Development using Python Behave"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c2aa0b158203f117998917927a96c276","name":"Soumyajit Basu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ca834774616f992a60dd418c3424f7d678f645d0974d880abe735f481c8b1407?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ca834774616f992a60dd418c3424f7d678f645d0974d880abe735f481c8b1407?s=96&d=mm&r=g","caption":"Soumyajit Basu"},"description":"Soumyajit is a QA\/DevOps engineer by profession and a technology enthusiast by passion. He loves communicating about technology and is an author at his own blog platform as well as in Dzone and Web Code Geeks.","sameAs":["https:\/\/soumyajit2016.wordpress.com\/","https:\/\/www.facebook.com\/soumyajit.basu","https:\/\/www.linkedin.com\/in\/soumyajit-basu-5a783886\/","https:\/\/x.com\/SoumyajitBasu19"],"url":"https:\/\/www.webcodegeeks.com\/author\/soumyajit-basu\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/18003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/1029"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=18003"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/18003\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1651"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=18003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=18003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=18003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}