Tweeting with Firefox is different than tweeting with Chrome

Reading Time: 1 minute


In this post I will explain how simple change in testing environment influenced my testing of simple feature.

Feature is rather simple, tweet something interesting from the application. As this feature is tested, I was creating automated script for it. This feature is important for my client, so I decided that it should be part of regression testing suite.

I developed script for Chrome, and I also decided to check it using Firefox. Remember that in RIMGEA we learned that G stands for Generalize. We need to test our feature by changing the environment, in this case browser itself.

And in Firefox script failed! Why? Because Firefox tweet feature has one extra step in domain of twitter application.




It is clear that Firefox requires one extra button click. Since prior to that click, user clicks on “Log in and tweet” button, this is not consistent with that button. User expects that with one click he does two actions, log in to twitter and tweet that item.




With this post I amplified on real case how important is to vary your testing environment because in that way you could find interesting issues within the application.


Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Fix for cookies are not enabled

Reading Time: 1 minute


In this post I will explain my heuristic how I solved issue that was indicated with misleading error message.

Error message was very simple: in order to be able to log in to our site, cookies must be enabled in your browser.

Cookies are pieces of information that also contain session information for your website. Using them, you do not need to enter username/password for every page of the site.

The problem was that cookies were enabled in my browser. Error message itself was wrong. Developer put this message because he only knew that cookies could be filtered in browser. Better message would be:

“We did not received cookie with session for this site. Something filters your cookie.”

My heuristic was, who can also filter cookies? And I remembered that my firewall has that option. I unchecked that option, and that was it.

The issue here is that I kept try to login, after I checked misleading error message instructions. In order to save your precious time, think about your problem. You will definitely learn something new.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Blast from the past: Taming the Croatian eHealth Beast

Reading Time: 2 minutes



We would like to describe and explain how session GTAC 2008: Taming the Beast – How to Test an AJAX Application had direct impact on refactoring our testing strategy for E-Health Croatia (eHealthCRO).


Our system has been implemented using J2EE platform. It the first instance of test plan, test team was responsible for designing and implementing end-to-end test scripts for every test case from test plan. Soon, we realized that regression test was taking too long, and we needed faster development-test-deployment cycle. Using tips and knowledge from the mentioned session, we deployed suggested testing strategy on our system.


In the presentation we will explain challenges that we had met during this process, along with concrete technical solutions in order to implement proposed testing techniques.

As an introduction we will give architecture overview of eHealthCRO system. System consists of several applications packaged as J2EE 1.4 enterprise application.

User has to compose appropriate Health Level 7 v3 standard xml message in order to complete end-to-end system flow for appropriate eHealthCRO service. We will give an example of sending ePrescription in order to explain end-to-end system flow and interfaces through which subsystem communicate with each other.


User creates HL7 xml message with prescription data as payload. First subsystem is Gate. Gate is responsible for:


  • HL7 xml message syntax checking according to appropriate schema

    xml digital signature checking

  • user authentication and authorization

  • forwarding sync request to central Presc application (using ejb 2.1 and IIOP as protocol)

    forwarding response back to user.

  • Gate application is running on its own Sun Java System Application Server Enterprise Edition 8.2 application server instance.

Business application:

  • implements prescription business logic using Spring beans

  • using Hibernate ORM communicates with Informix 11 relational database.

  • it runs on its own instance of Sun Java System Application Server Enterprise Edition 8.2 application server instance


Most of test cases from test plan where about testing prescription business logic. In order to speed up test execution, we developed ejb 2.1 client that calls business logic methods same as one module from Gate application. Developing that client was very easy and fast because we used jython 2.5 programming language. Client code was already developed in Java by development team, so testers only created jython wrapper methods around Java code.
Doing this, our test suite was 20 times faster than before. We received information about implemented business logic much faster than using end-to-end system testing.


Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

How to automate remember me feature using selenium webdriver and cucumber

Reading Time: 2 minutes



In this post I will explain problems I encountered and how I resolved them while I was designing automated test for remember me feature.


Context of this post is automation of end to end feature that are visible to user via the browser. You will see remember me checkbox on your login page, but that is the point where visibility of this feature ends.


How remember me feature actually works?

If you do not check remember me, then when you close browser after you have finished using web application, next time you come back to the application, you will need to login in again.


If you check remember me, then when you close browser and come back again to your application, you will be automatically logged in.

Magic behind this feature are cookies. Cookie contains session for your application and information how long that session in cookie is valid. Server side creates the cookie, but browser must act based on the information in that cookie.


So when you test remember me feature, you actually test browser and web application features.


First issue in test design


In order to have faster execution of browser automation tests, I do not close browser between scenarios (Watirmelon first page object anti pattern). But in order to test remember me feature, you need to close the browser. Here is the code that should be put in cucumber env.rb file that resolves this issue:


