Search This Blog

Tuesday, December 8, 2015

Automated acceptance tests in Calabash

The Mobilengers team at StxNext has recently moved to Calabash as our automated acceptance testing framework. All tests are written in Gherkin - simple, descriptive language that Cucumber can understand. Gherkin gives the ability to describe the desired behaviour in plain text preserving the possibility to run such a test on real devices. It serves two purposes - as a documentation tool and as automated tests framework. It has been translated to over 60 spoken languages (with leading English) so that your team can use the keywords in their own language.

Automated tests follow two simple conventions - that source file should be saved as .feature and that one source file should only contain description of a single feature.

Calabash is the mobile implementation of Cucumber. It enables native apps testing and is cross-platform - Android/iOS. It’s also open-source with all the code available freely on GitHub.

With Calabash we’re able to implement simple gestures (like - swipe down, button-clicks, go back etc.), make assertions concerning displayed content as well as take screenshots whenever something goes wrong in the app.

Running tests in the cloud on the real devices gives us the possibility to cover more devices without buying every phone available on the market. We use Amazon AWS Device Farm which has the possibility to run Calabash tests and covers most popular device models. It also gives detailed tests results, takes screenshots as well as pinpoints references to lines of source code where specific errors have originated from. AWS has the option to test apps in different device locales, GPS locations and specific “other apps” dependencies.

Simple tutorial on how to install Calabash (OsX/Ubuntu) and run basic tests can be downloaded here.

Reference: (ios)


Sunday, May 10, 2015

PEKA - wirtualny monitor

Niedawno rozpoczęły się prace nad aplikacją umożliwiającą sprawdzanie dokładnego czasu przyjazdu tramwajów i autobusów.
Nareszcie możliwe jest wygodne korzystanie z wirtualnego monitora systemu PEKA na urządzeniach mobilnych.

Jeżeli mieszkasz w Poznaniu - wybierz ulicę, a następnie swój przystanek - aby zobaczyć dane, które pozwolą Ci DOKŁADNIE określić w którym momencie przyjedzie Twój tramwaj/autobus.


- szukaj połączeń autobusowych/tramwajowych według ulicy/nazwy przystanku/nr linii

- dodawaj poszczególne przystanki do ulubionych, aby mieć do nich szybki dostęp

- połączenia z rzeczywistym czasem przyjazdu są oznaczone niebieskim "GPS"
- widget umożliwiający obserwowanie swojego ulubionego przystanku

Kliknij tutaj, aby przejść do Google Play.

Saturday, April 4, 2015

OsX - handful of shortcut key combinations

1. q: Where is the insert key  a: Apple's keyboard does not have an insert key
   emulate 'ins' key by pressing Ctrl + "t"

2. q: Where is the ~ key?  a: to the right of the left "shift" key

3. q: How to take a screenshot of the screen? a: press "ctrl" + 3 - to take the screenshot of the entire screen and "ctrl" + 4 - to take the screenshot of the selected screen area. Screenshots are saved on the desktop


Sunday, March 29, 2015

OsX - default partition table

What is the default partition type on OsX 10.10 Yosemite?

Partition table: GUID partition table (gpt)
partition type: hfs+

Wednesday, March 18, 2015

OsX - choose the right Java version for Intellij 14 CE

/Applications/IntelliJ IDEA 14

2015-03-18 21:02:24.425 idea[962:382297] No matching VM found.
[JavaAppLauncher Error] CFBundleCopyResourceURL() failed loading file
[JavaAppLauncher Error] CFBundleCopyResourceURL() failed while getting Resource/Java directory
[LaunchRunner Error] No main class specified
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread "main" java.lang.NullPointerException
at apple.launcher.LaunchRunner.callMain(
at apple.launcher.JavaApplicationLauncher.main(

Download the newest "Apple Java" from here.
Download the regular Oracle Java.

Remember to set the JAVA_HOME variable in .bash_profile correctly:
export JAVA_HOME= /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home

You can also edit the file: /Applications/IntelliJ IDEA 14

and change 1.6 to 1.8

Friday, March 6, 2015

Friday, February 27, 2015

Ubuntu 14.04 LTS Chrome - enable touch mode (Android-like support)

1. Check you Chrome flags configuration - go to chrome://flags

Enable touch events Mac, Windows, Linux, Chrome OS
Enable pinch scale. Windows, Linux, Chrome OS
Enable pinch virtual viewport. Windows, Linux, Chrome OS, Android
Enable touch based text editing Windows, Linux, Chrome OS

2. Check the no. of your touch-panel

xinput list

for me it gave:

Atmel Atmel maXTouch Digitizer           id=10 [slave  pointer  (2)]

3. Start your chrome browser with the following script

sudo killall chrome
#xinput list  # list input devices 
google-chrome --touch-devices=10 &

Tuesday, February 17, 2015

Android SMS to HTML backup / exporter

The application SMS to HTML exporter that I recently published for  the Android platform enables the user to easily export all his/her messages into a convenient HTML format that can be sent to a desirable email address instantly.

The fresh, material-design inspired and simple user interface should get anyone going in moments.

The application can be downloaded from Google-Play: here

or just copy-paste this address:


Tuesday, February 3, 2015

Git - show number of project lines of code for a specific user

To see number of:

  • added lines
  • removed lines
  • total lines of code
for a specific user, use the following:

git log --author="Name Surname" --pretty=tformat: --numstat | gawk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s removed lines: %s total lines: %s\n", add, subs, loc }' -

Android project - count lines of code

In the project directory execute the following command. It searches for all *.java files and counts their lines of code - ignoring _*.java files which are generated by Android Annotations.

find . -name '*.java' -not -name '*' | xargs wc -l

Saturday, January 17, 2015

Intellij file mask exclude; IntelliJ search files exclude file type; search files exclude file by extension

There is a simple way to exclude files by extension (in fact by using regular expressions on file names in IntelliJ 14 and Android Studio 1.0)

When searching in file content (ctrl+shift+F) limit the scope of search to Custom
and click '...'  to create a new scope.

Shared scopes are stored in: .idea/scopes/
and are shared between team members.

Custom search scope example for Android Annotations:


search in all java source files without files and generated annotations.

If you want to include strings.xml etc. use this search pattern: