Oktaliem / pythonseleniumpyunit

This repository is dedicated to the Indonesia Software Quality Assurance members for online learning material.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apache JMeter logo

SOFTWARE TESTING ENTHUSIAST


Selenium - Python - PyUnit

This is a sample of Selenium Python (PyUnit) Framework having HTML reporting and Test runner.

Dependencies

$ pip install selenium
$ pip install webdriver_manager
$ pip install selenium-page-factory

It depends on your pip version. Currently, I've pip3 installed on my machine.
So the syntax will be like:
$ pip3 install selenium
etc

Run the Test

Open Terminal in SeleniumTest folder.
i.e 
okta@okta:~/Documents/GitHub/pythonseleniumpyunit/SeleniumTest$

Set environment
$ export PYTHONPATH=`pwd`   (optional)

Run Test per Class
i.e.
$ python -m unittest test/module_1/Scenario1.py -v
$ python -m unittest test/module_1/Scenario2.py -v
$ python -m unittest test/module_1/Scenario3.py -v
$ python -m unittest test/module_1/Scenario4.py -v 	

Run Test with Test Runner
$ python -m unittest test/testrunner/TestRunner.py -v

It depends on your python version. Currently, I've python 3.8 installed on my machine.
So the syntax will be like:
$ python3 -m unittest test/module_1/Scenario1.py -v
etc

References

Special Thanks to NayakwandiS.

This repository is a modification version of original repository Github.

The purpose of this repository is for education only.

Additional modification & features :

  • Add webdriver manager capabilities.
  • Remove unnecessary codes.
  • Compatible version to run demo in Linux and MacOS.
  • Add information how to run the test (README).
  • Run the test in selenium grid (zalenium or Selenium Grid Docker) - TO DO
  • Video how to run the test - TO DO

Libraries

Articles

About

This repository is dedicated to the Indonesia Software Quality Assurance members for online learning material.

License:MIT License


Languages

Language:Python 80.1%Language:HTML 19.9%