01.30.07
Posted in E-mail at 5:58 pm by Željko Filipin
Lately I have been testing e-mail functionality of web application. This is the fourth post about that experience. Last week I wrote about tools I use for e-mail testing.
I suggest that you start with little steps, and I mean really little steps.
I assume that you have a test suite that tests web interface of your application. Some tests cause e-mails to be sent. But, until now, you have ignored that e-mails.
First, check if your application sends correct number of mails (see, really little steps). For example, if you are testing forum application, after start a discussion test is performed, check if every member of forum gets e-mail (depending on each member’s settings).
Then, after you have checked number of e-mails after all your tests, start checking if e-mail headers (from, to, subject) are correct for every mail that is sent. After that is done, start checking body, and then attachments.
I think it is better to test only some properties of e-mail but for larger number of e-mails, than testing all properties of e-mail, but for small number of e-mails.
Of course, this is only my advice based on my recent experience. Adjust your tests to your context.
Permalink
01.29.07
Posted in Watir at 5:56 pm by Željko Filipin
Paul Rogers and Prema Arya just started a very interesting thread at wtr-general.
If you have text field
you can get value of custom_attribute
and you can set value of that text field using custom_attribute
Permalink
01.25.07
Posted in Podcasts at 5:41 pm by Željko Filipin
When I posted list of podcasts that I listen to, I forgot stickyminds.com podcasts. I forgot to mention it because it does not have separate feed, so it was not labeled as podcast. You will have to subscribe to one of stickyminds.com’s feeds.
Permalink
01.22.07
Posted in E-mail at 7:09 pm by Željko Filipin
Lately I have been testing e-mail functionality of one application. In the beginning I though that I would write two or three posts about that experience. Now I think there will be more, but not much more. I prefer more shorter articles that two or three longer ones. I am all about little steps, as you will shortly see.
This is the third article. Last week I wrote a little introduction and how to install SMTP server.
As I wrote the last year, when testing e-mail, I am using Ruby and this Ruby libraries:
- receive e-mail - Net::POP3
- send e-mail - Net::SMTP
- create (before sending) and parse e-mail (after receiving) - TMail
Permalink
01.18.07
Posted in E-mail at 5:47 pm by Željko Filipin
Lately I have been testing e-mail functionality of one application. I will post my experience in two or three articles. This is the second one. Yesterday I blogged about how to install SMTP server.
Testing is lots of fun. You do something, see what your application does and decide if it is correct behaviour.
Testing e-mail functionality of web applications is lots of fun, too. Also, it can be very time consuming.
Say, for example, you start a discussion at a forum. After discussion is started, forum members receive e-mail saying that new message is started. You could get the same e-mail, or just a confirmation e-mail saying that your contribution was successful. Some members maybe do not receive e-mails immediately after discussion is added, but receive a digest. Every 5, 10, 20 messages; daily, weekly, monthly digest. Some decided that they do not want any e-mail notification.
Another functionality of that forum could be that it receives e-mail. When member of forum sends an e-mail to forums e-mail address, discussion is started, it is visible at web interface, and members of forum receive e-mail notification, regarding of their preferences.
You can test all that. The boring part is waiting… and waiting… more waiting… and some more waiting. You get the point.
If you have Gmail account, you can use it for testing. If you have Gmail address username@gmail.com, just add +something between username and @gmail.com. Like this username+something@gmail.com. Anything you sent to that address will end up in your inbox. That way you can use one account for multiple users.
I would recommend that just for quick test. In my experience, sent e-mail will be delivered somewhere between a few seconds and a few hours. Rarely, even a few days. And the waiting part was really a problem to me.
There is a quicker way:
- Sending e-mail: install SMTP Server at your machine.
- Receiving e-mail (manual): set up application in a way that all mail is delivered to a folder at the same server were web application is, so you can quickly check it (no delays).
- Receiving e-mail (automated): set up POP3 server that will get all mail from that folder.
I do not know how to do that set up, I was lucky enough to have a developer who did it for me.
I will provide more details on automated testing of e-mail functionality in the next post.
Permalink
01.17.07
Posted in E-mail at 6:58 pm by Željko Filipin
I will be writing about testing e-mail functionality of web applications in the next post or two. If you are serious about testing e-mail functionality, the first step is to install SMTP server at your machine. This is tested on Windows XP Professional, service pack 2. You will need Windows operating system CD.
Make sure you are logged in as administrator, or start Add or Remove Programs as administrator:
- go to Control Panel
- highlight Add or Remove Programs
- hold Shift key at keyboard
- press right mouse key
- select Run as…
- select administrator account
- enter password if necessary
- press button OK
At Add or Remove Programs:
- click Add/Remove Windows Components
- select Internet Information Services (IIS)
- click Details…
- check SMTP service check box
- Common Files, Internet Information Services Snap-in and World Wide Web Service will automatically select
- do not deselect anything
- finish installation
- you will be prompted to insert Windows operating system CD
I am using Ruby’s Net::SMTP library for sending e-mail. I tried to send an e-mail and got this exception:
Exception: 550 5.7.1 Unable to relay for community@site
You need to change a setting or two:
- go to Internet Information Services (in Administrative Tools)
- right click Default SMTP Virtual Server
- click Properties
- select Access tab (second from the left)
- click button Relay… (bottom right)
- select Only the list below radio button
- click button Add…
- add 127.0.0.1
Many thanks to my developer who helped me to install and adjust my SMTP server.
Permalink
01.16.07
Posted in Podcasts at 4:26 pm by Željko Filipin
Yesterday I wrote:
Did you know that if you have a file with wmv extension you can listen to it on your mp3 player?
I remembered that I have heard that in a podcast, but I could not find that podcast in the time of writing. I found it today. It is Venkat Subramaniam and Andrew Hunt Talk Agile from a podcast that I do not listen regulary, .NET Rocks!.
From that episode transcript:
All someone needs to do is rename the WMV File to WMA, and it becomes audio only, and then there’re so many tools to convert that to MP3 if your MP3 player doesn’t support WMA.
Permalink
01.15.07
Posted in Podcasts at 6:02 pm by Željko Filipin
Did you know that if you have a file with wmv extension you can listen to it on your mp3 player? All you have to do is change it’s extension to wma.
I have heard this on a podcast, but I do not have the link to it right now. I will try to find and post it soon.
You can go to http://testingeducation.org/k04/video/ and download a lot of good videos that will teach you how to test, and than listen to them at your mp3 player.
Enjoy!
Permalink
01.12.07
Posted in Self Education at 11:37 am by Željko Filipin
A few days ago I listed mailing lists that I read. I have obviously written it in a hurry, because I forgot a few.
Here they are (alphabetically):
- Arachno Ruby forums
- Watir lists
- wtr-core
People who are supporting Watir, including contributors, evangelists, anyone who answers questions from newbies and people who’ve given us useful advice.
- wtr-development
Discussion of Watir versions under development
- wtr-general, also available at OpenQA Forums
The wtr-general mailing focusses on using Watir for testing web applications, but actually questions and discussions about any aspect of using Ruby for testing are welcome. We’ll even tolerate the occassional bit of Perl. Postings for jobs using Watir are also welcome.
Permalink
01.11.07
Posted in Watir at 3:47 pm by Željko Filipin
Watir 1.5.1.1136 was released yesterday, but FileField#set does not work. They have fixed it, but it is not released yet. But still, you can use all those shiny new Watir methods.
How?!
Roll your own Watir using TortoiseSVN. Just make sure that you are logged in as administrator during installation. I am usually logged in as limited user, and to make it short, it does not work that way. Please, log in as administrator. If you can not, then I can not help you.
From Installing a Gem from the latest development source (Watir FAQ page).
Once TortoiseSVN is installed, checkout the source:
- Create a folder to checkout into, this will be the watir_install_dir
- Right click on watir_install_dir, from the context menu select SVN Checkout…
- In the dialog box enter http://svn.openqa.org/svn/watir/trunk/watir for the url
- Hit Ok, Watir source should now download into the watir_install_dir
Now that you have your own local copy of the source, you can create your own gem and install it into your local ruby gems directory. Open a command line, navigate to watir_install_dir and type the following:
gem build watir.gemspec
This will create a file that is named something like watir.1.5.1.1032.gem. The actual version number will be based on the latest revision number of the source in subversion.
You can install your gem simply by typing this in the same directory:
gem install watir
Some things are still broken. Like IE#minimize.
Why?! And I was so close…
Do not despair, you can fix that too (are you lucky or what?).
AutoIt is not registered. They say it should be, but it does not work on my machine.
Open a command line, go to folder where AutoItX3.dll is located. If you installed Ruby to C:\ruby\ and your gem name is watir-1.5.1.1141 it should be C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1141\watir\.
Type this.
regsvr32 AutoItX3.dll
Pop up will appear with message that registration was successful. If message says that registration was not successful, you are not logged in as administrator. Log out (or switch user) and log in as administrator. As I stated earlier, if you can not, then I can not help you.
Th-th-th-that’s all folks!
P.S.
You can unregister AutoIt with this if, for example, you have trouble with uninstalling Watir.
regsvr32 /u AutoItX3.dll
Permalink
« Previous entries