Line 28: |
Line 28: |
| pip install robotframework-ftplibrary | | pip install robotframework-ftplibrary |
| pip install robotframework-sshlibrary | | pip install robotframework-sshlibrary |
| + | |
| + | You can check if the SSH library installed successfully with: |
| + | |
| + | python -c "import SSHLibrary" |
| + | |
| + | If you find you have problems with the SSH library, reinstalling the support libraries for the SSH library through yum might help: |
| + | |
| + | sudo pip uninstall pycrypto |
| + | sudo yum erase python-crypto |
| + | sudo yum clean all |
| + | sudo yum install python-crypto |
| + | sudo yum install python-paramiko |
| | | |
| Note that selenium needs a browser to drive, so you'll need to install a graphical GUI, you can do this by: | | Note that selenium needs a browser to drive, so you'll need to install a graphical GUI, you can do this by: |
Line 58: |
Line 70: |
| http://sourceforge.net/projects/rf-ftp-py/files/1.2/FtpLibraryExample.txt/download | | http://sourceforge.net/projects/rf-ftp-py/files/1.2/FtpLibraryExample.txt/download |
| | | |
− | ==Making it test SMEServer== | + | == SME Server Test Automation on GitHub == |
| | | |
− | Marco Hess has made good progress with getting the framework to talk to an SMEServer.
| + | The git repository with an intial set of tests for SME Server is now on GitHub |
| + | here: |
| | | |
− | His code is here:
| + | https://github.com/MarcoHess/smeserver-test-automation |
− | | |
− | https://franka.through-ip.com/git/?p=sme-test-automation.git;a=summary | |
− | | |
− | and I can confirm that it also works on my setup.
| |
| | | |
| ===Loading and Trying it=== | | ===Loading and Trying it=== |
− | If you use this link:
| |
| | | |
− | https://franka.through-ip.com/git/?p=sme-test-automation.git;a=tree
| + | The best way to try these tests is to clone the repository from GitHub with: |
| | | |
− | and click on the "zip" link, then you will get a zipped archive of all the scripts.
| + | git clone https://github.com/MarcoHess/smeserver-test-automation.git |
| | | |
− | Unzip (extract) this into an empty directory
| + | Alternatively you can also download a ZIP file with the whole repository with this link: |
− | | |
− | Alternatively clone the git repository with: | |
| | | |
− | git clone https://franka.through-ip.com/git/sme-test-automation.git | + | https://github.com/MarcoHess/smeserver-test-automation/archive/master.zip |
| | | |
| ===Setting up the tests=== | | ===Setting up the tests=== |
Line 95: |
Line 101: |
| The tests assume that the ${SERVER NAME}.${SERVER DOMAIN} resolve to the correct IP of that server. I typically setup entries for test servers with a host name entry on my main server. | | The tests assume that the ${SERVER NAME}.${SERVER DOMAIN} resolve to the correct IP of that server. I typically setup entries for test servers with a host name entry on my main server. |
| | | |
− | ==Running the tests== | + | ===Running the tests=== |
| | | |
| The tests are setup in an hierarchical fashion. To run all tests: | | The tests are setup in an hierarchical fashion. To run all tests: |
Line 113: |
Line 119: |
| pybot sme/03__remote_access/03__ssh/ | | pybot sme/03__remote_access/03__ssh/ |
| | | |
− | ==RIDE== | + | ===Contributing Tests=== |
| | | |
− | The Robotframework has its own IDE called RIDE. It is particularly useful for running individual tests.
| + | With the main test repository on GitHub it is very easy to 'fork' a copy of the repository, |
| + | start adding, fixing or modifying tests and then send a 'Pull Request' to merge your updates |
| + | into the main repository. |
| | | |
− | Info here:
| + | Here is an outline of that process: https://help.github.com/articles/fork-a-repo |
| | | |
− | https://github.com/robotframework/RIDE/wiki
| + | == Additional Tools == |
| | | |
− | and can be easily installed with:
| + | There are a number of tools that are useful in developing tests. This section lists a number of these: |
| + | |
| + | === RIDE IDE === |
| + | The Robotframework has its own IDE called RIDE. It is particularly useful for running individual tests |
| + | during development. More info here https://github.com/robotframework/RIDE/wiki . It be easily installed with: |
| | | |
| pip install robotframework-ride | | pip install robotframework-ride |
Line 128: |
Line 140: |
| | | |
| ride.py sme | | ride.py sme |
| + | |
| + | === XPath Checker Firefox Plugin === |
| + | It sometimes is quite tricky to locate the right element in a web page to check or click. One method |
| + | that selenium supports is [http://en.wikipedia.org/wiki/XPath XPaths]. |
| + | |
| + | In order to develop these, I found the Firefox plugin 'XPaths Checker' particularly useful. |
| + | |
| + | https://addons.mozilla.org/en-US/firefox/addon/xpath-checker/ |