Archive | testing RSS for this section

How to run your first Software Test with Python and the Robot Framework in Ubuntu

1. At first you have to install some programms.

sudo apt-get install python2.7-dev python-setuptools python-pip python-wxgtk2.8 python-wxversion
sudo pip install robotframework
sudo pip install robotframework-selenium2library

2. You need a folder for your testing files

3. Robot-File

Save the Robot-File with test1.robot in your test folder:


***Test Cases***
Multiply be two Test
${result}=       Multiply By Two  123
${expected}=     Convert To Number  246
Should Be Equal  ${result}   ${expected}

4. Python-File

Save the Python file with in your test folder:

def multiply_by_two(number):
return float(number) * 2

5. Run pybot in you console in the test folder

pybot test1.robot

6. Let me know if everything works right

%d Bloggern gefällt das: