Field Notes in Software Testing

Field Notes in Software Testing: «I’ve seen things you people wouldn’t believe»

General cases

  • Divide by zero wherever it is possible;
  • Plug in a real mouse to notebook — it can affect on scrollbars, which may be hiding in case of touchpad;
  • Click on disabled buttons (controls) — sometimes they can just look like disabled, but actually be clickable;
  • Open links and click buttons by double-click;
  • Repeat the action multiple times, like click on the same button 10 times in a row;
  • Click on all arrows pointing downwards or upwards — something must open or close:
  • Open pop-ups and dropdowns near the edge of the screen — they can be cut off by viewport;
  • Open long dropdowns and suggests near the bottom of the screen — they can be cut off by viewport if the developers have not provided a scroll for that element:
The height of the suggest does not has a maximum value and therefore goes off the screen
The height of the suggest does not has a maximum value and therefore goes off the screen
  • If there is a countdown timer on the page you must check what happens when it will stop. For example, I saw NaN and even the continuation of the countdown with negative values;
  • Double check all coordinates: the values of latitude and longitude should not be mixed up in places — surprisingly, it is a quite common bug.

Non-general cases

  • Use the tested website after an idle (after a few hours or a day of inactivity) — it can affect sessions with expiring cookies or other timers;
  • Flip the monitor in portrait mode and then open the tested website — it can affect layouts that are not designed for narrow and long resolutions. For example of this case, the width of a 23-inch monitor will be only 1080 px;
  • Check the print version of the tested website:
Printing is an outdated case for the most modern websites, but for documentation, long reads, maps and tickets it is still valid and valuable
Printing is an outdated case for the most modern websites, but for documentation, long reads, maps and tickets it is still valid and valuable

On opening URLs

  • Open URL with / and without / at the end (https://medium.com/ or https://medium.com) — opening the page can depend on the app’s routing or server’s settings;
  • Open URL with encoded characters (Dvo%C5%99%C3%A1k instead of Dvořák);
  • Keep in mind, that in some cases space can be transformed into +
  • If there is a pagination in the URL’s path, then open 0 or negative page (-1);
  • Try to request an HTTPS page by HTTP — it can depend on the server’s redirect rules.

On search inputs (applies to any input fields)

  • Search for a space;
  • Search with a space before and after request;
  • Search for an empty request — it can affect inputs with blank fields validation (read more about client-side form validation);
  • Search for special characters: ! * ‘ ( ) ; : @ & = + $ , / ? % # [ ] < > .
  • Search for special characters through mnemonic etities, for example: &laquo; &raquo; instead of « »
  • Search for : — it can affect python’s backends, especially if search is performed on the clickhouse database;
  • Search for сyrillic ё (or any non-latin letters or hieroglyphs). For instance, there was a bug in iPhone with the Telugu character జ్ఞా
  • Search for text in different encodings;
  • Search for [object Object]
  • Search for %, by %%, and by % with combination of special characters;
  • Search for XSS — actually, it is already a part of security testing;
  • If there are a few inputs, then put XSS values in several inputs at once;
  • If a test page has custom hotkeys, then use these keys when filling in the input;
  • If a tested page has a video, then: [Play] it → [Pause] it → and try to search on a tested page through browser’s search; do not forget to use [space] — it can affect paused video, because [space] is a common hotkey for pausing;
  • Input a long unbroken text — it can cause page overflows and other artifacts (very long wikipedia links are usually break layout);
  • Try to find a limit on the number of characters in the search request — at least there must be some kind of restriction, otherwise the users can load our backend with monstrous requests;
  • How is the filled field cleared?

On usernames

  • Register account with space before and/or after a username: augustdvorak
  • Register account with lower-case and upper-case letters in a username: AugustDvoraK
  • Register account with XSS in a username, something like: <img/src=’x’onerror=alert(august)>
  • Register account with a username in angle brackets: <augustdvorak> — it can affect both frontend and backend. If escaping works too strictly, the whole username can be erased;
  • Register account with . or in a username: august.dvorak оr august-dvorak — in some cases . and can behave as the same symbol.

On mobile version of the websites

  • Open mobile version of the site on 480x800 px resolution and/or on 4 inch screen or less;
  • After opening the page the insertion caret (that blinking input cursor) should not stand in the input field (of course, if it is not provided by the documentation) — this causes the keyboard to open automatically and may irritate the users;
  • Try to request a desktop version of the site in a mobile browser:
Request Desktop Website in Safari
  • If the layout of a tested website is based on a media queries for responsive design, try to slowly resize the width.

On crossbrowserness

In all projects I adhered to the principle:

  • For browsers over 5 % — the layout must match the design mockup;
  • For browsers between 5–1 % — the layout may be broken, but the functionality should work;
  • Do not support browsers less than 1 %;

On browser behavior

  • Back to the previous page by [Back] — it can affect SPA websites and websites, which use History API;
  • Switch to another tab by [CMD]+[NUM_KEY] or switch to another application by [ALT]+[TAB];
  • Search on a tested page through browser’s search: [CMD]+[F] — it can affect pages with pop-ups, modal windows, dynamic loading scripts and infinite scroll;
  • Navigate by keyboard [TAB] — actually, it is already a part of accessibility testing;
  • Hard refresh the browser: [CMD]+[SHIFT]+[R] — browser will clear cache on refresh, but the URL’s path should remain unchanged;
  • Check Safari’s Console in DevTools, because additional CSP errors can occur in this browser.

On browser settings

Set privacy.trackingprotection.enabled = true at about:config
Set privacy.trackingprotection.enabled = true at about:config
  • Try to use a tested site with HTTPS-only mode;
  • Change (increase) default font size and/or zoom on the page — it can affect the layout of any kind, but only less than 4 % of the users have such setting (this number is based on private statistics).

On network settings

  • Try to use a tested site with network throttling (DevTools setting);
  • Try to use a tested site under VPN from another county;
  • Try to use a tested site under VPN from another county with a different time zone.

On arrow controls

If a web application supports control by arrow keys (like driving or docking simulators in a browser), it is very easy to put the software keys into the sticking state. This common issue has a lot of cases of reproduction.

  1. A lot of frequent/short clicks on the arrow keys;
  2. (For Mac) Press [CMD] and release the pressed arrow keys;
  3. (For Mac) Press [FN];
  4. (For Mac) Open Spotlight by the button on the touch bar;
  5. (For Mac) Move the cursor to the menu bar;
  6. (For Mac/Linux) Press [WIN] key on extended keyboard;
  7. (For Windows) Press [WIN];
  8. Press [CTRL] or [ALT] or [SHIFT] or a combination of them;
  9. Press [ESC];
  10. Switch to another program by [CMD]+[TAB] (for Mac) / [ALT]+[TAB] (for Windows);
  11. Switch to another program by mouse click;
  12. Switch to another browser tab by mouse click;
  13. Switch to another browser tab by [CTRL]+[TAB] or [TAB]+[{NUM}];
  14. Move the mouse away from the active browser’s tab/window;
  15. Make right-lick (Right Mouse Button) and left-click (Left Mouse Button);
  16. Reconnect the network (case of the loss of internet connection).

On odd utilities

  • Run a «crawler» or link checker to find broken links on the pages of your web site. There are plenty of apps for that or you can program your own HTML parser.
  • The best way to check access (connection) to the resource is by using telnet — any sysadmin will appreciate a stack trace from it, rather than a report «the site does not work». Unfortunately, telnet does not run out of the box, so you have to install it (for the Mac it can be done through Homebrew). The command is like: telnet {domain} {port}
telnet developer.mozilla.org 80
telnet developer.mozilla.org 80
  • You can find out your ip address through the terminal by curl request for ifconfig.me or ipinfo.io: curl ifconfug.me or curl ipinfo.io

How to find out the user-agent through the browser console?

console.log(navigator.userAgent);
console.log(navigator.userAgent);
User-agent

How to change user-agent without addons?

This trick works only in Chrome browser:

  1. Open Command menu: [CMD]+[Shift]+[P]
  2. Type «network conditions» and select Show Network conditions;
  3. In the «User agent» section disable the «Use browser default» checkbox;
  4. Input a desired user-agent:
User-agent client hints
User-agent client hints

How to add a cookie through the browser console?

document.cookie = "key=Value";

How to add data to localStorage through the browser console?

localStorage.setItem("foobar_popup", "1");

How to prevent auto closing (hide on unhover) panels/pop-ups/menus?

It is always inconvenient to write autotests for panels/pop-ups/menus which show on hover and close on unhover — how to find out the classes of hidden elements?

  1. Open Debugger in Firefox DevTools (Source panel in Chrome DevTools) — there is a [Pause] button;
  2. Open desired panel/pop-up/menu;
  3. Hit the pause’s hotkey: [F8]— JS execution on a page is stopped, none of the elements will hide automatically and you can inspect them with no rush.
Paused at Execution
Paused at Execution

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrey Enin

Andrey Enin

199 Followers

Quality assurance engineer: I test complex web applications and APIs, and do automation testing.