Package: shishito
ShishitoShishito is module for web and mobile application functional testing using Selenium Webdriver & Python.
It runs tests using included libraries and generates nice test results output.Documentation -http://shishito.readthedocs.org/en/latest/index.html(hosted on Read the Docs)Featuresruns python Selenium Webdriver tests via PyTesteasy configuration for local and remote (BrowserStack, Appium, ..) test executioncontains useful test librariesgenerates HTML test results report (with screenshots for failed tests)designed to be used as a module (by multiple projects if needed)Pre-requisitiesInstall Python moodules from requirements.txtpip install -r requirements.txtWebdriver drivers need to be setup (ChromeDriver, InternetExplorerDriver etc.)Quick Startclone Shishito repository.git clone git@github.com:salsita/shishito.gitaddshishitodirectory into PYTHONPATH environment variableclone sample test project repositoryhttps://github.com/salsita/shishito-sample-projectgit clone git@github.com:salsita/shishito-sample-project.gitif you want to use BrowserStack for running your tests, replace "bs_username", "bs_password" values with your credentials inshishito-sample-project/config/server_config.propertiesor pass it to runner python file as command line argument using flag --browserstack username:tokenif you want to use Saucelabs for running your tests, add your credentials to saucelabs variable inshishito-sample-project/config/server_config.propertiesor pass it to runner python file as command line argument using flag --saucelabs username:tokenset your preferred browser settings inshishito-sample-project/config/web/(browserstack|local).propertiesor for mobile apps inshishito-sample-project/config/mobile/appium.propertiesrungoogle_test_runner.pyin sample project folder!If you use local driver, you should now observe browser being started and tests running.
There are information about progress shown in console output.
Once testing is finished, HTML report can be found in:shishito-sample-project/results folder # HTML report
shishito-sample-project/results_archive folder # zipped HTML reportContinuous IntegrationUsing Shishito with Continuous Integration solution, such as Jenkins, is easy!
All you need to do is clone Shishito repo and add it into the PYTHONPATH.Example script below (Jenkins "execute shell" build step):#!/bin/bash####################### clone Shishito  #######################cd$WORKSPACEgitclonegit@github.com:salsita/shishito.git####################### VARIABLES          #######################exportPYTHONPATH=${PYTHONPATH}:/$WORKSPACE/shishito####################### SCRIPT             #######################pythongoogle_test_runner.pyCommand line options--platformweb# define platform on which run tests (currently supported: web, mobile, generic)--environmnetlocal# define environment in which run tests (currently supported: local, browserstack, appium, remote)--test_directorytests# define directory where to lookup for tests (project_root + test_directory)# supported platform/environment combinations:#   generic/local#   generic/remote#   web/local#   web/browserstack#   web/remote#   mobile/appium (can run on local/remote appium server or on saucelabs)#   node_webkit/node_webkit--smoke# runs only tests with fixture "@pytest.mark.smoke"--browserstacktestuser1:p84asd21d15asd454# authenticate on BrowserStack using user "testuser1" and token "p84asd21d15asd454"--saucelabstestuser1:p84asd21d15asd454# authenticate on Saucelabs using user "testuser1" and token "p84asd21d15asd454"--test_railuser@email.com:1AVFS51AS# authenticate on TestRail using user email "user@email.com" and password "1AVFS51AS"If no arguments are specified, Shishito, by default, searches for settings combinations in (server|local).properties files and runs tests according to them.Configuration filesserver_config.propertiesdefault configuration file with test variableschanges to variables should be maintained in VCS; so that configuration can be reused for automated test execution# modules
test_platform=web
test_environment=local

# test dir
test_directory=tests

# General
base_url=http://www.google.com
environment_configuration=Chrometest_platform- on which platform run tests (web, mobile)test_environment- in which environment run tests (local, browserstack, appium)test_directory- in which directory lookup for testsbase_url- url that will be loaded by default upon start of each testenvironment_configuration- which configuration use from .properties file (used when tests are run without runner)remote_driver_url- remote driver hub. Selenium server needs to be running on this url.local_config.propertiesif variablelocal_execution=True, script will look first search local config for test variablesin case variables are not found, it will fall back to values in defaultserver_config.propertieschanges to this file shouldnotbe maintained in VCS (they serve only for local test execution)<platform>/<environment>.propertiescontains combinations, for which the tests should be executede.g. browser and resolution for local web browserconftest.pyhelper file that defines command line arguments, provides fixtures and other information for Shishito runnerConfigurationShishito can be configured with command lines arguments and config files. Some configuration values are also added as arguments to PyTest (depends on test environment).
Configuration values are looked up according to these priorities:pytest.configcommand line argumentslocal configuration file (if enabled: local_execution=True)server cofiguration fileNode-webkit configurationShishito is able to run tests against node-webkit applications. Current implementation does not allow tester to specify based URL, just to run application from URL directly specified within application.
Creating of webdriver driver object is done by specificchromedriverwhich has to be placed in same directory as node-webkit application.
Chromedriver will search for node-webkit binaries and start the application. Binaries have to have specific names otherwise chromedriver won't find them.Node-webkit binary must have name:For Linux:nwFor Windows:nw.exeFor OS X:node-webkit.appTEMPORARY SCREENSHOT ON FAILURE FUNCTIONALITYDue toissue in Node-webkit chromedriver; there is added
temporary screenshot on failure functionality usingpyscreenshot module. This functionality takes screenshot of whole desktop not only node-webkit
application window. This issue should be fixed in chromedriver 2.15. There is alpha version of node-webkit chromedriver v2.15.
This functionality is going to be removed once issue is fixed.Note: Ubuntu: It is necessary to install also python-imagingsudo apt-get install python-imagingTroubleshooting for Node-webkit platformIf you see exception similar to one belowraise WebDriverException(
       \"\'\" + os.path.basename(self.path) + \"\' executable needs to be \
           available in the path. Please look at \
           http://docs.seleniumhq.org/download/#thirdPartyDrivers \
           and read up at \
\>                   http://code.google.com/p/selenium/wiki/ChromeDriver")
E    WebDriverException: Message: 'chromedriver' executable needs to be available in the path. Please look at http://docs.seleniumhq.org/download/#thirdPartyDrivers and read up at http://code.google.com/p/selenium/wiki/ChromeDriver

/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/service.py:70: WebDriverExceptionYou need to check Chromedriver file access rights mainly in Linux or OS X, Windows should be ok.Test Management SupportShishito support upload of test results to TestRail test management app.
Following properties in server/local config have to be filled:test_rail- credentials for test rail. Can be also left empty and passed via cmd argument (see above)test_rail_url- URL of test rail instance. (example:https://mycompany.testrail.net)test_rail_project_id- ID of TestRail project (example: 1)test_rail_section_id- ID of TestRail test section (example: 2)test_rail_test_plan_id- ID of TestRail test plan (example: 5)test_rail_suite_id- ID of TestRail test suite (example: 1)For further information, see TestRail API documentationhttp://docs.gurock.com/testrail-api2/start.History3.1.16 (2021-06-08)Logging options configuration3.1.14 (2021-01-05)Hotfix Google Options3.1.13 (2020-03-24)Fix bug in Test Rail API - handling skipped testsAdd subsections to Test Rail3.1.11 (2020-02-20)Update Test Rail API3.1.10 (2019-08-12)Update the HTML report to contain even errors collected during PyTest collection phase3.1.9 (2019-07-18)Minor fix ofshiscript not updating newly added packages to requirements.txt3.1.8 (2019-07-03)Fix of HTML Test Report not showing errors in the setup phaseDisable escaping of special characters error message in Test Report3.1.7 (2019-07-01)support download_path for chromedriver 75+let download_path to be optional3.1.6 (2019-06-18)support download_path and browser extension3.1.5 (2019-05-22)Minor fixes3.1.4 (2019-05-21)Fix Flaky & HTML report issue3.1.3 (2019-03-07)extend appium Browserstack capabilities3.1.2 (2019-01-14)support for environmental variables in config files3.1.1 (2019-01-09)Fix problem with multiple drivers on Mobile devicesChange how test names are obtained for Browserstack3.1.0 (2018-11-27)Improve generated report3.0.7 (2018-10-25)Hotfix - wrong config parsing3.0.6 (2018-10-25)Add logging options to webdriver3.0.5 (2018-09-10)Activate venv in shi executable script3.0.4 (2018-08-15)Update the exacutable "shi" script to work in actual directoryAdd README and HISTORY files3.0.3 (2018-08-14)Enable "shi" executable script to work with shishito installed withpip install shishito