smart scheduling for webapp tester

Fetchinson . fetchinson at googlemail.com
Tue May 12 08:00:12 EDT 2015


On 5/12/15, Chris Angelico <rosuav at gmail.com> wrote:
> On Tue, May 12, 2015 at 6:31 AM, Fetchinson . <fetchinson at googlemail.com>
> wrote:
>> I'm looking into a robust solution for web application testing. While
>> selenium is great for the actual testing, I'm thinking of a scheduler
>> as the final piece in the pipeline. Let's say I have 4 websites that I
>> need to test periodically, A, B, C, D. I'd like to be able to define
>> things like "run the tests for site A once a day" or "run the tests
>> for site B twice a day indefinitely" or "run the tests for site C
>> twice a week between now and 2 months from now" or "run the tests for
>> site C once a week between May 25 and June 21".
>>
>> What would be the right scheduling tool for this? I know about the
>> standard tools like cron, sched, etc, and first even wrote one myself
>> (which became of course unmanagable after a short while :)) but was
>> hoping a more sophisticated tool is available.
>
> I'm not sure what you're testing here, so I can't advise on specifics.
> If you're testing your application code, it shouldn't need any
> periodic testing at all, but if you're verifying an active database,
> it may not be necessary to involve your application. Actually, I tend
> never to verify database structures; anything that I would consider
> testing can get coded as a constraint, so it's enforced by the
> database before anything gets committed.

I'd like to test the application code. I do frequent live updates
which are mostly tested, but sometimes things go through which are
buggy and I don't detect them before pushing the change. I know, this
is bad practice, I should do my thorough testing first before going
live, but in my setup occasional bugs are not a big deal. So I find it
convenient to just push changes live fast before complicated and time
consuming testing (I do some tests of course but quick and dirty ones
only) and I'd like to catch all remaining bugs in an automated way by
periodically testing the live web application. Again, generally I
agree that this is bad practice, but my setup is an outlier and
certainly not generic (non-critical in house app with < 10 users).

> But if you really do need things on a scheduler, I would advise using
> your OS's facilities (cron, or equivalent). No need to reinvent the
> wheel, unless you want it to do something different. I've written
> several simple task schedulers, but always because they do something
> fundamentally different from a basic one (like my "Let Me Know", which
> checks my calendar and shows me a tick-down until the next significant
> event - 27 hours until I host Office Hours, at the moment). To simply
> invoke a program every 4:00 UTC, use cron and save yourself the
> trouble.

I might do this in the end and use cron indeed.

Cheers,
Daniel


> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 
Psss, psss, put it down! - http://www.cafepress.com/putitdown



More information about the Python-list mailing list