Category Archives: Uncategorized

Report on Testival #26 meetup

Reading Time: 1 minute

TL;DR

This post is about why we moved from Software Testing Club to Testival meetup group. Main theme of meetup was browser automation.

First of all, I would like to thank Rosie Sherry that have let us to use Software Testing Club meetup group  for Zagreb meetups for six years.

Software Testing Club changed in a good way in this six years. Zeljko and I also did not know the real purpose of meetup, and that is building of local community. Testival meetup group will definitely change that, because now we have free meetup local visibility. As proof of concept, this time we had 20+ attendants, which was much more than usual.

Our host and sponsor was Repsly in HUB385 startup coworking place. Great venue. On meetup, we had two talks.

Kresimir Linke from Replsy had talk: Test Automation of Push notifications using Ranorex.

img_2197

He also demonstrated one complex end to end scenario that involved several users, web browser and two mobile devices. All automated using Ranorex tool.

Second talk was from Ana Prpic: Introduction to WebDriver IO.

img_2200

It is another Javascript implementation of selenium webdriver. Most importantly, Ana presented whole ecosystem of Javascripts tool that enables you to but webdriverIO test in continuos integration pipe.

Meetup was visited by NSoft software testers. They are from Mostar and we discussed with the how to start software tester community in their town.

img_2198

My meetup takeaways:

  • cast device software for presenting mobile device screen
  • how to test email gui
  • html id attribute and security compliance
  • webdrivercss library for visual comparing
  • circleci can run selenium tests in headless mode

After that, Zeljko presented 5 minutes talk format, with his talk:

Why you should not attend testing conferences?

Another talk was about software testing pyramid and I talked about open session conferences (Testival as example.)

img_2201

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Search in project for method usage using only bash script

Reading Time: 1 minute

TL;DR

This post is about simple bash shell scripts that finds all files that use particular method.

In my previous post: Product moving parts as source for test strategy, I described how I use github pull request in order to discover which part of application changed in order to create regression test strategy.

Code that changed could be some helper method or .css and .jpg assets that are used in various places in code base. And those places are not part of pull request. So I need an automated way to find all places where is that helper method used.

For that purpose I use simple bash script. You need to know loop programming concept and a unix utility commands cat and grep.

Here is bash script:

#!/bin/bash
for i in `cat pull_request_items.txt`
do
  echo $i
  grep -H -r "$i" * | grep -v cache | grep -v manifest
done

And content of pull_request_items.txt

our_overview_gettingstarted.png
tour_overview_lessonhighlights.png
tour_overview_originals.png

Script reads items from txt file, and each row value is searched in project codebase using grep utility. Search is recursive in all subfolders.

Output contains files that contain searched items.

Manual part was to copy/paste from pull request to pull_request_items.txt file and do some editing in order to clean not important pull request information.

Why not use some fancy editor like sublime? Because presented utilities are installed on almost every linux machine in the world and i can use this script out of the box.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Zagreb STC #25 – The art of taking notes

Reading Time: 1 minute

TL;DR

It’s time for Zagreb STC #25 and this time we will have dedicated workshop about taking notes.

Where: Tentamen. d.o.o., Hruševečka 3, 10110 Zagreb, ground floor.

When: Tuesday, June 7th, 2016, from 18.00 – 22.00

We often hear that the most valuable craft of software tester is test automation. In order to prove them wrong, we will make a workshop on taking notes. We will watch 45 minutes of popular detective series and we will make our notes in order to find out who is the killer before show reveals it. We will stop on every 5 minutes for 2 minutes to reconcile our notes.

Material: please bring a notebook and pens in three different colours by your choice.

Reading material: How to take better notes.

After official part, we will continue our discussion over pizza and selection of craft beers.  Sponsor of workshop is Tentamen.

 

tentamen-logo_veca

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

How to prepare cucumber with tables in Ruby

Reading Time: 1 minute

TL;DR

In this post I will explain how to handle cucumber tables in the “Do not repeat yourself [source]” principle.

Data Tables are handy for passing a list of values to a step definition:

Given the following users exist:
 | name | email | twitter |
 | Aslak | aslak@cucumber.io | @aslak_hellesoy |
 | Julien | julien@cucumber.io | @jbpros |
 | Matt | matt@cucumber.io | @mattwynne |

Here is my first take how to index that data that was not DRY:

