-1

I need other automation testers opinions on the best way to test a website which is built using React.

Personally I have built automation test suits using Selenium Webdriver and Java, whats your thoughts on using other technologies such as Node, JS and WebdriverIO?

Would building an automation test suite / tests using technologies such as WebDriverio, JS etc be a more superior solution than using Selenium Webdriver and Java as the code as the same code (JS) is used to build the website and automation test framework.

Gbru
  • 975
  • 1
  • 16
  • 40

1 Answers1

3

Well, I'll try to best answer based on my experience with test automation frameworks (WEB & API alike) across all types of applications (from the popular React, Angular(1,2 & 5) & VueJS, to Spring, or trash like Vaadin web apps).

Before I give my on the matter, I just want to point out that a (good) web testing framework will always be agnostic of the underlying stack used. Thus, a React web app shouldn't critically dictate the selection of a functional testing tool.

If I'd be tasked to take such a decision, I'm going to look at the following:

❶ What is the common programming language (spoken) inside the team?

❷ What is the best testing framework for the respective programming language?

❸ Lastly, what level of support is that framework getting?


❶ Now, why is this important? Well, since you're asking for a React web app, then I'll suppose the entire dev team knows React, thus they're savvy JavaScript Engineers. So in order to minimize the impact of a possibly steep learning curve (a slow learning ramp-up for the framework selected), I'd probably go with a JavaScript/NodeJS solution.

As a general rule of thumb, it's common practice to write the tests in the same language in which the application is written. But, that doesn't mean this is ultimately the best way to select the language.


Goooood... so you've selected the programming language, now the question is, which available testing framework would bring you the most value? I would recommend you build a small POC with all the major testing frameworks for that specific language.

e.g: for JavaScript, those would be:

You can't say you got the feel for a specific framework until you really tried it and got a good understanding of it's strengths & weaknesses alike.

If you have a strong QA team, then setup a contest: each team member has 2 weeks to create a working POC with a framework of their choosing. Afterwards, judge the solutions & democratically pick the best framework. You can't be more thorough than this!

❒ Obs: If you're interested in the first two, you should check this breakdown I wrote regarding these testing frameworks.


You don't want to be the guy going inside a burning building! If that framework you selected doesn't have great support (is unmaintained & has miserable DOCs), has slow release cycles, doesn't fix major bugs, or offer regular feature improvements, or fresh functionality... then, bail out & choose another one!

❒ Note: There's no pride in being the last fan of a dying software solution...


That being said, I am currently maintaining several automation harnesses for React web apps using (to great success) both WebdriverIO & Nightwatch . The limitations, or edge cases encountered along the way were never React-specific, nor was the testing affected by any React components, or React router logic.

iamdanchiv
  • 3,828
  • 4
  • 32
  • 40