Sean’s Obsessions

  • Archives

Archive for the 'Linux/Unix/OpenSource' Category

29 Feb

Testing via screen scraping

Trying to figure out how to write a test based on screen scraping. Easiest example is to make sure that certain URIs redirect to the login screen.
Created an “automated” dir under app/tests/cases/, with a file called permissions.test.php:

<?php

class PermissionsTestCase extends CakeWebTestCase {

var $mysite = “http://test.mysite.com”;
[…]

29 Feb

How the hell do you test a controller?

Testing models is straightforward, see http://bakery.cakephp.org/articles/view/testing-models-with-cakephp-1-2-test-suite
Testing a controller though… Why is there nothing good out there that tells you how to test a controller, other than references to Felix’s work that doesn’t use simpletest?
That said, testing a controller should look something like
- Create controller object
- Call an action
- Poke at the controller to make […]

25 Dec

I’ll be speaking at Sharkfest ‘08

I’m giving 2 talks on using Wireshark to expose VoIP problems at Sharkfest ‘08 (schedule).Worker in a new boost free mobile ringtones maker trend. Details are sketchy, I think one of the talks is more of a hands on lab, the other is me talking. I’ve expanded on my techniques from the Linux […]

24 Nov

Frameworks don’t suck

I’ve often had a dim view of web frameworks. At b5media we had more than one case where we’d send out some pretty basic development to be done, and we’d get it back, done in a framework that took more time to get running than it was worth. And, from a performance perspective, all […]

14 Nov

Skinny controller, fat model

I understand how to work within the MVC (model, view, controller) system of development, but once I read skinny controller, fat model I realized what it’s all about. Even though it’s written for Ruby on Rails it’s easy enough to transport to your framework of choice.
I’ve heard the term “fat model” before, but really […]

04 Nov

A simple authentication system with CakePHP 1.2 and Auth Component

I’ve been learning the CakePHP framework recently, and came to need a simple user login system.
Judging by the documentation out there, ACLs are the way to do it. However after spending an hour trying to figure out all the contradicting articles out there I gave up. ACLs are very precise, all I need […]

16 Sep

MythDora and jumpy livetv

After my previous post I ended up wiping my Myth box and installing Mythdora. Apparently there are some unresolved issues in F7’s kernel and the ivtv packaging.
Everything worked well except recording was funny. Watching livetv was jumpy… Every few seconds the audio and video would stutter. Watching a show on the MVP downstairs […]

03 Sep

Fedora Core 4 to Fedora 7

My MythTV box was sadly out of date, and to use the new scheduling service I needed to upgrade.
DVD problems prevented me from upgrading from the DVD I downloaded. Luckily I found how to use the PXE image on the DVD to boot. It’s pretty nifty, you point your bootloader at the PXE […]

27 Jul

Finally, getting Apache to core

I’ve had some problems with Apache and I’d like a core dump when it happens so I can get a backtrace.
It’s harder than you think. Red Hat has 2 documents on it: this and that.
The summary of those is to add
CoreDumpDirectory /var/apache-dump
to httpd.conf, and make that directory 777. Then, edit some startup scripts […]

03 Jul

Using those debuginfo packages

Whenever you generate an RPM (rpmbuild -ba foo.spec), an package called foo-debuginfo is also created.
My original thoughts were that this created a debugging version of the binary, ie the same version compiled with -g, because (*hitches up suspenders*) that’s the way we used to do it.  So, I’d delete them.
After needing to get a backtrace […]

© 2008 Sean’s Obsessions | Entries (RSS) and Comments (RSS)

Powered by Wordpress, design by Web4Sudoku, based on Pinkline byGPS Gazette