-
Download the source code. You can download it as a ZIP file from GitHub. But if you're a developer, a better approach is to clone the source code using Git, thus allowing you to easily pull updates and push your changes.
-
Download ChromeDriver. You can download it for free from Chromium project. It's an open source interface to Google Chrome browser. Therefore, you also need to have Google Chrome or Chromium browser installed.
-
Install Python 3 and Python
virtualenv
. -
Create a new instance of Python environment. For example, using
venv
as its name and in Fedora Linux:$ pyvenv venv
-
Enable the Python environment.
$ source venv/bin/activate
-
Install the required Python packages. This includes Behave BDD framework, Requests HTTP library, and bindings for Selenium WebDriver E2E.
$ pip install behave requests selenium
-
Copy ChromeDriver to a visible executable path. In Windows, this will be
venv\Scripts
. In other OS, hovewer, this will bevenv/bin
.
First, make sure the Python environment is activated. You can activate the environment below.
$ source venv/bin/activate
Then run the whole test.
$ behave
Alternatively, you can provide additional arguments. For example, if you're a developer, you might be interested to only run the specific tests that you are currently working on. You can temporarily mark such test features/scenarios with @wip tags, and then run only tests with that tags as follows.
$ behave --tags=@wip
IDE. The project can be imported to Eclipse IDE with PyDev plugin. Ensure that the location of your Python Interpreter in Window > Preferences is correct, or in the same environment as where Selenium library and ChromeDriver are located.
Changing Git user name. Example:
git config --local user.name "John Doe"
git config --local user.email "[email protected]"