Not exactly what you want but it could help you understand testing with web2py :
https://github.com/viniciusban/web2py.test https://github.com/niphlod/welcome_augmented New initiative here : https://groups.google.com/d/msg/web2py/hcsHgJiFEwc/apeBhnf0AgAJ Good read! RIchard On Thu, Nov 3, 2016 at 4:56 PM, 'Roman' via web2py-users < [email protected]> wrote: > Hi people. > > Short question: is there a way to run unit tests for my web2py controllers > from PyCharm? > > I am running the latest web2py with version: 2.14.6-stable > > What i found out so far: > > There is an approach to run unit tests from command line. Following this > blogpost: http://web2py.com/AlterEgo/default/show/260 i am able to run a > unit test for my controller. BUT just for convinience i want to let my IDE > manage those tests (i.e. start them and show me the results in a PyCharming > way). > > To let PyCharm run a unit test, you have to create a new run/debug > configuration, you have to enter the location of a unit test script, to run > it directly. PyCharm does some thing with "utrunner.py" (unit_test_runner?). > I tried to give the run/debug configuration the path to web2py.py and as > parameter the "--shell=<myApp> --import_models --run=my_script.py" thing. > But unfortunately the "utrunner.py" needs well formatted unit test scripts. > > Prior to the mentioned blogpost, there was another approach to run unit > tests for web2py controllers: http://www.web2py > .com/AlterEgo/default/show/213 > Unfortunately, as mentioned in the other post, going that way, my > controller action is not able to see the db :-( > > Fazit: > Does anybody know a way how to run unit tests for my web2py controllers > from PyCharm? > Or > Does anybody know how to run a unit test for my web2py controllers > directly from command line (without web2py.py) and how can i pass a DAL > object to the environment of my controller? > > Many thanks in advance and greetings from Berlin > > Roman > > -- > 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. > -- 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.

