[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Testing XML don't use xUnit

  • From: Andrew Welch <andrew.j.welch@gmail.com>
  • To: stephengreenubl@gmail.com
  • Date: Thu, 11 Apr 2013 12:52:11 +0100

Re:  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
http://andrewjwelch.com


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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.