I will describe again, what I want:

I have url <app>/plugin_splinter/tests
with checkboxes:
  - chrome
  - firefox

  - test localhost:8000
  - test production

  - all webtests --or--
  - webtest1 , - webtest2, ...

Then I want run webtests (splinter+selenium), navigate to different actions 
(and type or click).
But I need to open TESTING database, not the MAIN database.

At this time I have changed the architecture to use of Scheduler (which 
works well),
and I think, I will do following:

- appconfig.ini : test_IP : nnn.nnn.nnn.nnn
   
- <app>/plugin_splinter.py
   if form.process().accepted:
      # dynamically create a file models/_tests.py with something like: 
testDb=True
      # schedule tests here

- in db.py I will open MAIN or TESTING datatabase based on: testDb and 
request.ip==test_IP.

I hope previous will work good for me.
But if somebody has better idea or some comment ....... ? --thanks in 
advance







Dne pondělí 18. července 2016 11:55:57 UTC+2 Mirek Zvolský napsal(a):
>
> 1.
>
> I use postgres database dbapp
> I am trying to make splinter tests and want to run them over the 2nd 
> database dbapp_tests.
>
> When I switch to the testing database (which is EMPTY include the 
> auth_user table)
> I am logged in thanks the session:
> auth.user and auth.user_id are both set (but auth_user is EMPTY).
>
> Can I avoid this, without deleting sessions for the normal work?
>
>
>
> I have ideas for some workarounds, like:
>
> - populate dbapp_tests with single auth_user row (mine...)
>
> - move sessions into database
>
>
>
> But I'm asking, if somebody has idea how to switch both databases more 
> clever.
> Thank you...
>
>
> 2.
>
> I have no good idea how to easy switch between normal and testing database.
> At this time I use port (8000/8001), but this works on development, not on 
> production.
> What is better?
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to