OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Testing XML don't use xUnit

> I also do a lot of work with testers writing tests for HTML pages using the
> very well-known integration test tool Selenium IDE (for Firefox) and that
> makes heavy use of XPath even though the target is HTML. Here we end
> up with many tests which include XPaths which break every time a
> significant change is made to the HTML.

Yep, tests will often break after a significant change to anything -
not much you can do there, but HTML is the classic moving target
that's hard to test where insignificant changes will cause tests to
fail.  Old school techniques would compare blocks of markup which
would fail simply by someone changing the name of a css style, or say
adding a div or span to hang a style off.  The solution (goes without
saying at this point in the thread) is to target individual values
with the xpaths.

> So we have to keep mending the
> XPath expressions (even though we try to write them with //, etc, to avoid
> this). So I know the problem. It doesn't stop people favouring Selenium
> IDE for website integration tests though. It's well worth the hassle to
> many.

It's been a while since I did any front end work, but I don't know of
anything better than Selenium.  Maybe something new has come along?

> I guess modern unit tests get associated with TDD
> and Agile, so maybe having separate test assertions (written in prose)
> would be a 'no no' for many unit test writers as it might be seen as going
> against Agile mantras.

It's not really anything to do with agile or TDD, it's a no-no because
the developers writing the code and junit tests have no need for a
natural language abstraction layer getting in the way - the people who
wrote the code know how to write the test.

Prose based tests are aimed at the non-technical people, such as the
BAs, testers / QA team.   (apologies to any testers on this list for
lumping them in the same category as BAs ;)

Andrew Welch

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS