Configuring Base url in /usr/local/lib/python2.6/dist-packages/sst/actions.py for data driven tests
When running a data driven test for the first time , is it required to change some of the configuration(s) in the /usr/local/
I tried running a simple data driven test using a simple data (pore.csv) and a test (pore.py) file as mentioned in the instructions. The test failed and gave some errors.
test_pore (sst.runtests.
Starting browser: Firefox
Loading data row 1
Going to... http://
Waiting for 'get_element'
Title is: u'Problem loading page'. Does not contain 'Ubuntu'
FAIL
Stopping browser
Eventually i traced the reason for the fail (in the error console) to the base url in the "/usr/local/
This i edited. and removed the "localhost:8080". Afterwards i was able to overcome this error.
So my question is it required to change some of the defaults in the files and other settings?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Corey Goldberg
- Solved:
- 2012-12-21
- Last query:
- 2012-12-21
- Last reply:
- 2012-12-21
Vincent Ladeuil (vila) said : | #1 |
Things would be clearer if you show us your test itself, but based on ' Going to... http://
> is it required to change some of the defaults in the files and other settings?
The answer to that is no, but you probably want to use actions.
Ayo (k-akolay1) said : | #2 |
The test script/file = pore.py
from sst.actions import *
go_to(url)
assert_
the data file = pore.csv
url^title
www.ubuntu.
www.google.
www.amazon.
when executed the console came up with this
plore@ubuntu:~$ sst-run -d /home/plore/ pore
-------
starting SST...
date time: 2012-12-19 18:41
test directory: '/home/plore/'
report format: 'console'
browser type: 'Firefox'
javascript disabled: False
browswermob proxy launcher: None
shared directory: None
screenshots on error: False
failfast: False
debug: False
headless xserver: False
Reading data from 'pore.csv'... found 3 rows
3 test cases loaded
-------
test_pore (sst.runtests.
Starting browser: Firefox
Loading data row 1
Going to... http://
Waiting for 'get_element'
..........
The test failed..
From the error message i was able to trace it to the a default configuration (line 92) in the /usr/local/
the line 92 was ==> BASE_URL = 'http://
this is seen to appear before the url that is the data file
after editing it to ==> BASE_URL = 'http://
So my question is, is it required to normally change any of the configurations before running the tests.
|
#3 |
you are not using url's.
for example, this is a full url:
go_to('http://
this is not:
go_to('
the second case is handled like a relative url, using the current base_url to append to.
hth,
-Corey
Ayo (k-akolay1) said : | #4 |
Thanks Corey Goldberg, that solved my question.