samedi 18 juin 2016

Library for API testing using flow based call method


I am not sure whether I put the appropriate title. But here's the problem to be solved.

I work as a developer on a lot of middleware applications for linux platform (written in C/C++). All of them expose a set of APIs to the application programmer, who writes GUI applications using my API set exposed. Say, for example, If have a middleware application for mp3 playback, it has APIs something like: 1) openPlayerSession() 2) playFile() 3) playNextTrack() 4) playPreviousTrack() 5) pausePlayback() 6) resumePlayback() .....

Obviously, there's always a correct sequence of API calls like openPlayerSession ==> playFile ==> playNextTrack ==> pausePlayback ...

Requirement is that I want to make a better testing tool for myself. Currently, I have a console based test app for APIs testing... which asks for option number (the API number) to be tested and then the corresponding parameters to the API. The API is called and the result is printed on the screen. I have to remember the API flow, where I am currently, to choose the next API number to be tested. So far so good.

The problem is that I have 70 of such APIs, so to make the API flow testing interesting and easy, I wanted to visualize things, rather than remembering the flow. I came up with this d3js thing, which is similar to what I want. I can work on it for few weeks to customize it for my testing purpose: like reading the flow from the graph and corresponding api parameters from a set of test data file. The entire thing is then passed to my existing console-based test app (through piping, or something similar). It seems feasible, though I haven't looked into details.

But before proceeding, has anyone come across a better open source visualization tool which can be customized for my current scenario. Or can you suggest any good open-source toolkits/libraries for the same..


Aucun commentaire:

Enregistrer un commentaire