An open API service indexing awesome lists of open source software.

https://github.com/warriorframework/warriorframework_py3

This Repository is under development
https://github.com/warriorframework/warriorframework_py3

Last synced: 2 months ago
JSON representation

This Repository is under development

Awesome Lists containing this project

README

          

# warriorframework
[warriorframework.org](http://warriorframework.org)

Warrior Framework is an open source automation framework designed to enable anyone to automate their testing, processes, and repetitive tasks by simplifying the complex process of building an automation infrastructure. As a keyword and data driven framework, Warrior’s infrastructure is built to maximize on re-usability of built in keywords. In addition, Warrior’s app based platform provides the users with native apps to easily implement their automation needs, while providing the user with the ability to customize their own workflow apps.

#### Prerequisites

###### Linux
Get VirtualBox [here](https://www.virtualbox.org/wiki/Downloads)

Get Linux Image [here](https://www.ubuntu.com/download/desktop?)

Follow these [Instructions](https://www.lifewire.com/run-ubuntu-within-windows-virtualbox-2202098) to get a Virtual Machine set up on your system

###### Python 3.6+ & pip
Follow this [tutorial](http://thelazylog.com/install-python-as-local-user-on-linux/) to get the Python you need.

#### Procedure to install warrior framework
###### Create and Activate virtual environment

`python3 -m venv warriorenv`

`source warriorenv/bin/activate`

###### Procedure to install warrior pip module (from pypi server)

1. Install warriorframework, This installs only warrior without any warrior modules.

1. Latest version warriorframework from PyPI server

`pip install warriorframework`

2. Specfic Version warriorframework from PyPI Server

`pip install warriorframework==4.3.0`

3. Uninstall warriorframework

`pip uninstall warriorframework`

2. Install required warrior modules.

1. Required warrior modules can be installed from PyPI Server.

For Example, Install only warriorcli module if you have only cli automation tasks

`pip install warriorcli`

`pip install warriornetconf`

`pip install warriorsnmp`

`pip install warriorgnmi`

`pip install warriorcloudshell`

`pip install warriorrest`

`pip install warriorselenium`

`pip install warriorkafka`

`pip install warriornetwork`

`pip install warriorserver`

`pip install warriormongo`

`pip install warriordemo`

`pip install warriorfile`

`pip install warriorciregression`

`pip install warriormicroapps`

`pip install warriorwapp`

2. Specfic Version warrior module from PyPI Server

`pip install warriorcli==1.0.0`

3. Install warrior framework and all modules

`pip install warriorframeworkallmodules`

###### Procedure to install warrior from git (this step is not required if you have installed warrior from pypi server)

We strongly recommend getting the latest released version.

1. Get the Repository

`git clone https://github.com/warriorframework/warriorframework_py3.git`

2. Go into warriorframework_py3 Directory

`cd warriorframework_py3`

3. Get List of Versions Available

`git tag --list" command`

Output:

`warrior-4.3.0`

`warrior-4.2.0`

`warrior-4.1.0`

`warrior-4.1.0-beta`

`warrior-4.0.0-beta`

`warrior-3.4.0`

`warrior-3.3.0`

`warrior-3.2.0`

4. Check the Current Version You Are At

`git branch`

Output:

`\* master`

`\* indicates the active version.`

`In the above example master is the active version.`

`If the active version is master it means you are not using a standard release version of warriorframework and hence it may not be a stable tested version.`

5. Get A Specific Version from master

`git checkout warrior-4.3.0`

Output:

`Note: checking out 'warrior-4.3.0'.`

`You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.`

`If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:`

`git checkout -b new_branch_name`

`HEAD is now at 2bba292... Merge pull request #234 from warriorframework/release-warrior-4.1.0`

6. Verify the Active Version.

`git branch`

Output:

`\* (HEAD detached at warrior-4.3.0)`

`master`

`\* indicates the active version.`

7. Install requirements (make sure you are in virtual environment)

`pip install -r requirements.txt`


Python Packages used by warriorframework

pexpect

requests

selenium

pysnmp

kafka-python

pyvirtualdisplay

pycryptodome

paramiko

lxml

xlrd

cloudshell-automation-api

pytest

openpyxl

pandas

configobj

###### Execute Warriormigrate command (this is required if custom lib is using warrior imports)

1. pip installation

`Warriormigrate -pkgs_list all`

`Warriormigrate -pkgs_list warriorcli,warriornetconf`

(or)

2. git installation

`./warrior/Warriormigrate -pkgs_list all` (to use all inbuilt warrior keywords, utils in custom lib)

`./warrior/Warriormigrate -pkgs_list warriorcli,warriornetconf` (to use only cli, netconf keywords, utils in custom lib)


###### Execute scripts

1. pip installation

`Warrior -pythonpath `

(or)

2. git installation

`./warrior/Warrior -pythonpath `