GithubHelp home page GithubHelp logo

automation's Introduction

Automation

Consists of various automation examples (for learning puposes) and projects (UI testing) utilizing Selenium and PyAutoGUI frameworks for MacOS devices.

Each test case or suite can be ran individually from Terminal, or you can run all test suites from the console_test_suites.py file. Feel free to explore or submit any ideas via pull request!

All programs were developed on an M1 13" MacBook Pro (2560 ร— 1600). If the tests don't navigate correctly to the right areas on your machine, create a new branch from the main and name it after your machine model with the proper display coordinates.

ezgif com-video-to-gif

Requirements:

  • Must be running macOS 13.0 or later
  • Because the UI testing relies on PyAutoGUI display coordinates to navigate, your System Settings window must be placed in the upper-left most corner of your screen in order for the tests to work (see image below).

Screenshot 2023-02-26 at 3 01 59 AM

Steps to set up environment:

  • cd to $PATH where you cloned this repo.
cd $PATH/Automation
  • Run install shell to install all the dependencies for this repo.
bash install.sh
  • Once complete, you can start running all files from Terminal!

# /UI Testing:

## Run Test Case:
### Steps to run a test case inside Terminal for beginners:

- Go to System Settings directory:

cd UI\ Testing/System\ Settings/

- Run python interpretor:

python3

- import the file where the test case you wish to run resides by entering 'from <directory>.<file_name> import <Class Name> as i' (example below):

from General.generalTestSuite import General as i

- run your test case by entering 'i.<name_of_test_case()>'.

i.test_open_about_general_settings()

- To quit the python interpreter:

quit()


## Run Test Suite:
### Steps to run a test suite inside Terminal for beginners:

- Go to System Settings:

cd UI\ Testing/System\ Settings/

- Run python interpretor:

python3

- import the file where the test suite you wish to run resides by entering 'from <directory>.<file_name> import <Class Name> as i'.

from General.generalTestSuite import General as i

- run your test suite by entering 'i.<name_of_test_suite()>'.

i.generalTestSuite()

- To quit the python interpreter:

quit()


## Run whole Test suite:
### To run the whole test suite inside Terminal for beginners:

- Go to System Settings:

cd UI\ Testing/System\ Settings/

- Run the run_all_test_suites.sh file:

bash run_all_test_suites.sh

- To quit out of script press 'Control' and 'Z'.


# Contribute:
* If you would like to add onto this repo please fork the repo and submit a pull request. I welcome all contributions!
* To add a component to /System\ Settings/ dir please use the component_template.txt for continuity. 
 

If you encounter any issues while following the steps provided please submit via issue tab to let me know. Enjoy!

automation's People

Contributors

dbuzlea avatar

Watchers

 avatar

automation's Issues

Running Accessibility test cases from terminal

Not able to run Accessibility test cases/suite inside python interpreter due to ModuleNotFoundError.

Traceback (most recent call last):
File "", line 1, in
File "/Users/danielbuzlea/Desktop/code/Programs/Python/app/Automation Projects/Automation/UI Testing/System Settings/Test_Suite/testSuite.py", line 7, in
from Accessibility.accessibilityTestSuite import Accessibility
ModuleNotFoundError: No module named 'Accessibility.accessibilityTestSuite'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.