Skip to content

zekedvc/behave-framework

Repository files navigation

Selenium with Python Behave(BDD) Framework

image

Introduction

This is a quick guide to start this Framework.

First steps

Installing Python

Go to Python Webpage and download the correct version for your OS.

Installing Selenium

In command promt type:

pip install selenium

Installing Behave

In command promt type:

pip install behave

If you just want to update type:

pip install -U behave

image

Installing Requirements

pip install -r requirements.txt

Behave Webdriver (not currently using it):

pip install behave-webdriver

Allure Behave

Allure instalation:

pip install allure-behave

For allure reports:

Run the formater to get the json files:

behave -f allure_behave.formatter:AllureFormatter -o %allure_result_folder% ./features

For example I like to put them in a results folder and in a folder with the current date of the execution:

behave -f allure_behave.formatter:AllureFormatter -o results/date

Then use the serve to create the html:

allure serve %allure_result_folder%

Based on my example it will go like this:

allure serve results/date

Report will look like this:

allure-report

Folder Structure example:

folders

Known issues

For:

'allure' is not recognized as an internal or external command... Run the command:

npm install -g allure-commandline --save-dev

or

Install allure from its website(Allure-behave) and set environmental variables till bin path. More info related: Allure errors

Reports can be updated to Netlify to be accessible by other members.

For:

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

Install JDK: JAVA JDK and add the path to environment, example C:\Program Files\Java\jdk-15.0.1

References

Cool videos

Contributing

Pull requests and new ideas are always welcome.

To Do

Add integration with slack.

About

BDD Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published