Skip to content

How to start working with framework

Roman Pobotin edited this page Jun 8, 2018 · 16 revisions

Linux Setup (Specific installation for linux OS)


Check Windows installation video

IMAGE ALT TEXT HERE

Preconditions

  • Install Python 3+
  • Install PyCharm
  • Install pip (open terminal and paste python get-pip.py )
  • Install Java
  • Install PowerShell (if OS is Windows). Powershell should has version 3+. If you have Windows 7, you will meet a lot of troubles to install it. This link extremely helped me with.
  • Install Git
  • Install Git bash (if OS is Windows)
  • Install Brew (if OS is Mac)
  • Install Allure

Clone project

  • Open terminal or bash if Windows and choose the directory for the project (cd PyCharmProjects; mkdir automation_tests; cd automation_tests)
  • Clone project (paste to opened terminal git clone https://github.com/Goraved/Typhon.git)
  • Open project via PyCharm
  • Sync latest changes from dev branch git pull origin dev
  • Change current using branch to dev

changeBranch.png

Pycharm settings

  1. Open cloned project from PycharmProjects using PyCharm
  2. Go to File -> Settings (Ctrl+Alt+S) -> Project: [name] -> Project Interpreter pycharmSettings.png
  3. Open Project Interpreter drop-down and click Show All...
  4. Click on plus button (+), then Add local
  5. Choose Virtualenv Environment at left panel
  6. Choose New environment radio button
  7. Choose python 3+ in Base interpreter and submit form pythonInter.png
  8. Wait for creating virtual env and close Project Interpreters modal window. If you get an error (on Windows), please download Visual C
  9. Apply settings windows and wait for loading
  10. click OK to close it
  11. Open requirements.txt file
  12. At top of the page click Install requirements on notification message requirementsInstall

Set py.test as test runner by default

To set it you need to go by path: File -> Settings -> Tools -> Python Integrated Tools and then select py.test in Default test runner dropdown. defaultRunner.png

Test run

  • Right-click on tests directory and choose Run 'PyTest in tests' to run all the tests

runTests.png