Second issue is scenario run order dependency


But that solution introduces another anti pattern, now scenario run from remember me feature file must be always run in same order:



That means you can not use following cucumber run option:


cucumber –order random :5738 remember_me.feature

Here is step that loads cookies:


Third issue selenium webdriver cookie domains

In my first implementation, in env.rb file, I just saved all browser cookies to file. But when I loaded those cookies, i got following exception:



Note: By observing that exception I learned that Firefox webdriver is actually Firefox extension written in javascript. That extension is automatically installed in Firefox before test run.

And here is the line of code that produces exception:



Observe comment in line 8 🙂 For me it implies that developer did not know how to properly implement cookie domain check. But as it is open source project, we will forgive him.


The issue here was that Google Analytics cookies had subdomain:

as cookie domain value. As application domain was:

Google Analytics cookie domain was rejected in firefox webdriver. So before saving cookie values in file, I deleted Google Analytics cookies.




I am moving this blog from Blogger. While I was publishing this post, I discovered that WordPress needs plugin in order to embed gists to posts. Blogger had that feature out of the post.


Finding proper WordPress heuristic: install one that has more stars.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

How to use Grinder load testing framework as a developer

Reading Time: 2 minutes


Here I will try to get your feet wet with grinder load testing framework. The fact: using grinder you will produce better code. Period.


My first contact with grinder was in 2005 with grinder 3.2. Somewhere at that time I started to learn python language which was important because grinder scripts are written in Jython, a Java implementation of Python language. In order to know what is grinder intended for,you have a lot of information on project home page.

It is a load testing framework. So, my first intention was to create a heavy load on J2EE application that I was testing. As I was getting along (in a system end-to-end tester role) with Jython and grinder environment, an idea about grinder primary usage for developers pop upped to me.


As my college and me were discussing a module implementation, important question pop upped: “How this module is going to behave when deployed on J2EE application server?” We knew that J2EE application server was multithreading environment. We need to deploy application on application server, and create application that will simulate user load. My college said: “But I need to know that information tomorrow, not for two months! Also, I would like to have ability to run those multi user tests on my laptop, as close as possible to Junit framework environment!


At that time I was developing Jython testing script using grinder framework for creating load (concurrent) test for our J2EE system, so I was a developer to. And I knew that Grinder gives a developer infrastructure to put into multi user environment Java code that he/she is developing! By users I mean threads or processes.

For example, my testing script needed to write xml message request a to a file.

Using grinder infrastructure,my testing script generated multi user requests for writing to that file. I was in multi user environment even before I got a chance to get to the server side code. And because I didn’t use grinder api for accessing file streams (yes, one of the reason that grinder was created was to provide that kind of infrastructure writeToFile method example) I got Java exception.

If you are developing some system module and you write unit test for classes of that module, every time you are ruining your test in single user environment!

In production (e.g. J2EE application server) your module will be definitely in multi user environment. Using grinder, you are able to create multi user environment for your module on your local development machine. You system tester would be very grateful for that!


In following posts I will try to give how-tos for grinder setting up. Also I will give an example on one simple module how can grinder help you to reveal multi user bugs and problems.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

What have I learned when search failed

Reading Time: 2 minutes


In this post I will describe what I learned when search application feature failed.

Currently I have following testing mission: write executable specification in cucumber for all features of my client’s web application.

By executable specification I mean following ruby gems:

  • cucumber
  • page objects
  • watir-webdriver
  • selenium webdriver

While I was running cucumber features for application search feature, one of automated test failed. Replicating the issue by “hand”, I realized that problem is with application itself, not in my automated check code.

Search just stopped working on integration and production environments. There was no user interface error displayed, but http 500 that I discovered using network tab in Chrome developer tools. I started to investigate how search feature was implemented. I used codebase stored in github repository and realized that application connects to elasticsearch (key value pairs) in order to return requested data.

Application uses Heroku infrastructure, so I first observed heroku application log:

`heroku logs -t -a app_name`

With that I also confirmed that search error is related to elasticsearch availability.
Application infrastructure also uses Bugsnag tool. It is very useful, because every application exception is logged in web application with all important variables values at the time of exception. Elasticsearch was provided as Heroku plugin. There was elasticsearch provider ticket reporter, with very useful feature. I started entering ticket summary by copy/pasting exception text. And ticket tool found out that that type of issues was reported in the past. I also got information that at that time, elasticsearch infrastructure was not available because of provider maintenance work.

In order to conclude. Application that I am testing does not have extensive architecture document, but in agile environment this is not needed. Because application uses cloud architecture provider, Heroku. With few clicks in Heroku admin interface, I got all the needed information about application search infrastructure. By testing search feature that failed, I learned about application architecture infrastructure. I identified important application risk, that elasticsearch provider will do maintenance work that will last for some time and maintenance work will not be announced!

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather