June 7th, 2017 by Adam Sandman
In this short blog post, our test automation guru - Denis Markovtsev explains the ideas and principles behind the design of Inflectra's new Rapise Visual Language (RVL) introduced in Rapise 5.1. RVL is a spreadsheet-based approach to UI test automation implemented in Rapise to help domain specialists and test analysts, who are not programmers, participate in test automation projects.
Introduction
Since the beginning of computer era, programmers divided code and static data. Let's briefly trace history starting with x86 assembler:
.model small
.stack 128
.code
start: mov ax, @data
mov ds, ax
mov ah, 9
lea dx, msg
int 21h
mov ah, 4ch
int 21h
.data
msg byte 'Hello World!', 13, 10, '$'
end start
Notice those .code
, .data
segments and msg
variable containing Hello World!
string.
In C
language the example turns into.
#include <stdio.h>
static const char* msg = "Hello World!\r\n";
int main()
{
printf(msg);
return 0;
}
And here is the one of the most modern successors of C
- C#
.
using System;
namespace CSharpConsoleApplication
{
class Program
{
private static string msg = "Hello World!";
static void Main(string[] args)
{
Console.WriteLine(msg);
}
}
}
Separation of code and data is a natural approach providing many benefits.
- Same data variable may be used in several places in the code.
- If variable value is changed no need to update the code.
- Data variables may be grouped together for better visibility.
- Data may be defined in external sources which makes it easier to maintain and update.
Notice that writing Hello World!
example in any of the languages mentioned above requires knowledge of
- Keywords (like
.model
,.stack
,char
,main
,namespace
,public
). - Syntax rules for using symbols like
{
,}
,(
,)
,[
,]
. - Rules for definition of string constants.
RVL Maps
At Inflectra we kept in mind all these considerations while designing Maps feature for RVL and tried to simplify syntax as much as possible. Here is how Hello World!
looks like in RVL:
Actually, this example does a more complex thing than printing Hello World!
to a report. It has a loop that iterates through a data set (map) and prints all defined values. Adding more values
and see the execution result:
Let's iterate through a list of great capabilities expressed by RVL in this example:
- Data and code (logic) are separated.
- Data and code are in the same document which makes it easy to bootstrap a working prototype of the test.
- No special knowledge of string formatting is required. One can just write values in spreadsheet cells.
Want to place data values in rows rather than columns. Excellent:
Now imagine you want to work with a particular row in the map. Just put this
on a desired row and the loop will execute just one iteration for it.
Easy and simple.
Conclusion
RVL is an effort to easy life for non-programmers and enable them to participate in UI test automation projects more effectively. RVL is based on many proven concepts developed for programming languages since assembler birth times and is build around simple spreadsheet-inspired notation.