[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|