- Install Git
- Install Python and Pip
- Install a Framework
- (Optional) Install an IDE
Git is a version control system that lets you check out code from a repository, work with that code on your own branch, and then merge that code with any changes that have been made by other developers. Git is an essential tool for distributed development teams, and is a critical component of the continuous integration/continuous development toolchain.
- Go to https://git-scm.com/downloads.
- Under Downloads, click Mac OS X.
- When the download completes, double-click the
.dmg
file open the installer package. - Double-click the installer package to begin the installation.
Security Warning
You may see a warning message that the package can't be opened because it's not from a recognized developer. If this happens, go to System Preferences > Security and Privacy Settings, and click Open Anyway.
- Click Continue for the installation, and enter your local password to authorize the installation.
- Go to https://git-scm.com/downloads
- Under Downloads, click on Windows.
- When the dialog opens asking if you want to allow the app to make changes to your device, click Yes.
- Follow the steps in the setup wizard to complete the installation. You should accept all the default settings.
-
Using
brew
installpython
:$ brew install python3
Python 2.7 is included by default on recent versions of Mac OSs. If it somehow not included, install it by running
brew install python
-
(Optional) Install
pip
to manage packages. Modern versions of Python come withpip
included. To verify if you havepip
installed, runpip -V
in your command prompt. You should see something like this:
pip 18.1 from /path/of/python/installation
If you get an error or "pip not found" message, you can install
pip
separately using the following commands:$ curl -O http://python-distribute.org/distribute_setup.py $ python distribute_setup.py $ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py $ python get-pip.py
-
Install
virtualenv
in order to manage projects that have different or conflicting dependencies--it also prevents you from accidentally installing global python dependencies.$ pip install virtualenv
- Go to https://www.python.org/downloads/.
- Click the "Download Python
<version>
" button. - Download the package and extract it on you system.
- Open the executable and follow the prompts to complete installation.
A testing framework is a set of guidelines/rules for desiging test cases.
Frameworks themselves consist of test and reporting classes that allow QA engineers to test efficiently.
This repo only supports pytest
and unittest
.
For more information regarding other libraries, checkout our GitHub repo that catalogs all sample test frameworks.
- Open a terminal (OSX) or command prompt (Windows)
- Navigate to the pytest directory:
cd on-boarding-modules/pytest-examples/
- Resolve the package dependencies:
sudo pip install -r requirements.txt
- Run tests:
pytest
unittest
is an included test module in the Python standard library. Its API will be familiar to anyone who has used any of the JUnit/nUnit/CppUnit series of tools.
- Open a terminal (OSX) or command prompt (Windows)
- Navigate to the unittest-examples directory:
cd on-boarding-modules/unittest-examples
- Resolve the package dependencies:
sudo pip install -r requirements.txt
- Run tests:
python -m unittest
It's recommended to install and Integrated Developer Environment, or a text editor, to help manage package dependencies, interperters, and overall code execution. There are several options available, some of them are free and some require payment:
- PyCharm community edition is free, Professional version requires subscription.
- Visual Studio Code free text editor from Microsoft with a wide variety of extensions.
- Komodo Edit, free, text editor, stripped down version of Komodo IDE (paid version).
-
In your IDE, select an interpreter that references the version of Python installed on your system. Below are links to the relevant documentation for each IDE:
-
(Recommended) Use a
virtualenv
to manage dependencies. See the following documentation for more details: