[web2py] Re: Testing error

2017-07-28 Thread Pierre
looks like the ajax target function is faulty. perhaps it tries to reload web2py.js. Or the ajax call might be wrong (the error message says it wants asynchronous and you give it synchronous call). who's the boss ? :) -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

Re: [web2py] Re: testing Recaptcha failed on bizzard error

2016-04-06 Thread Richard Vézina
I take note... As I said it a draft... I consider having something even not perfect is better than non and we have to start somewhere... I learn a lot about web2py internal these days and I have a very limited time... I bang my head on all sort of issue trying to create these tests so don't have ti

Re: [web2py] Re: testing Recaptcha failed on bizzard error

2016-04-06 Thread Niphlod
don't get it in the wrong way, but covering how a recaptcha is serialized serves noone. If one uses recaptcha and he doesn't get the same number of spaces between (s) a failing test identifying that there are 2 instead of 3 spaces doesn't get web2py more covered (even if machines tell you so).

Re: [web2py] Re: testing Recaptcha failed on bizzard error

2016-04-06 Thread Richard Vézina
I try to create self.request and if I remember it start throwing error about threading... I know they are really basic test and the only objective was to get some coverage, start testing and see the difficulty it represents... Richard On Wed, Apr 6, 2016 at 2:49 PM, Niphlod wrote: > that test

Re: [web2py] Re: testing Recaptcha failed on bizzard error

2016-04-06 Thread Niphlod
that test doesn't really assure recaptcha will ever work and it's completely bogus: it just tries to enforce that serialization will work exatcly as it is now. the real issue is that there isn't a request anywhere On Wednesday, April 6, 2016 at 8:33:47 PM UTC+2, Richard wrote: > > it failed for

Re: [web2py] Re: testing Recaptcha failed on bizzard error

2016-04-06 Thread Richard Vézina
it failed for the same reason On Wed, Apr 6, 2016 at 2:29 PM, Niphlod wrote: > recaptcha should be discarded and recaptcha2 should be promoted as the > default. > > > On Wednesday, April 6, 2016 at 6:17:38 PM UTC+2, Richard wrote: >> >> Hello, >> >> https://github.com/web2py/web2py/blob/master/g

[web2py] Re: testing Recaptcha failed on bizzard error

2016-04-06 Thread Niphlod
recaptcha should be discarded and recaptcha2 should be promoted as the default. On Wednesday, April 6, 2016 at 6:17:38 PM UTC+2, Richard wrote: > > Hello, > > https://github.com/web2py/web2py/blob/master/gluon/tools.py#L848 > > request = request or current.request > self.request_v

[web2py] Re: Testing

2016-03-19 Thread Pierre Thibault
OK, sorry for the noise. Le lundi 14 mars 2016 13:01:48 UTC-4, Leonel Câmara a écrit : > > Yeah this group is moderated so you have to wait until your messages are > aproved the first few times until you're whitelisted. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: Testing

2016-03-14 Thread Leonel Câmara
Yeah this group is moderated so you have to wait until your messages are aproved the first few times until you're whitelisted. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Testing

2016-03-14 Thread Pierre Thibault
OK, it seems the problem is gone but Saturday I sent a few messages and they would not appear. I hope the problem is not generalized. Keep on an eye on this. Le lundi 14 mars 2016 12:49:58 UTC-4, Pierre Thibault a écrit : > > I do not see my messages in this group. > -- Resources: - http://web

[web2py] Re: Testing accions that access the database.