class UserListPage
 include PageObject
  data_map = {'name => 1, 'email' => 2, 'twitter' => 3}
  div(:name, :id => 'name')
  div(:email, :id => 'email')
  div(:twitter, :id => 'twitter')
end

And using that data_map in step definition:

Given /^the following users exist:$/ do |table|
data = table.raw[1]
data.shift
on UserListPage do |page|
  data.each {|row|
    expect(page.name).to eq row[page.data_map['name']]
    expect(page.email).to eq row[page.data_map['email']]
    expect(page.twitter).to eq row[page.data_map['twitter']]
  end
end

There is no need for data_map attribute, because table object already has this data. Dry version:

Given /^the following users exist:$/ do |table|
data = table.raw[1]
header = table.raw[0]
data.shift
on UserListPage do |page|
  data.each {|row|
    expect(page.name).to eq row[header.index('name')]
    expect(page.email).to eq row[header.index('email')]
    expect(page.twitter).to eq row[header.index('twitter')]
  end
end

And do not forget to remove data_map attribute from page object class.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

How to smart test minor version Ruby on Rails upgrade?

Reading Time: 1 minute

TL;DR

In this post I will explain what should be checked after Ruby on Rails minor version upgrade. Minor version upgrades are usually connected with security releases.

As I am subscribed to Ruby on Rails security Google group, when I receive information about latest security issue, I need to act very fast. Update must be pushed to production almost immediately, so there is no time for extensive regression testing.

How can we do quick test and be sure that everything still works as before upgrade?

Heuristic 1. Rails upgrade was extensively regression tested.

That heuristic proved itself to be always true.

Heuristic 2. Inspect Gemfile.lock to be sure that only Rails gem is upgraded.

How do we actually upgrade Ruby on Rails?

Edit gemfile:gem 'rails', '4.2.5.2'
bundle update rails

Investigate Gemfile.lock changes using git diff to see what else was updated beside Rails. If some other gem (not part of Rails) was also updated, check, using Google search, possible issues for that gem that are connected with Rails upgrade.

Heuristic 3. Search Google for Ruby on rails upgrade to n.n.n.n version issues (bugs, problems)

Conclusion.

For minor Ruby on Rails upgrades, using those three heuristics, you can do regression test in smart and quick way.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

How to set regression test scope for HTTPS only access?

Reading Time: 2 minutes

TL;DR

In this post I will provide an example how to set the scope of system regression test in order to achieve coverage of features that need to be tested.

Context

The trigger for regression system test was HTTPS only access to client Ruby on Rails application. Prior to that feature, it was possible to use both HTTP and HTTPS protocols. Developers use TDD concept, and prior to my test, all developer tests passed on CircleCI environment.

There was also set of selenium-webdriver tests, but those tests do not cover all application features.

My strategy was to include them in the regression test. All test passed. But I had not finished regression test yet.

I did not know all application features at that time. So I started risk analysis, which features could fail if HTTPS only protocol was introduced to web application. Let’s call OWASP for help.

There is transport layer cheat sheet. Reading through the rules, I pinpointed rules that were potential risk for application functionality:

  • Do Not Mix TLS and Non-TLS Content – because browser (modern browsers) will AUTOMATICALLY prohibit access to non HTTPS urls.
  • Use a Certificate That Supports Required Domain Names – if this is not the case for your application, browser will present to user a security error

First risk could be mitigated by using the application in Chrome and observing javascript console for mixed content errors. Could I automate that task? First thought would be: write selenium-webdriver test suite that covers all the features! But I do not have that time. Was there a simpler way?

My heuristic was to search all the code base for keywords HTTP and IFRAME.

grep -H -r ‘iframe’ * | grep http:// | grep -v elements.txt | grep -v ‘README.md’ | less

That piped command searched through the all code base in terminal and returned code that uses mixing content.

And we discovered additional issue, it was not possible to immediately set all HTTP urls to HTTPS protocol. Those urls were referencing external applications, like blog. For example, in order to set this blog to HTTPS protocol, I need to buy another plan that costs more money. And I need to have a certificate for tentamen.eu domain. Which brings us to second risk.

Use a certificate that supports required domain names. And this is environment dependant test. This risk was mitigated on my testing environment, but I should also check it on production environment (production is hosted on different domain).

Doing risk analysis is fun. You will learn something new and the most importantly, you will properly set scope for your regression test.

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Testival 2015, a software testing event

Reading Time: 1 minute

Registrations for Testival 2015 are open! Formerly know as ViaQa, this year this software testing event will be hosted in Microsoft Innovation Center in Split, Croatia. This event is combination of unconference format and speakers. We have two confirmed speakers: Maaret Pyhäjärvi and dr.sc. Dario Hrupec that will have opening and closing notes. In between, sessions will be chosen in unconference manner, by you, participants of the conference.

Event is scheduled for September 18. and 19. 2015.

If you still have doubts to attend or not, just a kindly reminder that Split is one of filming locations of popular HBO show, Game of Thrones!

See you in beautiful Split!

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather