Skip to content

lauramcastro/webui-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webui-test

QuickCheck-based web-based GUI testing framework

WebUI-test is a QuickCheck-based testing framework intended for automatic generation and execution of test sequences for web-based graphical user interfaces (GUIs).

What does that mean?

If you have an application or system for which the user interface is your browser, then WebUI-test is for you. This tool is focused primarly in enabling a sort of QuickCheck-based monkey testing. It is QuickCheck-based because rather than writing unit tests, we provide a generic interaction model (a QuickCheck model) that you can fine-tune (but that will save you a lot of effort) and a set of generic interaction actions (ways in which a person will usually interact with a web-based GUI: clicking links and buttons, writing in textboxes, going forward/backwards, reloading, etc.). The interaction actions can also be fine-tuned if you use a particular web framework to build your user interface.

How do I use it?

There is a very simple example in the examples folder. In order to get it running, make sure you have the following installed (or equivalent):

Download or clone this repository, and build it:

$ ./rebar3 compile

Now, make sure to start the chromedriver before you run the example (this is usually done just by executing the chromedriver binary in the background; you do not need to lauch your browser, just the driver). The example is then executed by opening an Erlang shell, moving into the examples folder, compiling the two modules that constitute the example, and calling the run/0 function in module google_search:

$ ./rebar3 shell
> cd(examples).
ok
> c(search_engine,[{i,"../include"}]).
{ok,search_engine}
> c(search_engine_actions,[{i,"../include"}]).
{ok,search_engine_actions}
> search_engine:run().
.
OK, passed 1 tests
true

You should see a new window of the browser appear, DuckDuckGo's main page loading, and random interaction from there on. Of course, you need to have internet access.

You can have more than one go (i.e. run more than 1 test sequence) easily by calling run/1 instead:

> search_engine:run(10).
..........
OK, passed 10 tests
true

About

QuickCheck-based web-based GUI testing framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Erlang 92.9%
  • Makefile 7.1%