2015-04-08 Thread Vicente Carro
Thanks, this worked for me. In my case I wanted to do the tests in a clone of the original, so the data was there previously. Still I had problems with the migrations in web2py until I used this parameters: if request.function == '_TEST': workdb = DAL('postgres://user:password@localhost/test

Re: Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-19 Thread Richard Vézina
I study a bit each of your demo app, and they pretty much use a similar approach. So for making test execution under web2py environnement, I think we are fine... I see flaw in mocking inside web2py (Niphold as some kind of mocking functions), I guess a default mocking module python file could be

Re: Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-19 Thread Vinicius Assef
Hi guys. I've been too busy in the past months and I couldn't focus on web2py.test. I'm planning to getting back to it next month. On Wed, 18 Feb 2015 17:25:11 -0300 Niphlod wrote >the idea behind the project was to have BDD done. Vinicius was covering >already unittesting. IMHO we

Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-19 Thread Richard Vézina
Thanks Mark, I like pytest, it is pretty flexible... Richard On Thu, Feb 19, 2015 at 11:01 AM, Mark Graves wrote: > You may also consider pytest bdd. > > Its a pytest plugin that brings in BDD gherkin syntax and executable > specifications. > > A nice complement/alternative to behave. > > > On

Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-19 Thread Mark Graves
You may also consider pytest bdd. Its a pytest plugin that brings in BDD gherkin syntax and executable specifications. A nice complement/alternative to behave. On Thursday, February 19, 2015 at 9:29:19 AM UTC-6, Richard wrote: > > Thanks! > > You maybe right about TDD being less applicable web

Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-19 Thread Richard Vézina
Thanks! You maybe right about TDD being less applicable web app... At least in case of controller, for subfunction though input values can be mocked in case of a compute function or a represent function... But doctest maybe enough for that kind of testing... Richard On Wed, Feb 18, 2015 at 3:25

Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-18 Thread Niphlod
the idea behind the project was to have BDD done. Vinicius was covering already unittesting. IMHO web applications (or, at least, the ones I code) rely on too many pieces you can't test without a live browser. Once that concept sinks in, you'll quickly realize that unittesting is too limited wh

Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-18 Thread Richard Vézina
Hello Niphold, What is the advantage of Behave over Lettuce or other (or why you choose Behave)? You didn't implement Unit test, is it because Vinicius already demonstrate it or because other consideration? Thanks Richard On Mon, Feb 16, 2015 at 5:00 PM, Niphlod wrote: > first to the party

[web2py] Re: Testing and web2py - especially appadmin

2015-02-16 Thread Niphlod
first to the party, latest to the thread. https://github.com/niphlod/welcome_augmented -- 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

[web2py] Re: Testing and web2py - especially appadmin

2015-02-16 Thread Mark Graves
James, Thank you for bringing up this very important issue. I have been setting up a continuous integration environment using open source software (Jenkins) as well as some tutorials, in the manner of the ruby koans package. If you're interested, there are 3 repos right now (They are very ro

[web2py] Re: Testing and web2py - especially appadmin

2015-02-11 Thread Dave S
On Wednesday, February 11, 2015 at 5:20:28 AM UTC-8, James O' Driscoll wrote: > > All. > > I have not been receiving any feedback with regards testing. > You might want to check over on web2py-developers, if the book isn't any help. http://web2py.com/books/default/chapter/29/15/helping-web2py

[web2py] Re: Testing and web2py - especially appadmin

2015-02-11 Thread James O' Driscoll
All. I have not been receiving any feedback with regards testing. So are no tests available for key functions supplied with web2py, i.e. appadmin. If this is the case, it is a definite downside to the framework. Regards, James On Thursday, February 5, 2015 at 1:10:31 PM UTC+10, James O' Drisc

Re: [web2py] Re: Testing redirection with py.test

2013-11-05 Thread Vinicius Assef
Thank you so much. I've made some changes in README, too. Take a look. On Tue, Nov 5, 2013 at 12:19 AM, Richard Vézina wrote: > Wrote this to get started : > > # -*- coding: utf8 -*- > > # Create a python virtual environnement > cd > mkdir projects > virtualenv ~/projets/web2py.test > # Access t

Re: [web2py] Re: Testing redirection with py.test

2013-11-04 Thread Vinicius Assef
Richard, in some way, form submission has changed. I don't know exactly in which version, but now you must set _formkey before form submission. I commited some changes. Now you don't need to import run_controller_in, anymore. Just call web2py.run() function. To submit a form, just call web2py.sub

Re: [web2py] Re: Testing redirection with py.test

2013-11-04 Thread Richard Vézina
Wrote this to get started : # -*- coding: utf8 -*- # Create a python virtual environnement cd mkdir projects virtualenv ~/projets/web2py.test # Access the environnement source ~/projects/web2py.test/bin/activate # Now your prompt should look like this : # (web2py.test)username@yourmachine:~$ # Go

Re: [web2py] Re: Testing redirection with py.test

2013-11-04 Thread Richard Vézina
Hello Vinicius, I have been able to run tests, one failed though : === test session starts === platform linux2 -- Python 2.7.4 -- pytest-

Re: [web2py] Re: Testing redirection with py.test

2013-10-31 Thread Vinicius Assef
Yes, that's the way to go. :-) On Thu, Oct 31, 2013 at 2:28 PM, Richard Vézina wrote: > Wait, I didn't read carefully web2py.test more complex than I thought, I > thought it was just an app. > > I will set up a virtualenv. > > Richard > > > On Thu, Oct 31, 2013 at 12:08 PM, Richard Vézina > wrot

Re: [web2py] Re: Testing redirection with py.test

2013-10-31 Thread Richard Vézina
Wait, I didn't read carefully web2py.test more complex than I thought, I thought it was just an app. I will set up a virtualenv. Richard On Thu, Oct 31, 2013 at 12:08 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Ok, I get web2py.test and web2py 2.7.4 (I will test at the same time

Re: [web2py] Re: Testing redirection with py.test

2013-10-31 Thread Richard Vézina
Ok, I get web2py.test and web2py 2.7.4 (I will test at the same time that web2py.test works well with it). Now, https://gist.github.com/viniciusban/7206413 seems just a example... Should I just add it to web2py.test app? Richard On Thu, Oct 31, 2013 at 11:39 AM, Vinicius Assef wrote: > Thank y

Re: [web2py] Re: Testing redirection with py.test

2013-10-31 Thread Vinicius Assef
Thank you, Richard. Basically, I need to isolate web2py.test from my example app and prepare better examples. On Thu, Oct 31, 2013 at 11:59 AM, Richard Vézina wrote: > I would like to help you Vinicius, what could I do? > > Richard > > > On Thu, Oct 31, 2013 at 6:29 AM, Vinicius Assef > wrote

Re: [web2py] Re: Testing redirection with py.test

2013-10-31 Thread Richard Vézina
I would like to help you Vinicius, what could I do? Richard On Thu, Oct 31, 2013 at 6:29 AM, Vinicius Assef wrote: > Good idea. > > I'll make it, but it is based on a previous work [1]. I need improve > docs for it. > > [1] http://github.com/viniciusban/web2py.test > > On Thu, Oct 31, 2013 at 1

Re: [web2py] Re: Testing redirection with py.test

2013-10-31 Thread Vinicius Assef
Good idea. I'll make it, but it is based on a previous work [1]. I need improve docs for it. [1] http://github.com/viniciusban/web2py.test On Thu, Oct 31, 2013 at 12:11 AM, Massimo Di Pierro wrote: > Can you please make a web2py slice about this? > > > On Monday, 28 October 2013 18:13:22 UTC-5,

[web2py] Re: Testing redirection with py.test

2013-10-30 Thread Massimo Di Pierro
Can you please make a web2py slice about this? On Monday, 28 October 2013 18:13:22 UTC-5, viniciusban wrote: > > I created this gist to help people testing controllers that makes > redirection: > https://gist.github.com/viniciusban/7206413 > > Hope it helps someone. > -- Resources: - http://

Re: [web2py] Re: Testing if db insert was successful

2013-08-11 Thread Jordan Ladora
I see, thanks! On Sat, Aug 10, 2013 at 1:39 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > If it does not raise an exception it is successfull. The issue is that > unless you are in a controller action you have to db.commit() or the insert > will be un-committed. > > > On Saturday,

[web2py] Re: Testing if db insert was successful

2013-08-10 Thread Massimo Di Pierro
If it does not raise an exception it is successfull. The issue is that unless you are in a controller action you have to db.commit() or the insert will be un-committed. On Saturday, 10 August 2013 17:07:17 UTC+2, Jordan Ladora wrote: > > Hi, > > I'm unable to figure out how to check when a simpl

[web2py] Re: Testing if db insert was successful

2013-08-10 Thread Jordan Ladora
Oops my bad - unrelated problem caused this - please disregard. o: Thanks. On Saturday, August 10, 2013 8:07:17 AM UTC-7, Jordan Ladora wrote: > > Hi, > > I'm unable to figure out how to check when a simple db insert() was > successful. In my code below, regardless of whether the db insert is

Re: [web2py] Re: Testing your app using py.test

2013-06-03 Thread Richard Vézina
Thanks for answer... I will try web2py.test in the comming days and report experience here... Thanks to share this... Richard On Mon, Jun 3, 2013 at 12:19 PM, Vinicius Assef wrote: > Hi Richard. > > I don't know how to create an in-memory db with postgres, but if you > don't use any direct SQ

Re: [web2py] Re: Testing your app using py.test

2013-06-03 Thread Vinicius Assef
Hi Richard. I don't know how to create an in-memory db with postgres, but if you don't use any direct SQL command, you shouldn't have problems using SQLite to test purposes. No web2py.test doesn't manage any db replication. It just supply a web2py environment usable to your tests. You should mana

Re: [web2py] Re: Testing your app using py.test

2013-06-03 Thread Richard Vézina
Sorry to revive this old thread that get pretty long... But this one si for Vinicius... I have some time to explore and test web2py.test you publish... The only thing, I would know for now is how to use in memory if I use postgres in my app... Should I mock database with SQLite in memory as sugge

Re: [web2py] Re: Testing your app using py.test

2013-05-26 Thread Anthony
Arnon, it is more than a little frustrating having a discussion with you, as it appears you don't really pay much attention to what others are saying. If you go back, you will see I have already addressed your argument. You are correct that we make different assumptions, but the differences are

Re: [web2py] Re: Testing your app using py.test

2013-05-26 Thread Arnon Marcus
I think that we fail to communicate because we have different un-spoken assumptions. Let's take the following sentence as an example for what I mean by that: " less expert users should work on the easy tasks (that they can do), even if it takes them a bit longer, leaving the more expert users to wo

Re: [web2py] Re: Testing your app using py.test

2013-05-26 Thread Anthony
> However, it seems that our common interest for a road-map, may not fit the > way you operate - as you said, if developers don't need a feature, it will > not be written. > This nulls the possibility of web2py developers answering the needs of > web2py users. > Arnon, I think you are somewha

Re: [web2py] Re: Testing your app using py.test

2013-05-26 Thread Anthony
Arnon, once again, we agree. It is true that *some* announcements are under 140 characters and that *all* announcements could be made by including a link to a longer announcement. But then you need a separate place for the linked longer announcements (such as Google Groups). Note, this very thre

Re: [web2py] Re: Testing your app using py.test

2013-05-26 Thread Arnon Marcus
Thanks for explaining, Massimo. However, it seems that our common interest for a road-map, may not fit the way you operate - as you said, if developers don't need a feature, it will not be written. This nulls the possibility of web2py developers answering the needs of web2py users. I agree tha

Re: [web2py] Re: Testing your app using py.test

2013-05-26 Thread Arnon Marcus
> > > Only for announcements that include links to the real announcement. > > Let's see: 2.4.7 is out: http://web2py.com/init/default/changelog (54 characters) 2.4.7 is out: pypy support, thanks Niphlod more bug fixes (57 characters) Obviously, for more verbose change-logs, a link can be

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Massimo Di Pierro
Hello Arnon, let me explain how we operate. First of all we all volunteers so we try not to commit to promises we cannot maintain. For the same reason we do not feel like putting pressure on those volunteers. web2py evolves more like natural evolution than by intelligent design. If a feature i

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Anthony
On Saturday, May 25, 2013 4:25:39 PM UTC-4, Arnon Marcus wrote: > I think that 140 charcters is more than sufficient for announcements. Only for announcements that include links to the real announcement. > I also think that one may be able to demostrate that the tweeter-community > at large

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Anthony
> > Ok, I get it now. But still, the most efficient way would be that the > people with the most experience in a given area, would be the ones to > maintain it. You are putting a restriction on scgedule that does not apply > here. Within a time-frame that is smaller than what an experienced per

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Arnon Marcus
I think that 140 charcters is more than sufficient for announcements. I also think that one may be able to demostrate that the tweeter-community at large would agree with this assertion. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Arnon Marcus
Ok, I get it now. But still, the most efficient way would be that the people with the most experience in a given area, would be the ones to maintain it. You are putting a restriction on scedule that does not apply here. Within a time-frame that is smaller than what an experienced person has avai

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Anthony
> Perhaps, but if they're not interested (or can contribute more value to >> the framework in some other way), that may just leave you. If you're not >> interested, why should anyone else be? >> >> Because other people are different than me. :) > They might like this sort of thing. > That's my

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Anthony
> Not sure what you mean about duplication. If you have something to >> announce, post about it here. >> >> > That's even worse... > Now you are suggesting a 3'rd avenue... > What I mean by "duplication", is that you have multiple places that need > to get updated every time an announcement is

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Arnon Marcus
> I think you would need a formal process to determine which items will make > it into which releases. > How about a poll-voting thing? > > Not sure what you mean about duplication. If you have something to > announce, post about it here. > > That's even worse... Now you are suggesting a 3'rd

Re: [web2py] Re: Testing your app using py.test

2013-05-25 Thread Arnon Marcus
> Perhaps, but if they're not interested (or can contribute more value to > the framework in some other way), that may just leave you. If you're not > interested, why should anyone else be? > > Because other people are different than me. :) They might like this sort of thing. > For further r

Re: [web2py] Re: Testing your app using py.test

2013-05-24 Thread Anthony
> > Well, the way I understand it, the admin-app is a web2py app, and so is > the examples-app - which is the we2py website, so assuming the admin-app > uses a component for that tweeter-feed, then including it in the web2py > website should be as trivial as adding it to the examples-app. Is th

Re: [web2py] Re: Testing your app using py.test

2013-05-24 Thread Arnon Marcus
Well, the way I understand it, the admin-app is a web2py app, and so is the examples-app - which is the we2py website, so assuming the admin-app uses a component for that tweeter-feed, then including it in the web2py website should be as trivial as adding it to the examples-app. Is this what you me

Re: [web2py] Re: Testing your app using py.test

2013-05-24 Thread Anthony
> > There doesn't necessarily have to be a formal-road-map "process" in > existence, for there to be a "road-map-section" in the web2py website. For example, I like how Redmine's road-map section is structured: > http://www.redmine.org/projects/redmine/roadmap > I think you would need a formal

