Home » How Tos

Category: How Tos

How to Test a Spoon?

How to Test a Spoon - Adventures in QA

A couple of months ago I stumbled up on a blog post or tweet (Sorry, but I really can’t remember and find it again) about a very funny and interesting software testing interview question.
The question is:

How to Test a Spoon?

This question sounds strange in the first place, but if you think about it, it is a brilliant software testing question. But why?
The goal of this question is not to see the possible candidate to break the spoon, instead it is more about the reaction and the thinking process about this question.

I would love to get some questions back from the candidate to see how he or she will get more information out of this testing challenge.

Some brilliant answers would be:

  • What is the purpose of this spoon?
    • Will it be used as a normal spoon for soup or will it be used for example in a chemical environment for acid liquids?
  • What is the area of operation of this spoon?
    • Will it be used in a hot or cold environment?
  • What material is it made of?
    • Is it made of plastic, metal or wood?
  • What is the shape of the spoon?
    • Is the shape important for the use case of this spoon? Maybe it has a square, round or rectangle shape.
  • Who will use it? Children, adults or older people?
    • Are there sharp edges, are those edges intended to be sharp?

I will ask this question in one of my next software testing interviews, if you were lucky enough you have read this post before :).

But please just hand out a spoon no fork or knife, for your own safety :).

What do you think about this question? Will you use it in one of your upcoming interviews or do you have some similar questions?

Happy Testing!

Image Source: https://openclipart.org/image/300px/svg_to_png/206173/1418358989.png

Android Screen Recording using ADB

Android Screenrecord - Adventures in QAThanks to Richard Bradshaw, also known as the @FriendlyTester, who reminded me in a tweet about the Android screen recording feature using an ADB (Android Debug Bridge) command. In one of my last posts, I already wrote about the new QuickTime recording feature for iOS devices running iOS8 in combination with a Mac OS X device running Yosemite.

A couple of posts ago I wrote about an app called ilos that is able to record Android screens as well. However, I totally forgot to mention in that post that Android is already able to record the current screen using an ADB command.

The screenrecord command is able to record the display of devices running Android 4.4 (API level 19) and higher. The tool is recording the app interaction to an MPEG-4 file, which can be downloaded from the device using the command adb pull. This video can then be used as part of your bug report as well.

The following sample will start a recording session of the connected device.

$ adb shell screenrecord /sdcard/NotAbleToLogin.mp4

To stop the screen recording press Ctrl-C, otherwise the recording will stop automatically after three minutes. However, you can also define a time limit with the paramter --time-limit.

The tool is recording the video in the native display resolution and orientation by default. However, there are some limitations of the screenrecord command that you should know when using it:

  • Some Android devices are not able to record the session with their native screen resolution. If you see any kind of problems during the recording session, try to use a lower resolution.
  • The tool is not able to record screen orientation during the recording session. When you rotate the device during the session, some parts of the screen will be cut off.
  • There is no audio recording support.

The following table is showing the options of the screenrecord command. Note: This table is copied from the developer.android.com page.

--helpDisplays a usage summary.
--size <WIDTHxHEIGHT>Sets the video size, for example: 1280x720. The default value is the device’s main display resolution (if supported), 1280×720 if not. For best results, use a size supported by your device’s Advanced Video Coding (AVC) encoder.
--bit-rate <RATE>Sets the video bit rate for the video, in megabits per second. The default value is 4Mbps. You can increase the bit rate to improve video quality or lower it for smaller movie files. The following example sets the recording bit rate to 6Mbps:

screenrecord --bit-rate 6000000 /sdcard/demo.mp4
--time-limit <TIME>Sets the maximum recording time, in seconds. The default and maximum value is 180 (3 minutes).
--rotateRotates the output 90 degrees. This feature is experimental.
--verboseDisplays log information on command line screen. If you do not set this option, the utility does not display any information while running.


Richard Bradshaw send me a link to his GitHub Gists where he provided a shell script that is able to start, download and delete a recorded video from the Android device. Maybe this can be useful for you guys as well.

BASH script to record Android display and download/delete the video.

