Category Archives: Reconstruction

Engineering Illustrated: The Thunderbird Migration

A lot of people think that an engineer solves a problem in one go. This is a myth.

During the years, I gathered a big number of tricks in my bag and a lot of endurance.

The problem

Last year my home PC crashed. As a free time system administrator, I had the honourable task to fix the problem. The biggest work load was to install the programs and restore the related files. For email, I use Thunderbird, a free mail client.

Solving the problem

First install

The first step was to install Thunderbird. Then I started the program and was asked to enter information about my mail account. That was the moment to close the program.

The program worked as expected. I also knew that a subdirectory with an empty mail file was created. The only thing I had to do was to find the right spot.

Second locate

This was not the first time I had to move my mail to a new PC. I opened the Windows Explorer. Then I went to my subdirectory. It looked something like C:\Users\Mindful Tester\AppData. Alas, I could not find this subdirectory.

I had to change a setting. I went to the options and went to the right tab. Then I had to browse whole list of checkboxes. I clicked on the Show hidden files checkbox and saved the change,

Now my subdirectory was shown in the Windows Explorer. I clicked a few times and ended up in a subdirectory with a name looking like C:\Users\Mindful Tester\AppData\Roaming\Thunderbird\Profiles. It was time for Find and replace.

The old-fashioned way

In the subdirectory I found only one mail file. I made the subdirectory Old and moved the mail file to this place. Then I placed my old mail files to this subdirectory.

It was time for a simple test. I opened Thunderbird and the program was not usable. I restored the old situation and got the known request to set the settings for the email account.

My old trick to dump my files failed. This was not a simple case of Dump and Mail.

Worth note taking

After a few attempts, I opened my word processor and wrote down, what I had done. There were some questions bugging me. What did I do? Did I miss something?

Obviously, because I had the wrong information.

As I read

There was still a thing called search engine. I entered some keywords like Thunderbird and migration and ended up at a web page of Mozilla. This was the organisation which makes and maintains this mail client,

 I dutifully followed the instructions to no avail. It was the same subdirectory, so I was looking at the proper spot. After a few attempts, I had to use another trick to solve the problem.

Pair administrating

For the next trick, I needed an extra pair of eyes. This time I repeated the steps, while one of my kids looked at my attempts. It was like pair programming or pair testing. I talked aloud while following the instructions.

Once again, there was no flaw in my actions. But I could still not see my mail.

Trust the course, Luke.

Educated system administrator guess

A few weeks later I noticed the file profiles.ini in the subdirectory which looked like C:\Users\Mindful Tester\AppData\Roaming\Thunderbird. As a tester, I like to use Exploratory Testing. It is about finding new information and using it for my own advantage.

A file with the extension ini is an initialisation file. During the first startup of the application the file is read and used. It contains configuration information. The operating system Windows let me open this file in a text editor. The contents looked like:

[Install45F216JC4C4E8]
Default=Profiles/fjer6fh3.default

[Profile0]
Name=default
IsRelative=1
Path=Profiles/fjer6fh3.default
Default=1

[General]
StartWithLastProfile=1
Version=2

The structure of the file looked familiar to me. There was a link to the file fjer6fh3.default. This file was automatically created during the first start-up of Thunderbird. If I would change fjer6fh3.default to the file name of my default mail file, then it might work.

The result was that only 1 of my email boxes was shown: the default one. I also wanted to see the other 2 mail boxes. There was a nagging need for another trick.

No smart feelings

My recurring subject about the mail client was noticed by my wife. Maybe it was time to hire someone to do this job.

And I really wanted to solve it myself.

This is not the trick you are looking for. TODO quote.

Educated developer guess

Sometime later, I thought about my experiences about adding information categories. Suppose that the product owner wanted to add the country name to customer data. Then a developer had to add an entry field for the country to several forms. Also, the data structure had to be updated. The added country had to be stored somewhere.

In a lot of cases, there is already a lot of customer data coupled to the application. This data has to be converted to the new data structure. When the application is updated, then a piece of code is used for this specific update.

