T212 : Automating API testing

Supervision:
Contact person: Tom Schrijvers
Supervisor(s): Tom Schrijvers
Daily advisor(s): Tom Gherkiere
Research group:
Declarative Languages and Artificial Intelligence
Context:

This project is organised in collaboration with industrial partner 4D vision nv.

At 4D vision, we build tailor-made applications for our customers. Over the years, we have built extensive knowledge in building a model that matches the problem at hand. The models are typically data-oriented model (entity-relations), annotated with metadata expressing information on how validate, format, display, etc. the data. Furthermore, we have invested heavily in generating all necessary source code from the database to the user interface.

By applying model driven development techniques and automated software generation 4D vision brings custom software within everyone’s reach: fast affordable and result oriented.

The skeleton and the architecture of the generated application is always the same, as it is produced by code generation. Today, we build applications composed of the following blocks:

  •  a single-page application (SPA) build with AngularJS, HTML and Bootstrap CSS
  • a REST API build with ASP.NET Web API
  • a business layer with entity classes in C# (with getter and setter properties) enriched with metadata, i.e. the model
  • data access through Entity Framework (EF) to a SQL Server database

Testing improves the quality of a software application. Our primary strategy of test automation is the use of unit tests. However, the scope of these tests is restricted to the model itself. This means neither the API layer nor the data layer are being tested. Automating such tests is typically labor-intensive.

Therefore, we propose to automate the generation of API tests based on a given set of unit tests. 

Aim:

In this thesis, you research and evaluate any prior art which targets this problem. Incorporate the gathered knowledge into a solution that can transform any set of unit tests into a set of API tests.

These API tests will of course need sufficient knowledge of the API layer (REST API vs SOAP etc.) in order to correctly make a request to each endpoint.  This formulation can be made in a domain-specific language (DSL).

The generated API tests must be able to assert the effects in-memory as well as in the data layer.

Optional target: provide a strategy for actual end-to-end testing, i.e. tests involving the user interface. These can also be derived from the initial set of unit tests.

Possible research questions:
  • How to effectively automate API testing?
Approach:
  • Research the academic literature on and establish relevant prior art on static code analysis, DSL interpretation, automated API testing, scenario testing, end-to-end testing…
  • Propose solutions to the given problem and evaluate these proposals.
  • Implement the chosen approach in a stand-alone tool for black-box testing.

As the industry partner in this thesis, 4D vision appoints a mentor who will guide you towards a successful implementation. You are expected to meet up with the mentor in 4D vision's Antwerp office once every few weeks (travel costs payable by 4D vision).  There is the option to do an internship to get to know the code generation framework. 

Relevant literature:
  • https://en.wikipedia.org/wiki/API_testing
Student profile:
  • Interested in software-engineering technology
  • Good implementor
  • Self-motivated and hard-working

This topic is for 1 student(s).

This topic can be selected by

  • all Master in de Ingenieurswetenschappen: Computerwetenschappen (ir) students
  • all Master of Engineering: Computer Science students

Clusters, in which this topic appears:
  • Software engineering
  • Programming Languages
18-07-2008