Go to content Go to navigation

HTTP-CUKE · 904 Tage zuvor von Steffen

I stumbled upon this simple Cucumber style HTTP test tool written in Perl by Cosimo Streppone from Opera Software.

You need Perl installed on your system and should get some Modules from CPAN (install LWP, File::Slurp, Any::Moose, Carp::Assert, Try::Tiny). Then just get the project from github and run it with the example test provided.

$ git clone https://github.com/cosimo/http-cuke.git
$ cd http-cuke/bin
$ ./http-cuke --test ../tests/example.test
ok 1 - Given the HTTP request header "Accept-Language" is "en"
ok 2 - When I go to "http://www.google.com/"
ok 3 -   Status code is 200 (expected 200)
ok 4 - Then the final HTTP status code should be "200"
ok 5 -   String 'Google' was found in the page
ok 6 - Then the page should contain "Google"
1..6

Pretty cool. Now you can easily add further tests for your NGINX-VARNISH setup or whatever you have there. For a list of supported syntax see the http-cuke github project site :-)

Kommentare

Gnome-Panel floating point exception · 905 Tage zuvor von Steffen

I’m running Ubuntu Oneiric (11.10) on my notebook using different window managers. Most of the time it’s Gnome in it’s classic look. In my configuration I only have one bottom panel bar (as in Windows or Xfce) that I recently moved to the right via Alt-Rightclick->Properties. Be assured to be surprised when from that moment on the gnome-panel just keeps crashing the moment you start it. Message: “…Floating point exception”. Nice. A few minutes later – after not directly finding a solution via clicking and grep’ng – google gave some answers for my orientation “left” or “right” problem. It’s obviously a known bug, that has been reported to Ubuntu, Debian and even Gnome itself months ago. Nothing happened on it since then. Noone solved it? As it often happens Ubuntu tried to move the responsibility to upstream. Gnome closed the report with the words “Ubuntu/Debian ship with a patch changing this part of the code. Please reopen if the bug occurs without that patch.” Ubuntu then reopened the bug instantly with importance “medium” and marked it as “confirmed” as it “affects multiple users”. ORLY? Meh. This simple bug renders Gnome UNUSABLE for normal users. There is no obvious solution to users that may e.g. not be able to open a console and install or fix software via command line. (ALT-F2 to open programs did not work as well) My solution was simply to open a shell, do a “sudo apt-get install dconf-tools” and modify the “orientation” key back to “bottom” for “org/gnome/gnome-panel/layout/top-levels/bottom-panel” via running “dconf-editor”. I’m pretty sure there are not only a few people affected by this bug. Should I now have to debug this or are there devs working on it? Open source. Sometimes you at least figure out that there’s a known bug. Not that it helps you very much. :-)

Kommentare

RegExps und (X)HTML gehören nicht zusammen... · 1782 Tage zuvor von Steffen

…ich höre es selbst immer wieder und weise dann oft darauf hin, dass es mit an Sicherheit grenzender Wahrscheinlichkeit die falsche Idee ist (und man ans Reißbrett zurückgehen sollte), wenn man ein (X)HTML-Markup-Problem (oder was auch immer) mit Regulären Ausdrücken angehen möchte. Reguläre Ausdrücke sind zum Parsen von Markup (selbst von Snippets oder kurzen Passagen) einfach nicht geeignet. Schon gar nicht, wenn man HTML-Nutzereingaben “sicher” machen möchte.
Als zweites Problem erweisen sich RegExps an sich…wie Jamie Zawinski es mal ausdrückte:

Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.

Ein Satz, an den ich immer zu denken versuche, wenn ich zu Regulären Ausdrücken greife, um ein Problem anzugehen. Dieser erheiternde Stackoverflow-Kommentar zur x-ten HTML-RegExp-Frage faßt es ganz treffend zusammen – und zeigt nebenbei, warum UTF-8 das einzig richtige Encoding im Web ist. ;)

Kommentare

253 Tage nicht geschrieben? · 1783 Tage zuvor von Steffen

Naja nicht ganz. Die Agavi-FAQ hat sich ab und zu ein wenig erweitert. Der neueste Eintrag beschäftigt sich mit dem Thema, wie man schnell und einfach Custom-Configs mit Agavi einbinden kann. Mehr zu eigenen Konfigurationsdateien gibt’s in der FAQ oder bei den Webpiraten. Vielleicht bringt mich die Gruppendynamik bei den Webpiraten ja dazu, mal etwas öfter schreibend aktiv zu werden. Einen kleinen Post mit SVN-Einzeilern für Zwischendurch hab ich dort auch abgelegt.

Kommentare [1]

PHP-Framework Agavi 1.0.0 and unofficial FAQ · 2036 Tage zuvor von Steffen

Explicitly not calling it yet another web framework in the title, as it’s well designed with an extensible architecture and can be used in a multitude of contexts. Your next web application is as far away as your next console application, SOAP interface or JSON webservice. Or you just reuse everything later on and combine them for the next overly hyped web 2.0 clone.

Agavi has a flexible modular foundation. New developers coming from other frameworks (and other languages like Ruby or Java) should feel at home rather easy. Configuration is XML based (instead of e.g. YAML) and makes use of all the niceties that XSLT (old config file formats get converted automatically to achieve backwards compatibilty), XPointer (XIncludes), XPath and schema validation provide you with. Features include a comprehensive and very capable routing system with so called output types to support any outputs (think HTML, JSON, XML, PDF, $whatever), different layers and renderers, fragment caching for all your (nested) slots, some i18n and l10n features as well as global and action filters for all those people that already know servlet filters and teh like.

Reusability and freedom of choice are a big plus of the framework as nearly everything may be overriden, configured or extended if it doesn’t fit the requirements exactly. Just note, that you don’t have to, as the defaults are well chosen with a strict validation system in place, that requires you to validate not only the standard inputs like request parameters, but also files, headers and cookies. What other framework would a) require you to do that by default and b) makes it that easy with a flexible validation system that comes with a load of validators (nestable and chainable) and lets you create your own custom validators in minutes? Oh and the best for last: just chose whatever third party libraries, object relational mappers (Propel, Doctrine, PDO, whatever) or clientside frameworks (jQuery, mootools etc.) you like.

As the Agavi maintainers are lagging a bit with the tutorial and documentation (they’re working on it though and the source code is well documented), I started compiling some common questions and quickstart hints to ease diving into Agavi’s features. See the small Agavi Framework Frequently Asked Questions (FAQ) document. All handcrafted HTML/CSS and on one page to help you sifting through them in-page. Hope you like it. In case you find some errors and mistakes or just have some nice new snippets or examples to provide for the FAQ, drop me a line or ask for help in the Agavi IRC channel.

Kommentare

Ältere Artikel

Letzte 10 Artikel

HTTP-CUKE
Gnome-Panel floating point exception
RegExps und (X)HTML gehören nicht zusammen...
253 Tage nicht geschrieben?
PHP-Framework Agavi 1.0.0 and unofficial FAQ
Firebug console logging function in Opera
Mixxx SkinEditor
Launch des Freizeitportals für Rügen
The story of stuff...
Wer sich keinen Rechenzentrumstruck...


Suchen

Kategorien

RSS / Atom


Interessantes

ahoi polloi. Für die (fast) tägliche Portion Karikaturen über den alltäglichen Wahnsinn.

Der Spiegelfechter. “So sagt man, wenn man Jemand mit irgend etwas dem Scheine nach Glaubliches täuscht, es sey eine Spiegelfechterei.” – Beiträge, die zum Nachdenken anregen.

Fefes Blog. Besuchs- und Lesebefehl! Tägliche Informationshäppchen für mehr Aufklärung und Spaß im Leben.

Karl Weiss. Journalismus - so der kurze und prägnante Titel des Weblogs von Karl Weiss. Artikel und Dossiers von ihm (meist veröffentlicht in der Berliner Umschau)

Opera Desktop Team. Blog mit Snapshots des aktuellen Stands der Entwicklung meines Browser-Arbeitstieres.

Püöähh!. Gonmag berichtet Geschichten von seinen Freunden. Oder so. ;)

rabenhorst. "Wenn Du das Weblog liest, wirst Du nie wieder ruhig schlafen." Blog zu Datenschutzthemen und allem was dazu gehört. Samt Gefahr-Indikator für Demokratie & Rechtsstaatlichkeit in Deutschland!

xkcd. “A webcomic of romance, sarcasm, math, and language.” – Comics mit wissenschaftlich-nerdigem Touch. hust Klassiker: Raptorenwitze!


textpattern