Announcement for Zagreb STC Meetup #7

Reading Time: 1 minute

We are proudly announcing 7th Zagreb Software Testing Club meetup. Meet up will be held on 29th November, Thursday, from 17.30 in Palagruza conference room at Ericsson Nikola Tesla, Krapinska 45. We are welcoming all software testers and developers that are interested in software testing.
Ericsson Nikola Tesla is venue sponsor and is our pizza and beverage sponsor.
Here is agenda for this meetup:

-. Newcomers please introduce yourself. 
-. What did you test last week? 
-. Game of Go!
-. Lighting talk by Manuel: Tester vs Test Manager 
-. Lighting talk: ISTQB certification experience

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Choose your testing tools using your brain

Reading Time: 2 minutes

For a tester, everything starts from its primary testing tool, its brain.
In my previous post I wrote about plsql-spec Ruby gem, my choice of weapon for testing Oracle technology. I started to test simple procedure that converts oracle DATE to character representation. For testing ideas I used this great post from test eye blog.
For a tester, time is very important source of testing ideas. Time was last added component to SFDPOT (mnemonic for San Francisco Depot) test strategy heuristic by James Bach.
I installed plsql-spec ruby gem on JRuby. JRuby uses Java as the underling virtual machine, while Ruby uses its own implementation written in C language. I used JRuby because my intention was to make testing infrastructure portable as much as possible. In order to connect to Oracle database, in JRuby you only need oracle jdbc driver, but pure Ruby requires Oracle Net Manager (which means for tester one more component to maintain) and oci8 gem.
My first testing session was to find the boundary of time supported in Oracle database.
Oracle Time range is [January 1, 4712 BC:December 31, 9999 AD].
Ruby Time class also supports BC years. For lower bound of supported Oracle DATE, just write:

plsql.bsn_eliste_pkg.to_tmstmp_tz( Time.local -4712, 1, 1 ,0, 0, 0 ).should eql “47120101000000 PNE”

where plsql procedure takes oracle DATE as input parameter. Python and Java lovers, parenthesis in Ruby are optional!
That code triggered following Java exception in JRuby:

Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
     # java.sql.Timestamp.valueOf(

I am not able to send BC dates to plsql procedure! When I switched back to pure Ruby, I got following test fail:

   Failure/Error: plsql.bsn_eliste_pkg.to_tmstmp_tz( Time.local -4712, 1, 1 ,0, 0, 0 ).should eql “47120101000000 PNE”

       expected: “47120101000000 PNE”
            got: “47120101000000”

In this case I revealed plsql procedure bug!
Lesson learned
Your primary tool is your brain. Using your brain, you learn about testing by reading smart blogs (like test eye). You want to implement Time test ideas for Oracle procedures. You found out about plsql-spec ruby gem. There is an option, JRuby or Ruby. If one option is blocking you in implementing your testing ideas (like JRuby in this case) try another option. Choose your testing tools using your brain!

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

PL/SQL unit testing with Jruby

Reading Time: 1 minute

In order to find out how to do unit testing of PL/SQL code, I found this great blog post by Raimonds Simanovskis. He created two Ruby gems, ruby-plsql and ruby-plsql-spec. Following instructions on github for plsql-spec gem, I installed gems, but for jruby platform.
There are other alternatives for doing unit testing of pl/sql code (Python is one of those and I have been using Python for years), but I decided to try Jruby implementation for three reasons:

  • Ruby language has better readability than Python (there, I said it). Its idioms are much comprehensible than Python language.
  • Rspec gem is better than Python unittest module.
  • Java jvm is better than Ruby virtual machine implementation
After creating plsql-spec project by initiating command

>plsql-spec init

I tried following example:

require “spec_helper”
describe “test installation” do
  it “should get SYSDATE” do
    plsql.sysdate.should_not == NULL

In database.yml I used connection to Oracle database in my company.
I got following error:
Failing tests! 

and nothing more!
In order to investigate what is the problem, I directly run spec_helper.rb using jruby. After that invocation I received java exception:
java.sql.SQLDataException:  ORA-01882: timezone region not found
The solution was to enter following lines in (that ruby script is generated by plsql-spec init)
ENV[‘TZ’] = ‘Europe/Zagreb’
after all require statements.
You should put your own time zone.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Investigation on ssh connection timeout

Reading Time: 2 minutes


This month I was assigned to a new project. I have to do load test for one part of the system that handles web services. I wrote little client framework for sending hl7v2 web service messages in jython, and I am using grinder as a load testing framework. Run time is java virtual machine, version 7.
We have testing environment consisting of VMware instances, and I am using Red Hat 64 bit VMWare instance for producing hl7v2 traffic using grinder scripts.


As some test runs last for hours, I have a requirement of ssh idle connection lasting for 24 hours. When I left putty session in idle state, I got putty error with text
“Server unexpectedly closed network connection”.

Investigation in tester mode

I first asked colleague that installed VMware instance for help. He replied that he has no time right know for the investigation.
As I am using putty as a ssh client, I browsed putty connection properties. I know about keep alive TCP option, so I set Enable TCP keep alive options, along with Seconds between keep alive set to 5 seconds.
I started another ssh session, but after some time amount I got the same error.
I asked another colleague for advice, and he pointed me at the ssh server configuration in file /etc/ssh/sshd_config. I set following properties
TCPKeepAlive yes
ClientAliveInterval 5 (same as in putty)
And then I restarted sshd process (ssh server).
Same error again.
I examined putty event log. There were following messages that caught my attention

2012-09-28 16:17:51 Initiating key re-exchange (timeout)

2012-09-28 16:17:51 Server unexpectedly closed network connection

Time stamps were exactly one hour after the start of a session. I Googled first message, I was pointed to following putty property
Max minutes before rekey
I set that value from 60 to 1, and after one minute, I replicated my issue message.
I set max minutes before rekey to 0. I started new putty session in order to verify is this solution of my problem. Session was still up in the morning. And that satisfy my requirement for testing environment.


With this post I wanted to point out how tester should behave when encounters an issue. Your responsibility as a tester is to find proper solution, not a ‘dirty hack’. Ask for help, your are not alone. And your colleagues job description is to help you. Also, I would like to point out that this is solution that works in my context. For example, if there where a lot of traffic data through putty session, this solution would not work because I did not set putty parameter ‘Max data before rekey’ to zero value (unlimited).

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather