Re: [web2py] Unit Testing in PyCharm

2016-11-10 Thread 'Roman' via web2py-users
Thank you very much for the links, i will read and report my findings here.

Roman

Am Mittwoch, 9. November 2016 15:37:52 UTC+1 schrieb Richard:
>
> 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 <
> web...@googlegroups.com > 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= --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 web2py+un...@googlegroups.com .
>> 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Unit Testing in PyCharm

2016-11-09 Thread Richard Vézina
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 <
web2py@googlegroups.com> 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= --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 web2py+unsubscr...@googlegroups.com.
> 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Unit Testing in PyCharm

2016-11-04 Thread 'Roman' via web2py-users
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= --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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.