Posted by Jon on May 14, 2010 in Development, General | 0 comments
Well besides today being a Friday (TGIF!!), JetBrains have announced the pricing for the upcoming WebStorm and PhpStorm. I’ve personally been waiting for this as I’m willing to actually pay for this IDE because it’s just that damn good and it’s only in Early Access right now.
read more
Posted by Jon on May 7, 2010 in Development, General | 0 comments
What is fakemail?
From the fakemail homepage:
fakemail is a fake mail server that captures emails as files for acceptance testing. This avoids the excessive configuration of setting up a real mail server and trying to extract mail queue content.
If you have had to test applications that send e-mails, for example as part of a web sign up process, you will know what an involved and tricky exercise that can be. Usually you have to sign up with a special e-mail address, have the mail go to the mail server and then read it back into the test with a POP/IMAP client. There are several downsides to this approach; you need to install extra software to interact with the POP server, you suffer from spurious failures due to reliance on external infrastructure, and it is very very slow.
Fakemail works by intercepting the mail before it leaves the machine by replacing your Mail Transfer Agent (MTA). It’s a simple script run from the command line that you can launch from within your test framework.
Why Should I Use fakemail?
The real question is why aren’t you using fakemail. I didn’t know of fakemail before I started at SugarCRM, but now I’m glad that I do. At Sugar we use fakemail on all of our test and development instances. By using fakemail it provides a way to test all of our scripts that send emails but not actually send the emails out. What it does in turn is send the email (headers and all) to a folder specified in the config of the fakemail setup. We happend to send ours to /tmp/<instance name>/ since we have multiple instances running on the same machine.
How do I Setup fakemail
fakemail comes in two flavors: Python and Perl. They both work the same but what this allows you to do is pick your poison on which language you are more comfortable with.
Once you install fakemail to start it up just issue the following command (PERL version)
fakemail --host=localhost --port=10025 --path=/tmp
Now it’s running. To test it out just run telnet into localhost port 10025
telnet localhost 10025
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 uno.home SMTP Net::Server::Mail (Perl) Service ready
To test it use the following commands
HELO mailer
250 Requested mail action okay, completed
MAIL From: me@here
250 sender me@here OK
RCPT To: you@there
250 recipient you@there OK
DATA
354 Start mail input; end with .
A-header: Sample header
Hello
.
250 message queued
QUIT
221 uno.home Service closing transmission channel
After this sequence we can stop the fakemail terminal with a Control-C to interrupt the process. Because we set the fakemail path to the local directory, we should see a file labelled “you@there.1″. Here is the contents of that file…
A-header: Sample header
Hello
You should now be ready to use fakemail to make your testing easier.
Don’t forget to check the fakemail page for more information.
read more
Posted by Jon on May 5, 2010 in General | 0 comments
Just a quick one today. I’ve been doing more and more Java development on my personal projects and I’ve come to live JetBrains Intellij Community Edition. It’s by fare the best Java IDE I’ve found.
Today I was presented with an Update is available dialog so I clicked ‘Download Patch and Exit Program’ Button. So I clicked it and watched it download something and then kill the IDE. I was a bit miffed when I started Intellij back up and it was still version 9.0.1 instead of 9.0.2. I googled around a bit and found out that the way to apply the patch on linux is the following command:
java -cp /tmp/jetbrains.patch.jar.Idea com.intellij.updater.Runner install /path/to/intellij/install/
Simple and to the point!
read more
Posted by Jon on Mar 14, 2010 in General | 0 comments
A little annoyance of mine with PhpStorm is that currently there is no option to turn on auto complete for full open php tag (<?php) when you type in the short open tag (<?).
read more
Posted by Jon on Mar 12, 2010 in Development, General | 3 comments
I’ve found myself asking that question over the past month or so. For as long as I could remember I used Zend Studio, but recently I switch to PHPStorm from JetBrains and I’m not looking back.
read more