Many Pies

Many Pies
Showing posts with label testing. Show all posts
Showing posts with label testing. Show all posts

Tuesday, June 28, 2022

Users as testers

Photo by Michael Dziedzic on Unsplash

By "Users as testers" I don't mean the way some companies throw out software which isn't quite finished, without admitting that, and let people find the bugs.

I'm talking about normal human beings, as opposed to IT people, who get to use technology that previously would have been unavailable or require too much specialist skill. This article is for you normal human beings, and says what you need to know about testing stuff.

Thinks break by themselves

I remember someone who had set up some sort of automatic process and was surprised when it stopped working, without them realising. He said, "I assumed that once it was set up it would keep on working". It would be really nice if that was the case, but unfortunately it's not. The trouble is with processes like this, like something that sends you an email if some rare event happens
  • something somewhere along the line gets changed and things don't fit together and they stop working
  • something was a paid service and someone stopped paying the bill, or a credit card expires and no-one notices
  • a computer gets upgraded and the thing is no longer possible with the upgraded system
  • someone leaves, their email gets closed down, and then no-one gets notified

So if a process is important to you, then it's worth checking regularly that it works. How regularly? Ask yourself how soon would you like to know that it stopped working.

If you change something then you have to check it

Many years ago I was working on a system for controlling gas pipelines. Something asked me to make a very small change. I didn't check that the change worked, as they were in a hurry. They took the tape the next day (it was many, many years ago) and went to the control room and installed the new version. It didn't work, so their whole day was wasted.

Even if you're not a programmer you might:
  • write a spreadsheet formula
  • create a form
  • use some fancy website tool which links two things together
If you change something then you have to check that it works. The thing you change might be something as simple as adding a new thing to a list. There are several ways that just adding the thing may not work out:
  • There are in fact two lists, and you need to add the new thing to the other list too
  • You may have typed something in that's too long, and it doesn't work
  • There are a maximum of five items in the list and you just added the sixth
So if you change something, then check that whatever you changed has the effect that you want.

The other check

The other thing to check is that everything else works as it should before. As I said above, just because something was working doesn't mean it will carry on. In making a change in one area something else may now not work, as a side effect of what you've just done. It's not going to be practical to check every aspect, but you can check two things:
  1. If you have an idea how things work underneath (and you may not, some things are very mysterious) then you can check the things that are linked to what you changed.
  2. The important things - do they still work?

How to check

I can't give much specific advice on this, because a lot depends on whatever it is you're changing. Here are some general tips though:
  • Check things two ways, such as adding up numbers from two different sources that should be the same
  • Assume you know nothing about how it works (which may be true - see "mysterious" above), check that it does what it should be doing
  • Check the extremes - the biggest or smallest numbers
  • Put in rubbish - if a number is expected then how does it handle ?Elephant99!
  • Try different combinations. If you have something that can be A or B and something else that can be X or Y then try AX, AY, BX and BY in case there's some interlink

Tuesday, January 26, 2016

MissioMaze - a new app for Wycliffe Bible Translators UK

Much of what I do is behind our office firewall or password protected websites, but I've been working on something recently that people with an iOS device will be able to see.

Back in 2013 I came across an app called iHobo, which puts a homeless man on your phone for three days. You interact with this homeless man from time to time over the three days - it's not something you do continuously. I thought that same approach could be used with a game which has been round for many years "For those back home". This is a game designed to be played within a group setting. You have a series of choices to make, a bit like the old "choose your own adventure" books. In that game the aim is to get as many converts as possible. However situations come up where you have to choose between what your sending church and what local people might want.

I started by rewriting the questions, as the approaches used in Bible Translation have changed in the 20 or so years when that game was written. For example, many new translation projects in related languages are done in parallel with an overall "cluster" project*. The measure of success changed from number to percentage of the church engaged - how much the local people gain a desire to have and use the translated Scriptures.

As I'm an IT person I got some people who know what they are talking about to review what I'd written. At that point the project stalled due to lack of time and money. Then towards the end of last year it was revived again and I started work on developing the app, while other people worked on refining the questions.

As I had previous experience with the Marmalade framework I used that. I used Marmalade Web which wraps up HTML/Javascript into an app. This was because a requirement was that the game could also be played on a PC at an exhibition stand, and so I wanted to use something simple. For iOS Marmalade Web lets me write an extension in C++ which calls a routine to send a (local) notification after a number of minutes or hours. This is necessary because iOS could close the app when it's not in the foreground.

What's not easy to see on the website, is how you can't get do everything you need to on Windows. Whilst the environment simplifies a lot of the work involved in cross platform building, when it comes to uploading to the Apple App store, you need to use a Mac. I used macincloud.com for this bit. You can rent a Mac for $1 an hour. For ad hoc work you have to buy 30 hours credits, and they expire after a while. That's not a bad price if all you want to do is upload your app.

It's currently going through beta testing - let me know if you want to take part. Keep an eye on the MissioMaze web page for when it's released (we're aiming for March/April).

*From Not too remote
A language cluster refers to languages that may be linguistically related, and/or from similar geographic regions or cultural backgrounds. Speakers of these languages work together, sharing expertise, training and resources, to develop their languages and work on translation into each language.


Thursday, February 28, 2008

More automated web testing

I have progressed in my work with Selenium.

It now runs on a server, checks several of our websites hourly, and then emails me and sends a message to twitter if it fails. Twitter sends me an SMS message, so I can check it out if I'm near a PC (and my phone is on).

For the twitter bit I used this script, and hacked it a bit to remove the skype stuff.

Very sweet.

Friday, February 22, 2008

Automated website testing

I've been pondering for a while the best way to see if the various websites that I'm responsible for are up and running. When I researched this a while back, there were any number of companies that would test them for you, for a fee. However I couldn't find any tools.

Today I came across Selenium which seems to be a pretty powerful set of tools. There's an IDE for writing tests, a component for testing on your webserver (Selenium core), a component for testing on a given remote machine (Selenium RC) and a component for handing out tests to arbitrary remote machines (Selenium Grid). You need to have machines with your target browser on it somewhere, so if you want to test your site in IE, you need IE installed on a machine.

The software is at various 0.x versions, so doesn't look that mature, but on the other hand it has been adopted by Google: Google Open Source Blog: Selenium Users Event Coming Up, so that's a good recommendation.

Time to go and write some test scripts...