Tuesday, 7 July 2015

Tweak live pages with some jQuery in the Chrome console

A while ago, our designers showed me a clever trick using jQuery to check the CSS selectors needed for an automation framework I was looking at.

Say for example you're trying to locate the an item in the menu bar on the Microsoft site...

Open up the Inspector panel [Ctrl+Shift+I]
Type $('.menuDrop') into the Console tab and hit enter.

This lists all elements with a class of  "menuDrop".

You can narrow down your selection using further combinations of selectors and use the console to check it without having to wait for a test to spin up and run each time.

Tuesday, 19 May 2015

Sometimes being a tester is like having ADHD

I think I spotted an issue around updating Direct Debit details on this site yesterday. I'll just log in and check.

Oh. The password for this test user isn't the usual "password". Maybe it's "password1"? Or was it "Password1"? Maybe I changed it to "password123" when I was testing the Change Password page?

Dammit. Too many password attempts. This user has been locked.

Hang on a minute... That should have locked me out after three attempts. That was definitely 4! I'll just find another user and check that again.

*repeats with different user*

*raises bug*

Friday, 13 March 2015

Fast switching between browsers and devices

If you're doing cross browser and cross-device testing then you may find a great deal of your time is spent copying and pasting URLs, typing them on a fiddly little phone keyboard or emailing links and screenshots from yourself to yourself... There are several services out there that can make your life a little easier.

Wednesday, 28 January 2015

Learn the rules first - then break them

My blog appears to be rapidly filling up with 'life' and I'm neglecting the 'work' side of things, which isn't a very true representation of things at all! So in the interest of balance, here's a little nugget that occurred to me this afternoon.

I arrived at this seemingly simple looking popup with a single text box that expects a URL.


There are many ways to test this single text field. I could have just tried a few URLs. I could let the cat wander across my laptop. I could think up different strings of characters that I think might cause a problem. I could search the internet for known troublesome URLS. I could even use one of the many many many automation frameworks available to check hundreds of these different values for me.
But it could be much quicker to approach this from a different angle. I'm in the very fortunate situation of not only possessing a detailed specification, but the developer on the project sits next to me and in this instance there is also some validation happening right in the browser that I can see with Chrome's inspector tool. So I can easily find out the rules that apply to this field.


In this case we can see that the validation is expecting segments containing any amount of letters a-z (both upper and lower case) and numbers 0-9 separated by dots, but the final section must only contain a-z and be between 2 and 6 characters. So all I need to do is find out if something breaks that rule! It just so happens that I know of a valid domain with a TLD that is 7 characters long... ;-)


Longer ones exist. Recently TLDs like university, photography and education have been made available. The longest one in the ICANN list is .cancerresearch at 16 characters, followed by .versicherungen (14) which is the German word for insurance.

So save yourself some time and effort. Find out what the rules are first if you can. And then find something that breaks them!

It may seem like an obvious point, but it's important to remember the basics. I could have easily missed this if I'd stuck with the usual .com, .net and .co.uk style domains without doing any digging.

* And yes, my next question for the developer sat next to me is, what happens if I bypass the client-side validation and submit an invalid string? Or a drop tables command? Or I might just try it without asking and see what breaks!

Tuesday, 13 January 2015

Go on a Microadventure. Anything could happen!

I meant to blog about this earlier, but Christmas happened, and then I was on holiday for a week, so I'm just getting round to it now...

It started with an email from Rich the week before Christmas.
Right - I'm going to guess here that this is a stoopid idea but.... I was potentially thinking of next Tuesday eve cause no one will be doing any work on Wednesday anyway.... I was thinking of doing a reccy of the stanage cave and see if its still dry. If anyone thinks its a good idea give me a shout.
Nobody was stupid enough to reply to that. Well... Almost nobody.