I removed Thunderbird from my home PC and use the old installation program of Thunderbird, Then I dropped my files in the subdirectory with a name looking like C:\Users\Mindful Tester\AppData\Roaming\Thunderbird\Profiles. And I saw all my 3 mail boxes as expected.

A trick to update programs is to look at the version of the program. I went to Help and clicked on About Thunderbird. An update button was available. I pressed on it and a newer version of the program was announced next to the update button. So, I pressed several time on the Update button, until I got a message that Thunderbird was up-to-date.

And it worked for all my 3 mail boxes. This felt so good.

This is the day

It is personal

Joyfully, I tried to open the mail of my wife, but I got that annoying request to enter the mail settings. So, I removed Thunderbird, installed the old version of Thunderbird and the old mail files, and upgraded the program. Then I could open the mail of my wife.

Now this trick had to be used for every account on my home PC.

Hot fix

A refactored solution

There are some readers who are more interested in a set of instructions instead of a long story. This section contains all the steps needed to migrate Thunderbird files.  I used refactoring to remove redundant steps.

  1. Use the old installation program for Thunderbird for the installation.
  2. Start and close Thunderbird.
  3. Make hidden files visible in Windows Explorer.
    • (Windows 10) Go to View menu.
    • Select Options in this menu.
    • Go to the View tab in the Folder Options dialog.
    • Go to the Advanced settings, a list of checkboxes.
    • Click on the checkbox with the description “Show hidden files, folders, and drives.”
    • Click on the OK button to save the changes,
  4. Go to the Profile subdirectory which looks like C:\Users\Mindful Tester\AppData\Roaming\Thunderbird\Profiles.
  5. Remove the default mail folder.
  6. Move the old mail files to this subdirectory.
  7. Start Thunderbird and the old mails should be visible.
  8. Update Thunderbird.
    • Open the Help menu.
    • Select the About Thunderbird option.
    • Press on the Update button, until a message is shown Thunderbird is up-to-date.

All mail accounts should be still be available.

If there are more users on the PC using Thunderbird, then

  1. Remove Thunderbird.
  2. Repeat these steps for every user account on the PC.

A more detailed solution

There is an important thing missing in the instructions. It is the problem I was trying to solve.

The solution might be very difficult to handle for several people. Some people might need to know more about t the mail files and the right installation program for Thunderbird.

Reading the steps, I noticed that the steps to make hidden files visible should be executed once. Another refactoring is needed.

Problem:

  • In the past, I could just copy my Thunderbird mail files to the proper subdirectory. This trick does not work for the latest version of Thunderbird. I needed to take some extra steps for migrating my mail.

Preparation:

  1. Use a system administrator account.
  2. Make hidden files visible in Windows Explorer.
    • (Windows 10) Go to View menu.
    • Select Options in this menu.
    • Go to the View tab in the Folder Options dialog.
    • Go to the Advanced settings, a list of checkboxes.
    • Click on the checkbox with the description “Show hidden files, folders, and drives.”
    • Click on the OK button to save the changes,
  3. Find the mail files which have to be migrated.
  4. Go to the Profile subdirectory which looks like C:\Users\Mindful Tester\AppData\Roaming\Thunderbird\Profiles.
    For every mail account, there is a subdirectory containing information like login and the mails. It has a strange name like Profiles/fjer6fh3.default
  5. Find the old installation program of Thunderbird on the hard disk.
    An alternative is to download the 50 version using the Thunderbird release page.

Then the updated steps look like:

  1. Use the old installation program for Thunderbird for the installation.
  2. Start and close Thunderbird.
  3. Go to the Profile subdirectory which looks like C:\Users\Mindful Tester\AppData\Roaming\Thunderbird\Profiles.
  4. Remove the default mail folder.
  5. Move the old mail files to this subdirectory.
  6. Start Thunderbird and the old mails should be visible.
  7. Update Thunderbird.
    • Open the Help menu.
    • Select the About Thunderbird option.
    • Press on the Update button, until a message is shown Thunderbird is up-to-date.

