Adopt, adapt, improve

Reading Time: 2 minutes
credit: Wikipedia

Adopt, adapt and improve, this is famous motto of Round Table club. Round table is is a social networking and charitable organisation for men in their 20s, 30s and early 40s, founded in Norwich, in 1927.

In this post I would like to explain how I applied this motto on my testing problem that I had with calculating number of week in two standards: us and iso-8601 (note that iso-8601 standard is still not applied in US and that world is not going to end because of that fact).

In my previous blog post Iron Ruby magic in action I made a statement that week number according to US standard could not be calculated using plain Ruby. As this week I moved my testing to plain Ruby, I made a research on Internet using Google and discovered that I was wrong.

On epochconverter.com I found instructions how to do that in Ruby language:

week_number = Time.now.strftime(“%U”)

Replace Time.now with Time.local(year,month,day) for other dates.

Formats:

%U – Week number of the year, starting with the first Sunday as the first day of the first week (00..53)
%V – Week number of year according to ISO-8601 (01..53)
%W – Week number of the year, starting with the first Monday as the first day of the first week (00..53)

For US standard, we need to use %U format, because Sundays are start of week. But, I needed to tweak a little bit output of that method. Here is irb session that explains the reason:

Date 2010-01-01 is good testing example, because week number should be from previous year, 52. But Ruby returns zero week number! Here is gist that presents us week number method in plain ruby:

Note that I typed this code in irb session, I did not use famous programmer technique, copy/paste. In order to adopt, adapt and improve as tester, you should also type your test code and reduce copy/paste as much as possible.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

How I failed as RIMGEA tester

Reading Time: 2 minutes
credit: picardfacepalm.com

In this post I would like to give an example how I failed as a tester. I registered my blog to be collected on Ministry of testing feeds. Everything worked in order for months. After I published one blog post, I noticed that it was not published on feed list. My blog is also registered on AST blog feed, and that feed listed my blog post. In order to find out what is going on, I send an email to Rosie, the owner of Ministry of testing page.

She replied that post is being fed, but it is not currently displaying as the latest post is over a week old and more recent posts have replaced it.

Facepalm! I failed as an RIMGEA tester! And the actual blog post was about RIMGEA technique. I did not do RIMGEA analysis of my issue and because of that I spent Rosie’s valuable time to do analysis for me.
I instantly remembered that one week before I accidentally published (instead of saving it) that post. I reverted it to draft state again, but publish time stamp was still present.

Here is what I should have done.

R stands for replicate the issue. One of important parts of replicating it is to try to remember the exact steps that led to issue. As this is usually hard, we need to observe all relevant information related to the issue.
By observing blog post attributes, I would noticed that below post schedule attribute is post publish time stamp. Post that has never been publish do not have that time stamp. After that I would just need to compare the oldest post time stamp on Ministry of testing feed and figure out that my not shown post is to old to be shown on testing feed.
So by just using the first part of RIMGEA, replication, I would identified what is the real cause of the described issue.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

How to properly compare recordsets

Reading Time: 1 minute
credit: forums.2k.com

I am currently testing financial functions that return recordset. Here I would like to note the logical error that I made while I was writing rspec ruby test script. Because of the error, I had false positives. Test reported no errors, but function did not work properly!

My test strategy was rather simple. I have expected recordset and actual recordset returned by financial function.  They had same number of records. Then I wrote something like this:

Problem with this check is that reports false positive (no errors), for case when actual has zero records.

So, you should compare recordsets in this way:

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

How to connect with Ruby to MSSQL server

Reading Time: 1 minute
source: http://blogs.technet.com/

In this post, I explained how to test sql procedures created for Microsoft SQL server. As tSQLt is not true programming language, I found that fact as obstacle for my testing process. For example, integrating created test scripts into existing continuous integration system based on Jenkins was practically impossible.

Because of Ruby support for testing ecosystem, my goal was to access to Microsoft SQL procedures using Ruby. Using PlasticLizard gist example and IronRuby, I managed to do that.

Database and procedures that I tested were deployed on local Microsoft SQL server, Express version. Authentication mode to SQL server was windows authentication, which means that ruby test script automatically used my windows server 2012 credentials.

In that way, I managed to unlock Ruby testing ecosystem to the Microsoft SQL server world.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

When product under test becomes comparable product

Reading Time: 1 minute
credit: keybridgecommunications.com

You probably heard about HICCUPPS mnemonic in context of software testing. If not, you can do your homework by reading Michael’s original article [here]. In this post I will describe how I applied HICCUPPS in my current testing project.

In this project I have to test api. Api is based on functionality of comparable product, but it is provided using different technology stack (REST). Api that I am testing also extends api from comparable product.

In my test strategy I used results from comparable api product in order to check results of api that I am testing. I used same test data set for both api calls. Then I had to test new functionality of api under test. What should I use for comparable product that will also allow me to use same test data set?

I analyzed functionality of new features and realized that they are based on basic feature set. Which means that I was able to use original feature set as a comparable product for extended features.

In HICCUPPS mnemonic, I used one C comparable product (We expect the system to be consistent with systems that are in some way comparable.) and one P, Product (We expect each element of the system (or product) to be consistent with comparable elements in the same system).

Realizing that, I was excited as I was excited when I successfully run my first program written in C language!

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather