August 2010
6 posts
GSoC is over!
In the next days I’ll reorganize existing tests to make it easier to merge them in Mojo’s master. My (broken) Mojo fork remains online. There you can find my test verbosifications and tests Many many thanks to my great mentor marcus! :)
Aug 16th
1 note
Fancy but untested oneliners
You know the cool new oneliner module ojo? It’s cool, especially with Mojo::DOM: $ perl -Mojo -le 'print g("heise.de")->dom->at("h1 a")->text' Oracle kehrt OpenSolaris den Rücken It’s also a server, if you want: $ perl -Mojo -e 'a("/" => {text => "AWESOME!"})->start' daemon Unfortunately, ojo isn’t tested very well, so I wrote tests for its server and...
Aug 16th
The client is always right ... NOT!
I spend some time with the client. Although I wrote some tests for it, his test suite needs more love in the future. But don’t worry, I’m still there. ;) In some situations it could happen that a server creates an infinite redirect loop. User agents are supposed to detect them. Firefox for example displays a message after about 30 redirects, the curl of my mentor allows 50 redirects...
Aug 16th
Cookies, please
As my mentor suggested, I looked around in Mojo’s cookies code. I found out that the cookie parsing is pretty good tested and seems stable, well done. The cookie stringification, however, is not, so no one noticed that the to_string method doesn’t quote. The following code $cookie = Mojo::Cookie::Response->new; $cookie->name('foo'); $cookie->value('"bar"; Path=/baz'); ...
Aug 15th
Fork
Maybe you remember my test idea for bad requests. The problem was the server script, which sat on my virtual server. If this machine shuts down, the test won’t work, which is bad. With a fork, this problem can be solved, in one process lives the server, the IO::Socket client in the other and they can communicate as if the server were elsewhere: my $port = 42666; my $pid = fork; die...
Aug 15th
Hard times... :(
Dear people, I somehow lost the right way. In the second (the creative) part, I had some serious trouble to get the right start. I wrote some tests, but they were either trivial or there were no good way to handle the situation right. One of my first tests: my $c = Mojo::Client->singleton->app(app); # GET a 404 my $tx = $c->get('/doesnotexist'); ok(!$tx->success, ...
Aug 14th
July 2010
1 post
I passed the midterm evaluation
I submitted my verbosifications of the Mojolicious test suite on time, so yesterday I got the message that I passed the midtern evaluation. :) You can see all my verbosifications on github. Sebastion won’t use everything but at first I need to fulfil my proposal. Now comes the second part, which is much more flexible and needs creativity. I also need more communication with Sebastion to...
Jul 17th
June 2010
3 posts
Second week: first steps and more explorations
Hi there, the second week of my gsoc project is over. I started with verbosifying some Mojo tests (I think the Client test messages are much more readable now)… You’ll find verbose Mojo tests in the verbose_tests branch of my mojo fork. Damn, that client class is very flexible and awesome! Last night, Sebastian implemented a CSS3 selector type DOM parser, look at the hack of the...
Jun 7th
First week: explorations
Last week I spent my time reading Mojolicious code. The perl debugger definitely helps understanding how everything works and gives you hours/days of joy: $ mojolicious generate lite_app mojolicious-lite.pl $ perl -d mojolicious-lite.pl get '/foo' While my knowledge of Mojolicious grows, it’s a bit hard for me to get a good start for writing better tests. It’s a bit fettering to...
Jun 1st
O HAI
The Google Summer of Code (GSoC) has started! Yay! In the last minute I submitted my proposal which was accepted by the majority in The Perl Foundation. Thank you very much. Here’s the abstract: Bulletproofing the Mojolicious unit and integration test suite Mojolicious test suite is at the moment a nice mixture of unit and integration tests and does what it is expected to do. But...
Jun 1st