Skip to main content
improved formatting: use list markup instead of code markup, used backticks for embedded code items
Source Link

I'm writing a document for a developer at my company who will be working on a web app. Here's the advice I have for him so far (below). Can any of you think of more that I can add? Not sure which tool we'll be using, but Selenium and WatiN are strong contenders.

1. Where there are AJAX-heavy pages, especially when they have a big range of times to finish loading, help QA with hidden elements or JavaScript variables to indicate when the relevant AJAX piece (e.g. a data table is done loading)
    
2. Web elements should be:
    a. Uniquely identifiable - Selenium prefers id (fastest for looking up elements)
    b. Ideally, human-friendly, e.g. firstName instead of input82347
    
3. Favor standard web elements like <input> over many layers of nested <div> for the UI

4. Class names and other element attributes should not be repeated unless it makes sense, e.g. don't use the same class name for functionally different components (cheesy example: both <tr> and <td> having the exact same class name)

5. Selenium doesn't like compound class names (e.g. classname="classPart1 classpart2")
  1. Where there are AJAX-heavy pages, especially when they have a big range of times to finish loading, help QA with hidden elements or JavaScript variables to indicate when the relevant AJAX piece (e.g. a data table is done loading)
  2. Web elements should be:
    • a. Uniquely identifiable - Selenium prefers id (fastest for looking up elements)
    • b. Ideally, human-friendly, e.g. firstName instead of input82347
  3. Favor standard web elements like <input> over many layers of nested <div> for the UI
  4. Class names and other element attributes should not be repeated unless it makes sense, e.g. don't use the same class name for functionally different components (cheesy example: both <tr> and <td> having the exact same class name)
  5. Selenium doesn't like compound class names (e.g. classname="classPart1 classpart2")

I'm writing a document for a developer at my company who will be working on a web app. Here's the advice I have for him so far (below). Can any of you think of more that I can add? Not sure which tool we'll be using, but Selenium and WatiN are strong contenders.

1. Where there are AJAX-heavy pages, especially when they have a big range of times to finish loading, help QA with hidden elements or JavaScript variables to indicate when the relevant AJAX piece (e.g. a data table is done loading)
    
2. Web elements should be:
    a. Uniquely identifiable - Selenium prefers id (fastest for looking up elements)
    b. Ideally, human-friendly, e.g. firstName instead of input82347
    
3. Favor standard web elements like <input> over many layers of nested <div> for the UI

4. Class names and other element attributes should not be repeated unless it makes sense, e.g. don't use the same class name for functionally different components (cheesy example: both <tr> and <td> having the exact same class name)

5. Selenium doesn't like compound class names (e.g. classname="classPart1 classpart2")

I'm writing a document for a developer at my company who will be working on a web app. Here's the advice I have for him so far (below). Can any of you think of more that I can add? Not sure which tool we'll be using, but Selenium and WatiN are strong contenders.

  1. Where there are AJAX-heavy pages, especially when they have a big range of times to finish loading, help QA with hidden elements or JavaScript variables to indicate when the relevant AJAX piece (e.g. a data table is done loading)
  2. Web elements should be:
    • a. Uniquely identifiable - Selenium prefers id (fastest for looking up elements)
    • b. Ideally, human-friendly, e.g. firstName instead of input82347
  3. Favor standard web elements like <input> over many layers of nested <div> for the UI
  4. Class names and other element attributes should not be repeated unless it makes sense, e.g. don't use the same class name for functionally different components (cheesy example: both <tr> and <td> having the exact same class name)
  5. Selenium doesn't like compound class names (e.g. classname="classPart1 classpart2")
Tweeted twitter.com/#!/StackSQA/status/326442509901369345
Source Link
Aaron
  • 2.3k
  • 6
  • 25
  • 27

Best practices for developers to increase testability of web apps for QA?

I'm writing a document for a developer at my company who will be working on a web app. Here's the advice I have for him so far (below). Can any of you think of more that I can add? Not sure which tool we'll be using, but Selenium and WatiN are strong contenders.

1. Where there are AJAX-heavy pages, especially when they have a big range of times to finish loading, help QA with hidden elements or JavaScript variables to indicate when the relevant AJAX piece (e.g. a data table is done loading)
    
2. Web elements should be:
    a. Uniquely identifiable - Selenium prefers id (fastest for looking up elements)
    b. Ideally, human-friendly, e.g. firstName instead of input82347
    
3. Favor standard web elements like <input> over many layers of nested <div> for the UI

4. Class names and other element attributes should not be repeated unless it makes sense, e.g. don't use the same class name for functionally different components (cheesy example: both <tr> and <td> having the exact same class name)

5. Selenium doesn't like compound class names (e.g. classname="classPart1 classpart2")