• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TDD for HTML

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to employ TDD for static HTML pages ???

Precisely, how to write tests for HTML pages ???

Regards
Reddy
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've never done TDD for a static page. If I was, I would use a tool like Selenium though:

I expect to see a field with the label "first"
write it
I expect to see a field with the label "last"
write it
I expect to see a submit button
write it

You said static though so I guess this would be more headers? For a single static page, the question feels like how would you TDD a word document? You could if you had requirements, but would it be necessary.
 
Sahil Reddy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By TDD... I just wanted to mean that i want to have safety-net so that , i may ensure everything is fine.........
Essentially, i just want to have tests may be that could be written afterwards...

For Instance

1. All pages are present
2. Required elements are present as expected


Are these things possible with Selenium ???
Regards
Reddy
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. Selenium let's you check the presence of elements. As does jwebunit. For static pages, jwebunit might be better because you don't have to worry about page interactions.
 
reply
    Bookmark Topic Watch Topic
  • New Topic