Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: UNSURE 0.265 X-Spam-Level: ** X-Spam-Evidence: '*H*': 0.47; '*S*': 0.00; 'testing,': 0.09; 'cc:addr :python-list': 0.11; 'wrote': 0.14; '"run': 0.16; ':))': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'reinvent': 0.16; 'selenium': 0.16; 'utc,': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'written': 0.21; 'code,': 0.22; 'tests': 0.22; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'hours,': 0.24; "shouldn't": 0.24; 'tend': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'define': 0.26; 'task': 0.26; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'host': 0.29; 'testing': 0.29; 'am,': 0.29; '(like': 0.30; 'database,': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; '(which': 0.31; 'coded': 0.31; 'invoke': 0.31; 'piece': 0.31; 'testing.': 0.31; 'actual': 0.34; "i'd": 0.34; 'basic': 0.35; "can't": 0.35; 'tool': 0.35; 'something': 0.35; 'test': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'next': 0.36; 'shows': 0.36; 'application': 0.37; 'checks': 0.38; 'short': 0.38; 'anything': 0.39; '12,': 0.39; 'sure': 0.39; 'even': 0.60; 'office': 0.60; 'course': 0.61; 'simply': 0.61; 'simple': 0.61; "you're": 0.61; 'first': 0.61; 'save': 0.62; 'myself': 0.63; 'became': 0.64; 'more': 0.64; 'different': 0.65; 'great': 0.65; 'hours': 0.66; 'between': 0.67; 'facilities': 0.69; 'websites': 0.72; 'hoping': 0.75; 'day': 0.76; 'yourself': 0.78; '2015': 0.84; '4:00': 0.84; 'actually,': 0.84; 'day"': 0.84; 'different.': 0.84; 'enforced': 0.84; 'etc,': 0.84; 'scheduling': 0.84; 'verifying': 0.84; 'trouble.': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=9RvU7lastqcGqIw2PWpORFjaiag0wHaJirUJ0qMqlo0=; b=ABcb7B/m62Impqd7czNjB6MwU9+vcHBsFY2fBPQwcvfF8GWYREjbfZT3iTh6APGOed DwV7nNd0oRccvwqF3Ezdoi42fD3dsIyE6Cj20O8RtrhXZu8nQKVqh+dqQZi1kQ8swYHR 4dBvV1n0R2ShB0w6EirRKD5UMkbcUjDwa/3NTCqK8tKTjQPGbYJbViw8ryV3NmLFNbqp PasmFM6dfMcBlqovzrJzZ3SoA0nUd135arh+i0iNYuz3r2C7Lfd0VRC+76bFkMAZwFdx 8u8oCjnoYgFCiZDKRTYih3mj7scgMzM6N/kRteDJ0dSdNhNOf3TkBeb3Os8PqheIYQ6Z DDmg== MIME-Version: 1.0 X-Received: by 10.43.96.10 with SMTP id ce10mr1681237icc.59.1431418152335; Tue, 12 May 2015 01:09:12 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 May 2015 18:09:12 +1000 Subject: Re: smart scheduling for webapp tester From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Tue, 12 May 2015 10:28:40 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431419321 news.xs4all.nl 2889 [2001:888:2000:d::a6]:55267 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 5901 X-Received-Body-CRC: 2353411203 Xref: csiph.com comp.lang.python:90438 On Tue, May 12, 2015 at 6:31 AM, Fetchinson . 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. 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. ChrisA