Why Scripting Languages are Better for Writing Automated End-to-End Tests? Part 2

Comparing the Speed of Scripting and Non-Scripting Languages’ Test Execution

Courtney Zhan

--

This is part 2 of “Why Scripting Languages are Better for Writing Automated End-to-End tests” (Part 1 here).

1. Faster

The raw code execution speed in compiled languages (e.g. C#) is certainly much faster than in scripting (a.k.a. dynamic) languages (e.g. Ruby). However, in the context of test automation execution, that advantage is minor, as most of the execution time is on the app.

When developing/debugging test scripts, we often need to run/debug individual test cases multiple times. In this mode, compiled languages are less efficient, and in fact, slower. This is due to the compilation step and VM (e.g. Java’s JVM) start-up time.

Timing/Execution of The Same Test in Ruby and C#

I timed the same test on a sample site written in Ruby (RSpec) and C# (MS VSTest).

Rspec — 8.5 seconds

--

--

No responses yet