Re: [web2py] Re: Testing your app using py.test

2013-05-24 Thread Arnon Marcus
There doesn't necessarily have to be a formal-road-map "process" in existence, for there to be a "road-map-section" in the web2py website. For example, I like how Redmine's road-map section is structured: http://www.redmine.org/projects/redmine/roadmap There is also an explanation on updating it o

Re: [web2py] Re: Testing your app using py.test

2013-05-23 Thread Anthony
We can update the book as frequently as we like. I think this is the place for announcements (there's also the Twitter feed). Aside from that, I suppose we could maintain some kind of framework roadmap document, but we don't really have a formal roadmap process, and I'm not sure there is a desi

Re: [web2py] Re: Testing your app using py.test

2013-05-23 Thread Arnon Marcus
On the contrary. I think information about testing using web2py, in conjuction with various testing-frameworks/tools, is highly relevant in the book, along with common testing-practices, and the way they apply when testing with web2py. The book, in that case, would act as an information-centrali

Re: [web2py] Re: Testing your app using py.test

2013-05-23 Thread Arnon Marcus
On the contrary. I think information about testing using web2py, in conjuction with various testing-frameworks/tools, is highly relevant in the book, along with common testing-practices, and the way they apply when testing with web2py. The book, in that case, would act as an information-centrali

Re: [web2py] Re: Testing your app using py.test

2013-05-23 Thread Arnon Marcus
On the contrary. I think information about testing using web2py, in conjuction with various testing-frameworks/tools, is highly relevant in the book, along with common testing-practices, and the way they apply when testing with web2py. The book, in that case, would act as an information-centrali

Re: [web2py] Re: Testing your app using py.test

2013-05-23 Thread Arnon Marcus
On the contrary. I think information about testing using web2py, in conjuction with various testing-frameworks/tools, is highly relevant in the book, along with common testing-practices, and the way they apply when testing with web2py. The book, in that case, would act as an information-centrali

Re: [web2py] Re: Testing your app using py.test

2013-05-23 Thread Arnon Marcus
On the contrary. I think information about testing using web2py, in conjuction with various testing-frameworks/tools, is highly relevant in the book, along with common testing-practices, and the way they apply when testing with web2py. The book, in that case, would act as an information-centrali

Re: [web2py] Re: Testing your app using py.test

2013-05-23 Thread Arnon Marcus
On the contrary. I think information about testing using web2py, in conjuction with various testing-frameworks/tools, is highly relevant in the book, along with common testing-practices, and the way they apply when testing with web2py. The book, in that case, would act as an information-centrali

Re: [web2py] Re: Testing your app using py.test

2013-05-20 Thread Anthony
> Just as an example to how the absent of communication has led to > porrer-and-unnecessary implementation(s): > > In we2py_utils, I've seen Thadeus used 'sqlight:memory' in the > connection-string. This completely circumvent the entire issue that many > implementations I had seen have been ha

Re: [web2py] Re: Testing your app using py.test

2013-05-20 Thread Vinicius Assef
web2py.test is not mentioned in the book because it's not part of Web2py. It's a project to make testing app easier in Web2py. Yes, it's a personal project (by myself), but it's not a nice learning experience. It's a work in progress to help people develop test driven apps in Web2py. It's been use

Re: [web2py] Re: Testing your app using py.test

2013-05-20 Thread Arnon Marcus
Just as an example to how the absent of communication has led to porrer-and-unnecessary implementation(s): In we2py_utils, I've seen Thadeus used 'sqlight:memory' in the connection-string. This completely circumvent the entire issue that many implementations I had seen have been hammering on -

Re: [web2py] Re: Testing your app using py.test

2013-05-20 Thread Arnon Marcus
You see what I mean? I had no idea about this thing... And that is after about a full week's worth of time of research. This is very telling I think, and is exactly my point. I hate to be the 'nagging' persona here, but really, my problem is not about 'working out a solution". My problem is the wi

Re: [web2py] Re: Testing your app using py.test

2013-05-19 Thread Vinicius Assef
On Sun, May 19, 2013 at 8:48 PM, Arnon Marcus wrote: > > Where is the "ggod stuff"? The "good stuff" is in our hands and heads. We can join together to help make it happen. That's the beauty of open source. Join us and help us develop this kind of thing, if what exists today doesn't fit your need

[web2py] Re: Testing your app using py.test

2013-05-19 Thread Arnon Marcus
What is the currently suggested way of using pytest/nose in web2py? This current thread is of a WIP script, and I have already seen better approaches, I've seen aome pytest-like and/or nose-like tests of web2py itself within it's folders, and there was a comment in the shell-script that this shou

[web2py] Re: Testing your app using py.test

2013-05-19 Thread Arnon Marcus
I found this: http://ncdegroot.blogspot.co.il/2011/06/using-selenium-2-with-python-and-web2py.html There are many videos on using selenium with django: https://www.google.co.il/search?q=slenium+django&aq=f&oq=slenium+django&aqs=chrome.0.57j0l3.4691j0&sourceid=chrome&ie=UTF-8#q=selenium+django&sour

[web2py] Re: Testing your app using py.test

2013-05-19 Thread Niphlod
me and vinicius are working on having a base start for testing applications with web2py. PS: in either way, web2py will not help you write tests with selenium, web2py will just provide a simpler integration for running whatever test you like (i.e. if you chose selenium you will have to write t

[web2py] Re: Testing your app using py.test

2013-05-19 Thread Mika Sjöman
Hi I really badly want to get into testing because right now I have an application breaking all the time because we do manual QA. Is there any video guide on selenium with web2py, except the one at killerwebdevelopment.com, because I could not get selenium working when I tried. I would reall

[web2py] Re: Testing your app using py.test

2013-05-18 Thread Arnon Marcus
Here is a really great talk about testing in general, ans testing web-apps in particular: http://www.infoq.com/presentations/Selenium -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving email

Re: [web2py] Re: Testing your app using py.test

2013-05-18 Thread Arnon Marcus
> Arnon, how many use cases does your application have? > > Is time to run tests really a bottleneck in your case? > > I'm not sure I know how to answer this question, since we have been working on our code for more than 3 years now, and there is zero testing in it, currently (which makes me

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Vinicius Assef
Arnon, how many use cases does your application have? Is time to run tests really a bottleneck in your case? On Fri, May 17, 2013 at 9:07 AM, Arnon Marcus wrote: > That's good news! > > Now the only question that would remain, is weather this means that > test-performance using this, would be f

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Arnon Marcus
That's good news! Now the only question that would remain, is weather this means that test-performance using this, would be fast enough for that to be considered fitting for interactive-TDD... Otherwise the dal-using-code would still be better-off 'mocked' away... -- --- You received this m

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Anthony
On Friday, May 17, 2013 6:19:16 AM UTC-4, Arnon Marcus wrote: > Using this, would it mean that no file is generated in the file-system? > Does this mean that all that temporary-folder/file jazz would not > be required? > In that case, you could even not have to clear-out the tables from > the pr

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Anthony
On Friday, May 17, 2013 4:23:39 AM UTC-4, Arnon Marcus wrote: > I have some more questions about using an alternative database for testing. > > What would happen to the schema-log file? > Wouldn't having the same model-code using 2 different databases, mess up > the log and brake automatic-migrat

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Arnon Marcus
Using this, would it mean that no file is generated in the file-system? Does this mean that all that temporary-folder/file jazz would not be required? In that case, you could even not have to clear-out the tables from the previous test-run, as there wouldn't be any, right? But it should still req

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Arnon Marcus
Another issue: Testing controller-actions is not considered unit-testing, as it relies on an external dependancy that is supposed to be generated by the framework. In web2py it's even worse - you have to prepare an entier execution environment, as is done in this experiment... Generally, treating

Re: [web2py] Re: Testing your app using py.test

2013-05-17 Thread Arnon Marcus
I have some more questions about using an alternative database for testing. What would happen to the schema-log file? Wouldn't having the same model-code using 2 different databases, mess up the log and brake automatic-migration capability? I mean, you could turn migration off for when testing, b

Re: [web2py] Re: Testing your app using py.test

2013-05-16 Thread Arnon Marcus
Well, as an aside, I am planning to use RAMDISK for my new production-server, as a read-only database. The approach is to use PosgreSQL's Master/Standby Streaming-Replication features. It goes like this: You have 2 instances of PostgreSQL: 1. Master : For write-only, with a data-directory sitting

Re: [web2py] Re: Testing your app using py.test

2013-05-16 Thread Arnon Marcus
+1 ! :) On Thursday, May 16, 2013 10:37:09 AM UTC-7, Anthony wrote: > > I'm not sure how you are goint to implement an in-memory >> relational-database that can be used woth the same db-object-using code - >> that sounds ineresting... > > > db = DAL('sqlite:memory') > > -- --- You received

Re: [web2py] Re: Testing your app using py.test

2013-05-16 Thread Anthony
> > I'm not sure how you are goint to implement an in-memory > relational-database that can be used woth the same db-object-using code - > that sounds ineresting... db = DAL('sqlite:memory') -- --- You received this message because you are subscribed to the Google Groups "web2py-users" g

Re: [web2py] Re: Testing your app using py.test

2013-05-16 Thread Vinicius Assef
Hi Arnon. The idea to have an in-memory db is to test a web app the same way Django does. So, it's up to the developer to choose what must be coded in which function (or method, or routine). If he/she wants to mix all sort of rules and accesses, it's possible. If not, it's too. In this case, due

Re: [web2py] Re: Testing your app using py.test

2013-05-16 Thread Arnon Marcus
I'm not sure how you are goint to implement an in-memory relational-database that can be used woth the same db-object-using code - that sounds ineresting... But this has a smell of having your unit-test testing the framework, more than your code, the same problem that exists in django. Ideally

Re: [web2py] Re: Testing your app using py.test

2013-05-16 Thread Vinicius Assef
On Thu, May 16, 2013 at 9:18 AM, Arnon Marcus wrote: > > > For unit-tests, people doing TDD want interactive-performance. They > configure watchers on their files, so the tests run locally each time they > save them. > It means, their entire test-suite of unit-tests should run in a > second-or-two

[web2py] Re: Testing your app using py.test

2013-05-16 Thread Arnon Marcus
> uhm. How many tests do you want to run in a day ? let's say a test run > takes 20 minutes. You can spin 72 jobs a day. Need more ? Spin another > VM days where processing power was limited are gone for good. > > Are we talking unit-tests or integration-tests? For unit-tests, people doi

[web2py] Re: Testing your app using py.test

2013-05-16 Thread Niphlod
Il giorno giovedì 16 maggio 2013 13:03:33 UTC+2, Arnon Marcus ha scritto: > > > On Thursday, May 16, 2013 11:37:59 AM UTC+3, Niphlod wrote: >> >> the time taken to write something that mocks a database is orders of >> magnitude more than just testing on a separate database instance. > > > And

[web2py] Re: Testing your app using py.test

2013-05-16 Thread Arnon Marcus
On Thursday, May 16, 2013 11:37:59 AM UTC+3, Niphlod wrote: > > the time taken to write something that mocks a database is orders of > magnitude more than just testing on a separate database instance. And the execution-time of tests that use a database is orders-of-magnitude longer than tests

[web2py] Re: Testing your app using py.test

2013-05-16 Thread Niphlod
the time taken to write something that mocks a database is orders of magnitude more than just testing on a separate database instance. As for "decoupling", I'm a big believer that webapp tests should need to be executed with behavioural tests, not unit-tests. Of course business logic core modules

[web2py] Re: Testing your app using py.test

2013-05-16 Thread Arnon Marcus
This sound great, I am currently researching testing-options for web2py, and py.test is one of my leading candidates. I haven't read passes the readme yet, but I plan to - it's a good news to see that there is something being actively developed/maintained and up-to-date for doing this. I have s

[web2py] Re: Testing your app using py.test

2013-04-03 Thread Massimo Di Pierro
+1 On Wednesday, 3 April 2013 19:14:13 UTC-5, viniciusban wrote: > > Hi guys. > > I just published an example application with runnable test cases [1]. > > I don't like doctests, so I used py.test due to some reasons: > - I don't need to subclass anything to make my test cases. > - py.test und

Re: [web2py] Re: testing scheduler in windows

2011-09-07 Thread Martín Mulone
http://code.google.com/p/web2py/issues/detail?id=411 2011/9/5 Brian M > OK, I've got the scheduler reliably (I think) working now under Linux - I > just changed my patch mentioned above a bit to make it so that WEB2PY_PATH > would work even if you didn't launch from the same folder as web2py is

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
I think I've got the scheduler sorted out for windows (other than a lack of debug messages from the workers, suspect it's due to a lack of os.fork()). My TypeError: demo1() keywords must be strings was fixed with http://stackoverflow.com/questions/956867/how-to-get-string-objects-instead-unico

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
OK, I've managed get the scheduler to partially work under windows. I had to add if __name__ == '__main__': to web2py.py right before actually starting web2py (line 19). This appears to have solved the problem of web2py starting over and over again, now when I run python web2py.py -K scheduler

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
OK, I've got the scheduler reliably (I think) working now under Linux - I just changed my patch mentioned above a bit to make it so that WEB2PY_PATH would work even if you didn't launch from the same folder as web2py is in. At line 61, replace: if 'WEB2PY_PATH' in os.environ: sys.path.appen

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
I found that under linux I was able to get the scheduler to successfully run a task by making sure os.environ['WEB2PY-PATH'] was defined. What I did was edit gluon/scheduler.py and change lines 61-62 from if 'WEB2PY_PATH' in os.environ: sys.path.append(os.environ['WEB2PY_PATH']) to if 'WEB2P

  1   2   >