* Added system info test case of Provision UI Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added url of Provision UI in allure Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added Prov UI test cases for creating device in Inventory Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Repalced = with : in allure of Prov UI url Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * changed the test case name Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Changed the payload parameters to match Prov UI Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added configuration in Prov class Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Removed the class of ProvUtils Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added the prov UI api testcases for adding and deleting a device Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Removed the configuration file Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added prov ui fixture Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added Prov UI controller object and fixture Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Added prov controller obj Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com> * Changed the allure report name for some attchments Signed-off-by: haricharan-jaka <haricharan.jaka@candelatech.com>
Controller Library
###cloudsdk.py : This Library Consists of the following- 1. class ConfigureController : Base Configuration Class 2. class Controller(ConfigureController) : Main Cloudsdk Class 3. class ProfileUtility : Used to CRUD over CloudSDK Profiles Utility 4. class JFrogUtility : Used for Artifactory Utils, Get latest Build, Upload Firmware etc.
###Note: cloudsdk.py has libraries that uses Swagger Autogenerated Code.
Setup The Environment For using the cloudsdk library
Using Swagger Autogenerated CloudSDK Library pypi package (implemented with swagger codegen). Using [pytest] as the test execution framework. Using pylint for code quality monitoring. Using allure with Github Pages to report test outcome.
Follow the setps below to setup the environment for your development Environment
mkdir ~/.pip
echo "[global]" > ~/.pip/pip.conf
echo "index-url = https://pypi.org/simple" >> ~/.pip/pip.conf
echo "extra-index-url = https://tip-read:tip-read@tip.jfrog.io/artifactory/api/pypi/tip-wlan-python-pypi-local/simple" >> ~/.pip/pip.conf
after that do the following in this folder
pip3 install -r requirements.txt
Now your cloud sdk code is downloaded with all of the dependencies and you can start working on the solution
Docker
Alternatively you can use provided dockerfiles to develop\lint your code:
docker build -t wlan-cloud-test -f Dockerfile .
docker build -t wlan-cloud-lint -f Dockerfile-lint .
and then you can do something like this to lint your code:
docker run -it --rm -v %path_to_this_dir%/old_pytest wlan-tip-lint -d protected-access *py # for now
docker run -it --rm -v %path_to_this_dir%/old_pytest wlan-tip-lint *py # for future
to have a better output (sorted by line numbers) you can do something like this:
docker run -it --rm --entrypoint sh -v %path_to_this_dir%/old_pytest wlan-tip-lint -- -c 'pylint *py | sort -t ":" -k 2,2n'
and you can use something like this to develop your code:
docker run -it -v %path_to_this_dir%/old_pytest wlan-tip-test