Just a thought, (and this is only if you're looking at a mediawiki page):
You can check for the correct page by looking at the body tag if that's
possible. We always have a unique (page name derived) class for the body
tags. (Main Page includes class 'page-Main_Page', Cucumber has
'page-Cucumber' Special:Checkuser has 'page-Special_CheckUser' etc).
Obviously this depends on the goal, is only for mediawiki pages and I don't
know the testing system well enough to know if 'body has X class' is even
an easy thing to check so feel free to ignore ;)
James Alexander
Legal and Community Advocacy
Wikimedia Foundation
(415) 839-6885 x6716 @jamesofur
On Mon, Mar 31, 2014 at 6:12 AM, Željko Filipin <zfilipin(a)wikimedia.org>wrote;wrote:
On Thu, Mar 27, 2014 at 5:36 PM, Jon Robson
<jdlrobson(a)gmail.com> wrote:
Out of interest, what is the value for you in
writing this test?
I will try to be short. If anything is unclear, please ask.
When I start testing a feature, the first test that I write is usually a
check if the (correct) page opens at all. If the page does not open for
what ever reason (redirect, error page, server down, network down...) all
other tests will fail anyway. The experience has shown that when a lot of
tests fail, it is important to quickly figure out what failed. Everything?
Just a few things? Maybe just one? If the test that checks if the page
opens fails, then it is clear where the problem is.
How to test if the (correct) page opens?
#1 go to the page
#2 check the page
Going to the page is simple, but checking the page could take a lot of
effort if we decide to check for every single page element. So, we check
just the relevant ones.
My experience has shown that from all page attributes URLs tend to be the
most stable ones. So, when I am thinking what should I check for first, I
usually check the URL and then a few relevant page elements.
I never thought about it a lot, since URLs are pretty stable and/or easy
to encode/decode. If that is not the case in your experience, feel free to
delete all URL checks.
Željko
_______________________________________________
Mobile-l mailing list
Mobile-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mobile-l