To be extended.

Advanced blogging – Honey, I Shrunk The Pictures.

Small recap

It took me three days and three takes to make 26 pictures. Now I had to shrink the pictures to a smaller size. This would lead to a faster download of the blog post and hopefully a better performance of my blog post.

Warning:
This is not the standard look-how-great-I-am blog post. It is more like look-how-I-stumbled-forward.

Reminder to myself:
As a tester I built this website to share information, but also to get a better understanding of building websites. The more I blog, the better I test.

Here, have some notes

Writing a blog post is creating an introduction, a good end, and something in between. The last part was still missing.

I only had notes and pictures in a charter. As an experienced tester I made my observations including date and time. I used the abbreviation PIC for Picture.

20201012 blogging
PIC 10:37 Screen print TEstLogin3.java 
Input: Cap / Secret.
PIC 10:44 debug menu
PIC 10:46 first breakpoint.
PIC 10:47 Cap in screen.

All my pictures had names like “20201012 – 1.2 debug program.jpg”:

  1. “20201012” is the date when the picture was taken. The format is year in 4 digits, the month in 2 digits, and the day in 2 digits.
  2. “1.2” means Take 1 and Step 2.
  3. “debug program” describes the picture.
  4. “.jpg” describes how the picture is stored. I chose this file format, because it is great for editing. That is a bit of a spoiler.

The big advantage of this name is that I can order the pictures on name.
I must have looked like a Holywood director. Day 1, take 1.

Now I had to make a link between my actions and the pictures. Luckily, I had used descriptive names for the screen pictures. These pictures had a day and time stamp, so it was easy to place the file names at the right places in my blog post.

20201012 blogging
PIC 10:37 Screen print TEstLogin3.java -  20201012 - 1.1 three breakpoints.jpg
Input: Cap / Secret.
PIC 10:44 debug menu - 20201012 - 1.2 debug program.jpg 
PIC 10:46 first breakpoint. - 20201012 - 1.3 - first breakpoint.jpg
PIC 10:47 Cap in screen.- 20201012 - 1.4 - fill in username.jpg

Processing a picture

A 288 kb picture is too big for my blog post. I figured out several steps to cut down the size.

Emphasizing

The first step is to determine whether a box should be placed in the picture. If this was the case, I used a green bordered and transparent rounded rectangle for highlighting.I would add “+box”:
e.g. “mindful-tester-p3-20201012 – 1.4 – fill in username+box.jpg”.

Let me break down the name again:

  1. “mindful-tester” is the name of my blog.
  2. “p3” is the third part of TDD in Test Automation.
  3. “20201012” is the date when the picture was taken.
  4. “fill in username” is the description of the picture.
  5. “+box” states that a rectangle is placed in the picture for highlighting an important detail.
  6. “.jpg” describes how the picture is stored.

In case of no box I did not add anything at the end of the name.
This would lead to:
“mindful-tester-p3-20201012 – 1.4 – fill in username+no+box.jpg”
After a while, I did not use the “+no+box” any more, because it did not add value.

I stored the old version of the file in case of any mistakes.
So far, so good.

Zooming in

The second step was that I cropped the picture: I would cut a rectangle out of the picture and save it. My favourite shareware tool is irfanview. Less pixels means smaller size and better performance.

Shrinking

The third step was to shrink the picture also using irfanview.
This way a picture of 288 kb could be shrunk to 40 kb.

In the Resize/Resample image dialog of irfanview the "Set new size as percentage of original" is selected. The Width and Height are set to 100%!

Note: for this blog post I accidentally used a png file. png is like jpg a way to store pictures. Only irfanview would not let me resize the png picture using percentages.

In WordPress I resized the picture to maximum size. I selected a corner of the picture and stretched the picture. This way the user does not have to click on the picture to see the details.

The new file name was:
“mindful-tester-p3-1.4-fill-in-username+box.jpg”.
I left out the date and the spaces in the name.

