26.11.2014 Views

Using Selenium for configuration management in Drupal

Using Selenium for configuration management in Drupal

Using Selenium for configuration management in Drupal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1 2 3 4 5 6 7 8 9 10<br />

Best Practices us<strong>in</strong>g <strong>Selenium</strong><br />

1. Use version control on your <strong>Selenium</strong> directory, easily spot diffs<br />

2. In teams, use Dropbox to sync your <strong>Selenium</strong> script folder<br />

3. "Fix" scripts as you record them, i.e. record, replay, edit, repeat<br />

4. Create a reset-snapshot of your DB when fiddl<strong>in</strong>g with scripts<br />

5. Just as <strong>in</strong> cod<strong>in</strong>g, if you see it repeated, refactor your scripts<br />

6. Use assert statements especially when submitt<strong>in</strong>g data<br />

7. Fully use IDE with keyboard shortcuts to debug snippets<br />

8. Use variables to make scripts reusable (change <strong>in</strong> one script!)<br />

9. If you move to <strong>Selenium</strong> Server us<strong>in</strong>g a language specific<br />

Webdriver b<strong>in</strong>d<strong>in</strong>g, use a headless X-w<strong>in</strong>dows setup (Xvfb)<br />

10. Cont<strong>in</strong>uous <strong>in</strong>tegration with Jenk<strong>in</strong>s works great and will avoid<br />

port 4444 lock<strong>in</strong>g issues and you can queue your config jobs!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!