Single Page Application Selenium Testing


(Taylor ) #1

Hello,

Our program at work is using a third-party solution written as a Single Page App (SPA) and we’re struggling to automate using Java and Selenium. The framework was created by others who are on a different team in the company now, and we have inherited everything they had. It’s been in place almost 2 years now, so unfortunately it’s here to stay.
Our tests are really flaky and we struggle with using XPATH and CSS as identifiers.
I was wondering if anyone has faced similar issues and if you have any tips for us please.

Thank you in advance.


(João Farias) #2

Considering that the velocity on this front can be inherently low, you may want to:

  • Try to scope down your work

    Discover what is already covered by other suites: Component and unit tests.
    This will both free you up from some work and loop you in the development in these checks, allowing you to use these tools to perform checks in an easier way than end-to-end

  • Discover what is risker in your app

    • Don’t have one suite. Build suites that focus on different risks: Smoke, UI*, user end-to-end flows, stack end-to-end focused (frontend + backend)
    • Is accessibility particularly important for your app? You probably should focus on automating checks (with Axe Core, e.g.) rather than adding that other Selenium check for 100-character longer username.

* In case you cannot check it with a more appropriated tool