#Check if an argument was supplied
if [ -z "$1" ]
echo "No argument supplied, please provide video name"
# start recording
adb shell screenrecord –bit-rate 6000000 /sdcard/$1.mp4 &
# Get its PID
# Upon a key press
read -p "Press [Enter] to stop recording…"
# Kills the recording process
kill $PID
# Wait for 3 seconds for the device to compile the video
sleep 3
# Download the video
adb pull /sdcard/$1.mp4
# Delete the video from the device
adb shell rm /sdcard/$1.mp4
# Kill background process incase kill PID fails

Happy recording and testing!


Record your iOS Test Session with QuickTime

Source: http://img2.wikia.nocookie.net/__cb20101130015012/logopedia/images/a/a7/Quicktime_X_Logo.pngA couple of posts ago I wrote about “How to File Mobile Bugs” and the importance of good and detailed bug reports. In another post I wrote about ilos  and how to record your current test session on Android Lollipop devices. Today, I write about the other big mobile vendor, called iOS 🙂 and how to record the mobile test session as well.

With the release of Mac OS X Yosemite and iOS 8, Apple made screen recording pretty simple. Before, Yosemite and iOS 8 it was also possible to record your iOS device screen, but it required some work to get it going e.g. using jailbreak-only apps or AirPlay. However, this time is over now. From now on you can use QuickTime to record your iOS device screen to use it as a part in your bug report.

To start the recording session connect your iOS device running iOS8 to your Mac using Apples USB cable. It may happen that you first see the “Trust This Computer” alert view on your iOS device. Click trust to continue.

When the device is connected to your computer, start QuickTime and select File > New Movie Recording from the menu bar or use the keyboard shortcut Option-Command-N.

Start Recording Session - Adventures in QA

Performing this step will launch a new QuickTime window for video recording. By default, QuickTime is using the build-in iSight camera as input source. To change the input source, click on the small downward-facing arrow directly next to the record button. Clicking this button will open a context menu, where you can select the input source for your recording session. To record the iOS device select it from the list.

Choose Input Camera - Adventures in QA

When changing the input source to your iOS device, QuickTime will now show your connected device on the desktop. You can either start the recording session right away or you can just use the device and see the changes immediately on the screen as well. One thing I noticed after using the recording function for several minutes is that the QuickTime is showing a clean iOS style status bar, with strong Wi-Fi signal, Bluetooth activated and a charged battery symbol. Furthermore, the time is set to 9:41, which is Apples secret time :).

The QuickTime recording feature also supports portrait and landscape mode of the iOS device. However, this feature is still buggy because during my test sessions the recording session was always stopped when changing the device orientation.

If you like to add some comments during the recording session you can also select the audio input source in the same context menu .

When you are finished with the recording session, you can just click the stop button in the QuickTime window. To save the recording open File > Export or press the close window button in order to open the save dialog. The recording will have the QuickTime movie format (.mov).

As an example I added a really short video while browsing my blog.

Hint: The recording feature is only working with Mac OS X Yosemite and iOS8.

Happy Testing!

How to stress test your Android app with Monkey

Today I want to show you a small nice tool, to stress test your Android app. The tool is called monkey and is part of the Android SDK. The tool is not new, but I didn’t had the chance/ time to work with the tool.

Monkey is a program that runs on your device or emulator. While running it is generating pseudo-random user events such as touch, click, rotate, swipe, mute the phone, shutdown wifi and many more, to stress test your app and to see how your app is handling all those inputs. Read more

Do it yourself – Build your own mobile cam holder

In the last couple of months my colleagues and I struggled with mobile presentations. We had always two situations/ problems. Either we showed our apps during the sprint review meeting just to the client on the real device and all others could not see what we were presenting. Or we were fighting with HDMI/ VGA cables to connect the device to the projector, but we never get the perfect setup up and runing, so that everyone in the meeting was happy. So we thought about a mobile cam holder for the presentations, where the app is presented on the real device. The installed web cam should be connected to a laptop and the interactions from the device are visible on the projector.

The whole team agreed, that we need such a cam holder. We checked the internet for cam holders to buy, but the solutions we found are really expensive and not what we wanted. So the next logical step was to build our own cam holder.

Read more