Develop shell together
- Run requirements setup script "setup.py",
$ sudo python3 setup.py
- Install requirements manually:
$ sudo apt-get install -y p7zip-full python3-pip python3-requests python3-pytest
$ sudo pip3 install requests
$ sudo pip3 install -U pytest
$ sudo pip3 install pytest-html
- If pip can not be use then execute below command:
$ sudo apt-get install -y python3-requests python3-pytest
- Modify "test_config.ini" before run pytest scripts, contans require test configuration.
# change package V005200 to V005400 by one line command.
$ sed -i 's,/home/allen/Desktop/release/AS60G1_BMC_V005200.zip,/home/allen/Desktop/release/AS60G1_BMC_V005400.zip,g' test_config.ini
- How to run pytest:
# with file
$ py.test-3.4 test_1_CheckImageFile.py -s --html=report.html
# current path
$ py.test-3.4 -s --html=report.html
# output log
$ py.test-3.4 test_2_BmcImageFlash.py -s --html=report.html 2>&1 | tee output_report.log