A collection of my notes relating to running an end-to-end testing program that won’t drive you made. Much. :)

Test framework

For every test suite, there’s a runner. The runner (ie test framework) has responsibilities when it comes to testing. It should provide ways to do things efficiently, reduce boilerplate, and report what happened in more than an “all tests pass/fail” kind of way because the health of a test suite, and execution thereof is a bit more nuanced than this …

These are a few of the things I have found helpful in the test automation projects I have been a part of:

  • Webdriver wrapper to handle dom interactions (locators, waits, actions, etc)
  • Sample data handling (How does a test create its data before it runs?)
  • Reporting
    • Flakes
    • Regressions
    • Screenshots for errors
    • Video captures
  • Browser wrapper (Profile definitions per browser: chrome firefox, resolution, optionals, etc)
  • A tagging strategy
    • Want to be able to do “Run tests related to feature X,Y” eg login, patient search

Helpful maven dependencies

  • junit
  • selenium
  • webdrivermanager
<project>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>5.7.0-M1</version>
    </dependency>
    
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>4.0.0-alpha-5</version>
    </dependency>
    
    <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>4.0.0</version>
    </dependency>
</project>

Vendors

  • Browserstack
  • Applitools

Other tools in this space

  • Cypress: I haven’t had a chance to play with it yet, but many people like it and there are new ideas in here worth checking out!