Why RSpec Is the Best Test Syntax Framework for End-to-End Test Automation?
Simple, Intuitive, Well-Proven and Ruby
In the context of End-to-End Test Automation, Test Automation Framework actually means two frameworks: Automation + Test Syntax. The automation framework drives the app; The test syntax framework provides the test structure and assertion.
In my Selenium WebDriver recipes book series,
the automation framework I used, of course, is Selenium WebDriver; The test syntax frameworks are:
RSpec (Ruby)
JUnit4 and JUnit5 (Java)
Pytest (Python)
Mocha (JavaScript)
Visual Studio Unit Testing Framework (C#)
For desktop test automation, I favor using Appium WinAppDriver with RSpec. For mobile test automation, my preference is Appium with XCUITest/UIAutomator2 + RSpec. For API testing, I prefer using Ruby with RSpec.
In this article, I explain why I believe RSpec is the best test syntax framework for end-to-end (E2E) test automation.
Table of Contents:
∘ 1. RSpec is widely used
∘ 2. RSpec’s success is acknowledged
∘ 3. RSpec is Ruby
∘ 4. RSpec is Simple
∘ 5. RSpec is a BDD framework, but not Gherkin
∘ 6. A Specific RSpec Feature that I like
1. RSpec is widely used
RSpec v3.12 (single version) has 73+ million downloads; v3.8 has over 211 million downloads! Of course, the majority of using RSpec, just like other test syntax frameworks, is for unit and integration testing.
Although the first public release dates back to 2007, the software remains actively maintained, with the latest version, 3.13, released just a few months ago.
At one company, the developers’ attempt at implementing E2E test automation (using Cucumber) failed and abandoned it. I later joined the testing team and successfully implemented the automation. The development lead, concerned about the maintainability of the solution after my departure, sought more information from me.
Later, I overheard him reassuring others, saying, “It’s fine, it’s using RSpec”.
2. RSpec’s success is acknowledged.
Keep reading with a 7-day free trial
Subscribe to AgileWay’s Test Automation & Continuous Testing Blog to keep reading this post and get 7 days of free access to the full post archives.