Was this a joyful experience for me? Not really.
So the time of processing pictures became longer and longer, until I forgot my process.

Processing pictures

The status of the picture was not clear in the file name. Also, the location of the pictures had its own logic. So the time between the editing of one picture and the editing of another picture became longer and longer.

So I made a nice file with all kind of instructions, “Instructions printscreens programming.txt”.
This included files, their contents, and their locations.
Exploratory blogging in a nutshell.

Only to discover that I had already “Overview files.txt” in place.
Exploratory blogging takes practice.

Because a lot of time was spent on editing the pictures, I did not remember my steps well enough while writing. Now pictures are handy, because pictures do not lie. So I had to change my story a few times.

Looking at some pictures I missed the essential point of the picture. So I added the transparent rectangle and went through the whole editing process again. Even after cropping the picture the important details were too small in some cases. So I split pictures in certain cases.

Placing a picture in a blog post is quite tiresome. I had to go to the right location, search the right picture, and upload it. Not enjoyable at all.

But I already knew what I wanted to upload. So I opened Media and uploaded all the pictures using one drag and drop.

Then I searched for the first picture to be included using PIC for Picture. All my files had an unique name like
“mindful-tester-p3-1.4-fill-in-username+box.jpg”.
Using the filter I searched for the file with 1.4 in the name. Then I selected the file.
In the Add media dialog of WordPress the Search Field is set to "1.4". The result of the search is a single picture containing a part of the Login Page!

Uncomfortable observations afterwards

  • At the end I shrunk the total size of my pictures in the blog post to a quarter: from 8 Mb to 2 Mb, which is still big. Is it still possible to shrink the pictures without losing the important details?
  • I did not check the size of my blog post with the preview version.
  • Chrome Devtools contains Lighthouse, an accessibility tool. My site scored 58 on a scale from 1 to 100 for performance. This is not really high.
  • The setting of “the most number of blogs posts show on page” was still on 5. I forgot to save this setting. Saving a setting in WordPress was not consistent with saving an alternative text for picture.
  • The trouble with pictures is, that it can cost a lot of time. This will decrease my enjoyability. It makes my blogging slower. On the other hand it will increase the enjoyability of the readers. At the end this will increase my enjoyability. I like to read my own blog posts. I might call this the Enjoyability Paradox. Things which I did, were no fun, but finishing the blog post was good for my mood.

Coming up

At the end of the picture processing, I had a bunch of pictures without alternative texts. For blind people or people with bad sight this had to be fixed. A screen reader needed these texts to describe the pictures aloud. This was about accessibility.

January Testing

Somehow I ended up with this test term or test type. Actually is a subset of boundary value analysis. But I got your attention.

That’s my right

It was the second day of the year 2018. I was about to place a new post on my web site. I just knew something was wrong.

I went to the web site lay out. It took me a few clicks to open the footer. Then I changed the text to
“2014 – 2018. Mindful Tester. All rights reserved.”

Now I could add my post.

It is my right
for which I fight

That’s my audit input

The same week.
For the audit I ran a query in the defect registration system. The number of items on the list was startling low: 0. My query was wrong. That bugged me. Last year it gave the right results. Actually a few weeks earlier.

I had a look to the query and noticed:
StartOfYear()
I don’t know all the commands, but I could make a good guess.
This year started at January 1st 2018. I was one year off.
The report was about 2017 and not about 2018.

A few hours later I had to go to my boss. He still used the same old query. It was easily explained.

It is not the query
I marry

A test idea approach

Let me generate some test ideas:

  • Is there a checklist for things to be updated in the new year?
  • If yes, so when is it updated?
  • Are queries based on fixed dates instead of relative dates?
  • Are there changes in laws which I have to pay attention to?

Still wondering about the pic with door?

Janua is the Latin word for door.

What about May 2018 testing? Excuse me GDPR testing.
Do you know what the effects of the General Data Protection Regulation are? An European customer has the right to be forgotten. But what about payments?