Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Y U No Test Yur UI?

Y U No Test Yur UI?

Updated for a talk at StirTrek 2013: Now includes a few extra slides on asynchronous stuff like AJAX. You can also find demo code at http://github.com/jimholmes/SE13

This deck is from my Speaker Idol talk at TechEd 2012. The talk is mean to highlight the importance of choosing good locators when creating automated tests around your UI. (I took second in the competition.)

Jim Holmes

June 14, 2012
Tweet

More Decks by Jim Holmes

Other Decks in Programming

Transcript

  1. <html>   <head></head>   <body>      <div  id="top-­‐bar">  

      <h1><img  alt="Teleriklogo"  src="/TelerikLogo.png"  />  </h1>      </div>      <div  id="body">        <h1>Welcome!</h1>     </div>      </div>      <div  id='login_dialog'  title='Login'>          <form  data-­‐remote="true"  method="post">                        <div  class="field">          <input  id="username"  name="username"  type="text"  />          </div>          <div  class="field">          <input  id="password"  name="password"  type="password"  />          </div>          <div  class="actions">            <input  id="login_button"  type="submit"  value="Log  in"  />          </div>     </form>        </div>   </body> </html> /html/body/div[2]/form/div[1]/input
  2. <html>   <head></head>   <body>      <div  id="top-­‐bar">  

      <h1><img  alt="Teleriklogo"  src="/TelerikLogo.png"  />  </h1>      </div>      <div  id="body">        <h1>Welcome!</h1>     </div>      </div>      <div  id='login_dialog'  title='Login'>          <form  data-­‐remote="true"  method="post">                        <div  class="field">          <input  id="password"  name="password"  type="password"  />          </div>          <div  class="field">          <input  id="username"  name="username"  type="text"  />          </div>          <div  class="actions">            <input  id="login_button"  type="submit"  value="Log  in"  />          </div>     </form>        </div>   </body> </html> /html/body/div[2]/form/div[1]/input
  3. <html>   <head></head>   <body>      <div  id="top-­‐bar">  

      <h1><img  alt="Teleriklogo"  src="/TelerikLogo.png"  />  </h1>      </div>      <div  id="body">        <h1>Welcome!</h1>     </div>      </div>      <div  id='login_dialog'  title='Login'>          <form  data-­‐remote="true"  method="post">                        <div  class="field">          <input  id="password"  name="password"  type="password"  />          </div>          <div>          <input  id="username"  name="username"  class="input"  />          </div>          <div  class="actions">            <input  id="login_button"  type="submit"  value="Log  in"  />          </div>     </form>        </div>   </body> </html> ID Name Class
  4. <html>   <head></head>   <body>      <div  id="top-­‐bar">  

      <h1><img  alt="Teleriklogo"  src="/TelerikLogo.png"  />  </h1>      </div>      <div  id="body">        <h1>Welcome!</h1>     </div>      </div>      <div  id='login_dialog'  title='Login'>          <form  data-­‐remote="true"  method="post">                        <div  class="field">          <input  id="password"  name="password"  type="password"  />          </div>          <div  class="field">          <input  id="username"  name="username"  type="text"  />          </div>          <div  class="actions">            <input  id="login_button"  type="submit"  value="Log  in"  />          </div>     </form>        </div>   </body> </html> /html/body/div[2]/form/div[1]/input
  5. Image Attribution Live unicorn: http://52weekmarathon.blogspot.com/2011/11/punching-unicorn- nyc-marathon-recap.html Dead unicorn: http://tvtropes.org/pmwiki/pmwiki.php/Main/ DeadUnicornTrope

    Bacon: http://www.slashfood.com/2010/08/19/bacon-thats-good-for-you/ Veruca Salt Stolen off some site that stole it from somewhere else that stole it too